diff --git a/tests_python/tests_014/_regtest_outputs/test_contract.TestCreateRemoveTickets::test_add_clear_tickets_add_first_transfer.out b/tests_python/tests_014/_regtest_outputs/test_contract.TestCreateRemoveTickets::test_add_clear_tickets_add_first_transfer.out deleted file mode 100644 index 71999f663976e238cf58fd059464e83e2a86d607..0000000000000000000000000000000000000000 --- a/tests_python/tests_014/_regtest_outputs/test_contract.TestCreateRemoveTickets::test_add_clear_tickets_add_first_transfer.out +++ /dev/null @@ -1,38 +0,0 @@ -tests_014/test_contract.py::TestCreateRemoveTickets::test_add_clear_tickets_add_first_transfer - -Node is bootstrapped. -Estimated gas: 2576.077 units (will add 100 for safety) -Estimated storage: 105 bytes added (will add 20 for safety) -Operation successfully injected in the node. -Operation hash is '[BLOCK_HASH]' -NOT waiting for the operation to be included. -Use command - tezos-client wait for [BLOCK_HASH] to be included --confirmations 1 --branch [BLOCK_HASH] -and/or an external block explorer to make sure that it has been included. -This sequence of operations was run: - Manager signed operations: - From: [CONTRACT_HASH] - Fee to the baker: ꜩ0.000535 - Expected counter: [EXPECTED_COUNTER] - Gas limit: 2677 - Storage limit: 125 bytes - Balance updates: - [CONTRACT_HASH] ... -ꜩ0.000535 - payload fees(the block proposer) ....... +ꜩ0.000535 - Transaction: - Amount: ꜩ0 - From: [CONTRACT_HASH] - To: [CONTRACT_HASH] - Entrypoint: add - Parameter: (Pair 1 "A") - This transaction was successfully applied - Updated storage: - { Pair 0x0134d794a355dbb7027075d278a68494e91c6709ed00 (Pair "A" 1) } - Storage size: 154 bytes - Paid storage size diff: 105 bytes - Consumed gas: 2576.077 - Balance updates: - [CONTRACT_HASH] ... -ꜩ0.02625 - storage fees ........................... +ꜩ0.02625 - -Injected block at minimal timestamp diff --git a/tests_python/tests_014/_regtest_outputs/test_contract.TestCreateRemoveTickets::test_add_clear_tickets_add_second_transfer.out b/tests_python/tests_014/_regtest_outputs/test_contract.TestCreateRemoveTickets::test_add_clear_tickets_add_second_transfer.out deleted file mode 100644 index cb77bd47a3fdb1e3b5be6fa08c2f7c9e49594417..0000000000000000000000000000000000000000 --- a/tests_python/tests_014/_regtest_outputs/test_contract.TestCreateRemoveTickets::test_add_clear_tickets_add_second_transfer.out +++ /dev/null @@ -1,34 +0,0 @@ -tests_014/test_contract.py::TestCreateRemoveTickets::test_add_clear_tickets_add_second_transfer - -Node is bootstrapped. -Estimated gas: 1657.462 units (will add 100 for safety) -Estimated storage: no bytes added -Operation successfully injected in the node. -Operation hash is '[BLOCK_HASH]' -NOT waiting for the operation to be included. -Use command - tezos-client wait for [BLOCK_HASH] to be included --confirmations 1 --branch [BLOCK_HASH] -and/or an external block explorer to make sure that it has been included. -This sequence of operations was run: - Manager signed operations: - From: [CONTRACT_HASH] - Fee to the baker: ꜩ0.000443 - Expected counter: [EXPECTED_COUNTER] - Gas limit: 1758 - Storage limit: 0 bytes - Balance updates: - [CONTRACT_HASH] ... -ꜩ0.000443 - payload fees(the block proposer) ....... +ꜩ0.000443 - Transaction: - Amount: ꜩ0 - From: [CONTRACT_HASH] - To: [CONTRACT_HASH] - Entrypoint: add - Parameter: (Pair 1 "B") - This transaction was successfully applied - Updated storage: - { Pair 0x0134d794a355dbb7027075d278a68494e91c6709ed00 (Pair "B" 1) } - Storage size: 154 bytes - Consumed gas: 1657.462 - -Injected block at minimal timestamp diff --git a/tests_python/tests_014/_regtest_outputs/test_contract.TestCreateRemoveTickets::test_add_clear_tickets_add_third_transfer.out b/tests_python/tests_014/_regtest_outputs/test_contract.TestCreateRemoveTickets::test_add_clear_tickets_add_third_transfer.out deleted file mode 100644 index 50d62f7d5d17dab8d0a4de247c4ba570ca9e586f..0000000000000000000000000000000000000000 --- a/tests_python/tests_014/_regtest_outputs/test_contract.TestCreateRemoveTickets::test_add_clear_tickets_add_third_transfer.out +++ /dev/null @@ -1,39 +0,0 @@ -tests_014/test_contract.py::TestCreateRemoveTickets::test_add_clear_tickets_add_third_transfer - -Node is bootstrapped. -Estimated gas: 2333.201 units (will add 100 for safety) -Estimated storage: 105 bytes added (will add 20 for safety) -Operation successfully injected in the node. -Operation hash is '[BLOCK_HASH]' -NOT waiting for the operation to be included. -Use command - tezos-client wait for [BLOCK_HASH] to be included --confirmations 1 --branch [BLOCK_HASH] -and/or an external block explorer to make sure that it has been included. -This sequence of operations was run: - Manager signed operations: - From: [CONTRACT_HASH] - Fee to the baker: ꜩ0.000511 - Expected counter: [EXPECTED_COUNTER] - Gas limit: 2434 - Storage limit: 125 bytes - Balance updates: - [CONTRACT_HASH] ... -ꜩ0.000511 - payload fees(the block proposer) ....... +ꜩ0.000511 - Transaction: - Amount: ꜩ0 - From: [CONTRACT_HASH] - To: [CONTRACT_HASH] - Entrypoint: add - Parameter: (Pair 1 "C") - This transaction was successfully applied - Updated storage: - { Pair 0x0134d794a355dbb7027075d278a68494e91c6709ed00 (Pair "C" 1) ; - Pair 0x0134d794a355dbb7027075d278a68494e91c6709ed00 (Pair "B" 1) } - Storage size: 193 bytes - Paid storage size diff: 105 bytes - Consumed gas: 2333.201 - Balance updates: - [CONTRACT_HASH] ... -ꜩ0.02625 - storage fees ........................... +ꜩ0.02625 - -Injected block at minimal timestamp diff --git a/tests_python/tests_014/_regtest_outputs/test_contract.TestCreateRemoveTickets::test_add_clear_tickets_clear_transfer.out b/tests_python/tests_014/_regtest_outputs/test_contract.TestCreateRemoveTickets::test_add_clear_tickets_clear_transfer.out deleted file mode 100644 index 1ef57c4d9a58914ed810be3d51f46b8d7973bec5..0000000000000000000000000000000000000000 --- a/tests_python/tests_014/_regtest_outputs/test_contract.TestCreateRemoveTickets::test_add_clear_tickets_clear_transfer.out +++ /dev/null @@ -1,32 +0,0 @@ -tests_014/test_contract.py::TestCreateRemoveTickets::test_add_clear_tickets_clear_transfer - -Node is bootstrapped. -Estimated gas: 1845.841 units (will add 100 for safety) -Estimated storage: no bytes added -Operation successfully injected in the node. -Operation hash is '[BLOCK_HASH]' -NOT waiting for the operation to be included. -Use command - tezos-client wait for [BLOCK_HASH] to be included --confirmations 1 --branch [BLOCK_HASH] -and/or an external block explorer to make sure that it has been included. -This sequence of operations was run: - Manager signed operations: - From: [CONTRACT_HASH] - Fee to the baker: ꜩ0.000456 - Expected counter: [EXPECTED_COUNTER] - Gas limit: 1946 - Storage limit: 0 bytes - Balance updates: - [CONTRACT_HASH] ... -ꜩ0.000456 - payload fees(the block proposer) ....... +ꜩ0.000456 - Transaction: - Amount: ꜩ0 - From: [CONTRACT_HASH] - To: [CONTRACT_HASH] - Entrypoint: clear - This transaction was successfully applied - Updated storage: {} - Storage size: 115 bytes - Consumed gas: 1845.841 - -Injected block at minimal timestamp diff --git a/tests_python/tests_014/_regtest_outputs/test_contract.TestCreateRemoveTickets::test_add_clear_tickets_origination.out b/tests_python/tests_014/_regtest_outputs/test_contract.TestCreateRemoveTickets::test_add_clear_tickets_origination.out deleted file mode 100644 index 3453f974d87d5fd2afe4167d5e1586b983936006..0000000000000000000000000000000000000000 --- a/tests_python/tests_014/_regtest_outputs/test_contract.TestCreateRemoveTickets::test_add_clear_tickets_origination.out +++ /dev/null @@ -1,51 +0,0 @@ -tests_014/test_contract.py::TestCreateRemoveTickets::test_add_clear_tickets_origination - -Node is bootstrapped. -Estimated gas: 1427.482 units (will add 100 for safety) -Estimated storage: 372 bytes added (will add 20 for safety) -Operation successfully injected in the node. -Operation hash is '[BLOCK_HASH]' -NOT waiting for the operation to be included. -Use command - tezos-client wait for [BLOCK_HASH] to be included --confirmations 1 --branch [BLOCK_HASH] -and/or an external block explorer to make sure that it has been included. -This sequence of operations was run: - Manager signed operations: - From: [CONTRACT_HASH] - Fee to the baker: ꜩ0.000498 - Expected counter: [EXPECTED_COUNTER] - Gas limit: 1528 - Storage limit: 392 bytes - Balance updates: - [CONTRACT_HASH] ... -ꜩ0.000498 - payload fees(the block proposer) ....... +ꜩ0.000498 - Origination: - From: [CONTRACT_HASH] - Credit: ꜩ200 - Script: - { parameter (or (pair %add nat string) (unit %clear)) ; - storage (list (ticket string)) ; - code { UNPAIR ; - IF_LEFT - { UNPAIR ; DIG 2 ; SWAP ; DIG 2 ; TICKET ; CONS ; NIL operation ; PAIR } - { DROP 2 ; NIL (ticket string) ; NIL operation ; PAIR } } } - Initial storage: {} - No delegate for this contract - This origination was successfully applied - Originated contracts: - [CONTRACT_HASH] - Storage size: 115 bytes - Paid storage size diff: 115 bytes - Consumed gas: 1427.482 - Balance updates: - [CONTRACT_HASH] ... -ꜩ0.02875 - storage fees ........................... +ꜩ0.02875 - [CONTRACT_HASH] ... -ꜩ0.06425 - storage fees ........................... +ꜩ0.06425 - [CONTRACT_HASH] ... -ꜩ200 - [CONTRACT_HASH] ... +ꜩ200 - -New contract [CONTRACT_HASH] originated. -Contract memorized as add_clear_tickets. -Injected block at minimal timestamp -[ [], [], [], [ "[BLOCK_HASH]" ] ] diff --git a/tests_python/tests_014/test_contract.py b/tests_python/tests_014/test_contract.py index b13254560aca511dfd8116af9ebc247b03171e4f..773dfe9182df457307dd274e193a27cc80044177 100644 --- a/tests_python/tests_014/test_contract.py +++ b/tests_python/tests_014/test_contract.py @@ -2283,63 +2283,3 @@ code {{ self.check_contract_ko( client, kt1, None, root_type, type_mismatch_error ) - - -@pytest.mark.incremental -@pytest.mark.contract -@pytest.mark.regression -class TestCreateRemoveTickets: - def test_add_clear_tickets_origination( - self, client_regtest_scrubbed, session - ): - client = client_regtest_scrubbed - path = os.path.join( - CONTRACT_PATH, 'mini_scenarios', 'add_clear_tickets.tz' - ) - originate(client, session, path, '{}', 200) - - def test_add_clear_tickets_add_first_transfer( - self, client_regtest_scrubbed - ): - client = client_regtest_scrubbed - client.transfer( - 0, - 'bootstrap2', - 'add_clear_tickets', - ['--entrypoint', 'add', '--arg', 'Pair 1 "A"', '--burn-cap', '2'], - ) - utils.bake(client, 'bootstrap5') - - def test_add_clear_tickets_clear_transfer(self, client_regtest_scrubbed): - client = client_regtest_scrubbed - client.transfer( - 0, - 'bootstrap2', - 'add_clear_tickets', - ['--entrypoint', 'clear', '--arg', 'Unit', '--burn-cap', '2'], - ) - utils.bake(client, 'bootstrap5') - - def test_add_clear_tickets_add_second_transfer( - self, client_regtest_scrubbed - ): - client = client_regtest_scrubbed - client.transfer( - 0, - 'bootstrap2', - 'add_clear_tickets', - ['--entrypoint', 'add', '--arg', 'Pair 1 "B"', '--burn-cap', '2'], - ) - utils.bake(client, 'bootstrap5') - - def test_add_clear_tickets_add_third_transfer( - self, client_regtest_scrubbed - ): - client = client_regtest_scrubbed - client.transfer( - 0, - 'bootstrap2', - 'add_clear_tickets', - ['--entrypoint', 'add', '--arg', 'Pair 1 "C"', '--burn-cap', '2'], - ) - utils.bake(client, 'bootstrap5') diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestCreateRemoveTickets::test_add_clear_tickets_add_first_transfer.out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestCreateRemoveTickets::test_add_clear_tickets_add_first_transfer.out deleted file mode 100644 index f35e6c90f9a01dbe1f9fbad04ba1557be2c21a78..0000000000000000000000000000000000000000 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestCreateRemoveTickets::test_add_clear_tickets_add_first_transfer.out +++ /dev/null @@ -1,44 +0,0 @@ -tests_alpha/test_contract.py::TestCreateRemoveTickets::test_add_clear_tickets_add_first_transfer - -Node is bootstrapped. -Estimated gas: 2583.103 units (will add 100 for safety) -Estimated storage: 105 bytes added (will add 20 for safety) -Operation successfully injected in the node. -Operation hash is '[BLOCK_HASH]' -NOT waiting for the operation to be included. -Use command - tezos-client wait for [BLOCK_HASH] to be included --confirmations 1 --branch [BLOCK_HASH] -and/or an external block explorer to make sure that it has been included. -This sequence of operations was run: - Manager signed operations: - From: [CONTRACT_HASH] - Fee to the baker: ꜩ0.000536 - Expected counter: [EXPECTED_COUNTER] - Gas limit: 2684 - Storage limit: 125 bytes - Balance updates: - [CONTRACT_HASH] ... -ꜩ0.000536 - payload fees(the block proposer) ....... +ꜩ0.000536 - Transaction: - Amount: ꜩ0 - From: [CONTRACT_HASH] - To: [CONTRACT_HASH] - Entrypoint: add - Parameter: (Pair 1 "A") - This transaction was successfully applied - Updated storage: - { Pair 0x014e73b620ea35cc976a5ed90625a0fbaa895b289900 (Pair "A" 1) } - Storage size: 180 bytes - Paid storage size diff: 105 bytes - Consumed gas: 2583.103 - Balance updates: - [CONTRACT_HASH] ... -ꜩ0.02625 - storage fees ........................... +ꜩ0.02625 - Ticket updates: - Ticketer: [CONTRACT_HASH] - Content type: string - Content: "A" - Account updates: - [CONTRACT_HASH] ... +1 - -Injected block at minimal timestamp diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestCreateRemoveTickets::test_add_clear_tickets_add_second_transfer.out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestCreateRemoveTickets::test_add_clear_tickets_add_second_transfer.out deleted file mode 100644 index 66294295717f0d5c2560e7b2d94dee49c9592c3a..0000000000000000000000000000000000000000 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestCreateRemoveTickets::test_add_clear_tickets_add_second_transfer.out +++ /dev/null @@ -1,40 +0,0 @@ -tests_alpha/test_contract.py::TestCreateRemoveTickets::test_add_clear_tickets_add_second_transfer - -Node is bootstrapped. -Estimated gas: 1660.605 units (will add 100 for safety) -Estimated storage: no bytes added -Operation successfully injected in the node. -Operation hash is '[BLOCK_HASH]' -NOT waiting for the operation to be included. -Use command - tezos-client wait for [BLOCK_HASH] to be included --confirmations 1 --branch [BLOCK_HASH] -and/or an external block explorer to make sure that it has been included. -This sequence of operations was run: - Manager signed operations: - From: [CONTRACT_HASH] - Fee to the baker: ꜩ0.000444 - Expected counter: [EXPECTED_COUNTER] - Gas limit: 1761 - Storage limit: 0 bytes - Balance updates: - [CONTRACT_HASH] ... -ꜩ0.000444 - payload fees(the block proposer) ....... +ꜩ0.000444 - Transaction: - Amount: ꜩ0 - From: [CONTRACT_HASH] - To: [CONTRACT_HASH] - Entrypoint: add - Parameter: (Pair 1 "B") - This transaction was successfully applied - Updated storage: - { Pair 0x014e73b620ea35cc976a5ed90625a0fbaa895b289900 (Pair "B" 1) } - Storage size: 180 bytes - Consumed gas: 1660.605 - Ticket updates: - Ticketer: [CONTRACT_HASH] - Content type: string - Content: "B" - Account updates: - [CONTRACT_HASH] ... +1 - -Injected block at minimal timestamp diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestCreateRemoveTickets::test_add_clear_tickets_add_third_transfer.out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestCreateRemoveTickets::test_add_clear_tickets_add_third_transfer.out deleted file mode 100644 index 0561752664a1564cee9b7aab57005f6d264049dd..0000000000000000000000000000000000000000 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestCreateRemoveTickets::test_add_clear_tickets_add_third_transfer.out +++ /dev/null @@ -1,45 +0,0 @@ -tests_alpha/test_contract.py::TestCreateRemoveTickets::test_add_clear_tickets_add_third_transfer - -Node is bootstrapped. -Estimated gas: 2339.832 units (will add 100 for safety) -Estimated storage: 105 bytes added (will add 20 for safety) -Operation successfully injected in the node. -Operation hash is '[BLOCK_HASH]' -NOT waiting for the operation to be included. -Use command - tezos-client wait for [BLOCK_HASH] to be included --confirmations 1 --branch [BLOCK_HASH] -and/or an external block explorer to make sure that it has been included. -This sequence of operations was run: - Manager signed operations: - From: [CONTRACT_HASH] - Fee to the baker: ꜩ0.000511 - Expected counter: [EXPECTED_COUNTER] - Gas limit: 2440 - Storage limit: 125 bytes - Balance updates: - [CONTRACT_HASH] ... -ꜩ0.000511 - payload fees(the block proposer) ....... +ꜩ0.000511 - Transaction: - Amount: ꜩ0 - From: [CONTRACT_HASH] - To: [CONTRACT_HASH] - Entrypoint: add - Parameter: (Pair 1 "C") - This transaction was successfully applied - Updated storage: - { Pair 0x014e73b620ea35cc976a5ed90625a0fbaa895b289900 (Pair "C" 1) ; - Pair 0x014e73b620ea35cc976a5ed90625a0fbaa895b289900 (Pair "B" 1) } - Storage size: 219 bytes - Paid storage size diff: 105 bytes - Consumed gas: 2339.832 - Balance updates: - [CONTRACT_HASH] ... -ꜩ0.02625 - storage fees ........................... +ꜩ0.02625 - Ticket updates: - Ticketer: [CONTRACT_HASH] - Content type: string - Content: "C" - Account updates: - [CONTRACT_HASH] ... +1 - -Injected block at minimal timestamp diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestCreateRemoveTickets::test_add_clear_tickets_clear_transfer.out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestCreateRemoveTickets::test_add_clear_tickets_clear_transfer.out deleted file mode 100644 index 63c27d710a478a990a5a2bd6f66d1eb3d7d14ad0..0000000000000000000000000000000000000000 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestCreateRemoveTickets::test_add_clear_tickets_clear_transfer.out +++ /dev/null @@ -1,38 +0,0 @@ -tests_alpha/test_contract.py::TestCreateRemoveTickets::test_add_clear_tickets_clear_transfer - -Node is bootstrapped. -Estimated gas: 1848.199 units (will add 100 for safety) -Estimated storage: no bytes added -Operation successfully injected in the node. -Operation hash is '[BLOCK_HASH]' -NOT waiting for the operation to be included. -Use command - tezos-client wait for [BLOCK_HASH] to be included --confirmations 1 --branch [BLOCK_HASH] -and/or an external block explorer to make sure that it has been included. -This sequence of operations was run: - Manager signed operations: - From: [CONTRACT_HASH] - Fee to the baker: ꜩ0.000456 - Expected counter: [EXPECTED_COUNTER] - Gas limit: 1949 - Storage limit: 0 bytes - Balance updates: - [CONTRACT_HASH] ... -ꜩ0.000456 - payload fees(the block proposer) ....... +ꜩ0.000456 - Transaction: - Amount: ꜩ0 - From: [CONTRACT_HASH] - To: [CONTRACT_HASH] - Entrypoint: clear - This transaction was successfully applied - Updated storage: {} - Storage size: 141 bytes - Consumed gas: 1848.199 - Ticket updates: - Ticketer: [CONTRACT_HASH] - Content type: string - Content: "A" - Account updates: - [CONTRACT_HASH] ... -1 - -Injected block at minimal timestamp diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestCreateRemoveTickets::test_add_clear_tickets_origination.out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestCreateRemoveTickets::test_add_clear_tickets_origination.out deleted file mode 100644 index 5310378e0f8d331d946b860280af3c4e7e2c71d5..0000000000000000000000000000000000000000 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestCreateRemoveTickets::test_add_clear_tickets_origination.out +++ /dev/null @@ -1,59 +0,0 @@ -tests_alpha/test_contract.py::TestCreateRemoveTickets::test_add_clear_tickets_origination - -Node is bootstrapped. -Estimated gas: 1437.760 units (will add 100 for safety) -Estimated storage: 398 bytes added (will add 20 for safety) -Operation successfully injected in the node. -Operation hash is '[BLOCK_HASH]' -NOT waiting for the operation to be included. -Use command - tezos-client wait for [BLOCK_HASH] to be included --confirmations 1 --branch [BLOCK_HASH] -and/or an external block explorer to make sure that it has been included. -This sequence of operations was run: - Manager signed operations: - From: [CONTRACT_HASH] - Fee to the baker: ꜩ0.000525 - Expected counter: [EXPECTED_COUNTER] - Gas limit: 1538 - Storage limit: 418 bytes - Balance updates: - [CONTRACT_HASH] ... -ꜩ0.000525 - payload fees(the block proposer) ....... +ꜩ0.000525 - Origination: - From: [CONTRACT_HASH] - Credit: ꜩ200 - Script: - { parameter (or (pair %add nat string) (unit %clear)) ; - storage (list (ticket string)) ; - code { UNPAIR ; - IF_LEFT - { UNPAIR ; - DIG 2 ; - SWAP ; - DIG 2 ; - TICKET ; - ASSERT_SOME ; - CONS ; - NIL operation ; - PAIR } - { DROP 2 ; NIL (ticket string) ; NIL operation ; PAIR } } } - Initial storage: {} - No delegate for this contract - This origination was successfully applied - Originated contracts: - [CONTRACT_HASH] - Storage size: 141 bytes - Paid storage size diff: 141 bytes - Consumed gas: 1437.760 - Balance updates: - [CONTRACT_HASH] ... -ꜩ0.03525 - storage fees ........................... +ꜩ0.03525 - [CONTRACT_HASH] ... -ꜩ0.06425 - storage fees ........................... +ꜩ0.06425 - [CONTRACT_HASH] ... -ꜩ200 - [CONTRACT_HASH] ... +ꜩ200 - -New contract [CONTRACT_HASH] originated. -Contract memorized as add_clear_tickets. -Injected block at minimal timestamp -[ [], [], [], [ "[BLOCK_HASH]" ] ] diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestSendTicketsInBigMap::test_receive_tickets_in_big_map_originate.out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestSendTicketsInBigMap::test_receive_tickets_in_big_map_originate.out deleted file mode 100644 index 515691374b0e3626f3f6fa96fc90ebbde84050a8..0000000000000000000000000000000000000000 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestSendTicketsInBigMap::test_receive_tickets_in_big_map_originate.out +++ /dev/null @@ -1,50 +0,0 @@ -tests_alpha/test_contract.py::TestSendTicketsInBigMap::test_receive_tickets_in_big_map_originate - -Node is bootstrapped. -Estimated gas: 1413.293 units (will add 100 for safety) -Estimated storage: 340 bytes added (will add 20 for safety) -Operation successfully injected in the node. -Operation hash is '[BLOCK_HASH]' -NOT waiting for the operation to be included. -Use command - tezos-client wait for [BLOCK_HASH] to be included --confirmations 1 --branch [BLOCK_HASH] -and/or an external block explorer to make sure that it has been included. -This sequence of operations was run: - Manager signed operations: - From: [CONTRACT_HASH] - Fee to the baker: ꜩ0.000435 - Expected counter: [EXPECTED_COUNTER] - Gas limit: 1514 - Storage limit: 360 bytes - Balance updates: - [CONTRACT_HASH] ... -ꜩ0.000435 - payload fees(the block proposer) ....... +ꜩ0.000435 - Origination: - From: [CONTRACT_HASH] - Credit: ꜩ200 - Script: - { parameter (big_map int (ticket string)) ; - storage (big_map int (ticket string)) ; - code { CAR ; NIL operation ; PAIR } } - Initial storage: {} - No delegate for this contract - This origination was successfully applied - Originated contracts: - [CONTRACT_HASH] - Storage size: 83 bytes - Updated big_maps: - New map(4) of type (big_map int (ticket string)) - Paid storage size diff: 83 bytes - Consumed gas: 1413.293 - Balance updates: - [CONTRACT_HASH] ... -ꜩ0.02075 - storage fees ........................... +ꜩ0.02075 - [CONTRACT_HASH] ... -ꜩ0.06425 - storage fees ........................... +ꜩ0.06425 - [CONTRACT_HASH] ... -ꜩ200 - [CONTRACT_HASH] ... +ꜩ200 - -New contract [CONTRACT_HASH] originated. -Contract memorized as receive_tickets_in_big_map. -Injected block at minimal timestamp -[ [], [], [], [ "[BLOCK_HASH]" ] ] diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestSendTicketsInBigMap::test_send_tickets_in_big_map.out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestSendTicketsInBigMap::test_send_tickets_in_big_map.out deleted file mode 100644 index e5c291586e75f0e2e6a24310c8b6720cbb84b868..0000000000000000000000000000000000000000 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestSendTicketsInBigMap::test_send_tickets_in_big_map.out +++ /dev/null @@ -1,161 +0,0 @@ -tests_alpha/test_contract.py::TestSendTicketsInBigMap::test_send_tickets_in_big_map - -Node is bootstrapped. -Estimated gas: 100522.148 units (will add 100 for safety) -Estimated storage: 10767 bytes added (will add 20 for safety) -Operation successfully injected in the node. -Operation hash is '[BLOCK_HASH]' -NOT waiting for the operation to be included. -Use command - tezos-client wait for [BLOCK_HASH] to be included --confirmations 1 --branch [BLOCK_HASH] -and/or an external block explorer to make sure that it has been included. -This sequence of operations was run: - Manager signed operations: - From: [CONTRACT_HASH] - Fee to the baker: ꜩ0.010359 - Expected counter: [EXPECTED_COUNTER] - Gas limit: 100623 - Storage limit: 10787 bytes - Balance updates: - [CONTRACT_HASH] ... -ꜩ0.010359 - payload fees(the block proposer) ....... +ꜩ0.010359 - Transaction: - Amount: ꜩ0 - From: [CONTRACT_HASH] - To: [CONTRACT_HASH] - Parameter: "[CONTRACT_HASH]" - This transaction was successfully applied - Updated storage: Unit - Updated big_maps: - New temp(1) of type (big_map int (ticket string)) - Set temp(1)[22] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[48] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[20] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[67] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[30] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[33] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[42] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[13] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[50] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[84] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[44] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[41] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[4] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[73] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[5] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[28] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[19] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[9] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[86] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[76] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[8] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[97] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[80] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[45] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[87] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[1] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[26] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[38] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[65] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[99] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[69] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[2] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[81] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[82] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[64] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[92] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[90] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[98] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[37] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[66] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[32] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[71] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[51] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[56] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[14] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[12] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[85] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[47] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[74] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[18] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[10] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[35] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[96] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[27] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[77] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[62] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[58] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[25] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[94] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[60] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[7] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[53] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[11] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[17] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[83] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[72] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[6] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[88] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[75] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[3] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[70] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[52] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[95] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[68] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[78] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[23] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[79] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[59] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[100] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[24] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[21] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[49] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[93] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[39] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[63] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[55] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[15] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[16] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[31] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[43] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[29] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[54] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[89] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[36] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[46] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[91] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[61] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[34] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[57] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Set temp(1)[40] to (Pair 0x01dec812a7cd2b422d52ce6a265e157fbfb6ef176600 (Pair "BLUE" 1)) - Storage size: 320 bytes - Paid storage size diff: 67 bytes - Consumed gas: 50713.048 - Balance updates: - [CONTRACT_HASH] ... -ꜩ0.01675 - storage fees ........................... +ꜩ0.01675 - Internal operations: - Internal Transaction: - Amount: ꜩ0 - From: [CONTRACT_HASH] - To: [CONTRACT_HASH] - Parameter: -1 - This transaction was successfully applied - Updated storage: 5 - Updated big_maps: - Clear map(4) - Copy temp(1) to map(5) - Storage size: 10783 bytes - Paid storage size diff: 10700 bytes - Consumed gas: 49809.100 - Balance updates: - [CONTRACT_HASH] ... -ꜩ2.675 - storage fees ........................... +ꜩ2.675 - Ticket updates: - Ticketer: [CONTRACT_HASH] - Content type: string - Content: "BLUE" - Account updates: - [CONTRACT_HASH] ... +100 - -Injected block at minimal timestamp diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestSendTicketsInBigMap::test_send_tickets_in_big_map_originate.out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestSendTicketsInBigMap::test_send_tickets_in_big_map_originate.out deleted file mode 100644 index 84386952d1a2d71d152212c9cc88fbf37e7bf1bb..0000000000000000000000000000000000000000 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestSendTicketsInBigMap::test_send_tickets_in_big_map_originate.out +++ /dev/null @@ -1,91 +0,0 @@ -tests_alpha/test_contract.py::TestSendTicketsInBigMap::test_send_tickets_in_big_map_originate - -Node is bootstrapped. -Estimated gas: 1497.127 units (will add 100 for safety) -Estimated storage: 577 bytes added (will add 20 for safety) -Operation successfully injected in the node. -Operation hash is '[BLOCK_HASH]' -NOT waiting for the operation to be included. -Use command - tezos-client wait for [BLOCK_HASH] to be included --confirmations 1 --branch [BLOCK_HASH] -and/or an external block explorer to make sure that it has been included. -This sequence of operations was run: - Manager signed operations: - From: [CONTRACT_HASH] - Fee to the baker: ꜩ0.00071 - Expected counter: [EXPECTED_COUNTER] - Gas limit: 1598 - Storage limit: 597 bytes - Balance updates: - [CONTRACT_HASH] ... -ꜩ0.00071 - payload fees(the block proposer) ....... +ꜩ0.00071 - Origination: - From: [CONTRACT_HASH] - Credit: ꜩ200 - Script: - { parameter address ; - storage unit ; - code { CAR ; - CONTRACT (big_map int (ticket string)) ; - IF_NONE - { PUSH string "Contract of type `big_map(ticket(string))` not found" ; - FAILWITH } - { EMPTY_BIG_MAP int (ticket string) ; - PUSH int 100 ; - SWAP ; - PAIR ; - LEFT (big_map int (ticket string)) ; - LOOP_LEFT - { UNPAIR ; - SWAP ; - DUP ; - DUG 2 ; - PUSH int 0 ; - COMPARE ; - LT ; - IF { PUSH int 1 ; - DUP 3 ; - SUB ; - SWAP ; - PUSH nat 1 ; - PUSH string "BLUE" ; - TICKET ; - ASSERT_SOME ; - DIG 3 ; - SWAP ; - SOME ; - SWAP ; - UPDATE ; - PAIR ; - LEFT (big_map int (ticket string)) } - { SWAP ; DROP ; RIGHT (pair (big_map int (ticket string)) int) } } ; - SWAP ; - PUSH mutez 0 ; - DIG 2 ; - TRANSFER_TOKENS ; - PUSH unit Unit ; - NIL operation ; - DIG 2 ; - CONS ; - PAIR } } } - Initial storage: Unit - No delegate for this contract - This origination was successfully applied - Originated contracts: - [CONTRACT_HASH] - Storage size: 320 bytes - Paid storage size diff: 320 bytes - Consumed gas: 1497.127 - Balance updates: - [CONTRACT_HASH] ... -ꜩ0.08 - storage fees ........................... +ꜩ0.08 - [CONTRACT_HASH] ... -ꜩ0.06425 - storage fees ........................... +ꜩ0.06425 - [CONTRACT_HASH] ... -ꜩ200 - [CONTRACT_HASH] ... +ꜩ200 - -New contract [CONTRACT_HASH] originated. -Contract memorized as send_tickets_in_big_map. -Injected block at minimal timestamp -[ [ "[BLOCK_HASH]" ], [], [], - [ "[BLOCK_HASH]" ] ] diff --git a/tests_python/tests_alpha/test_contract.py b/tests_python/tests_alpha/test_contract.py index f2addcdb1c9138c101938d27c2a5b73a45965230..773dfe9182df457307dd274e193a27cc80044177 100644 --- a/tests_python/tests_alpha/test_contract.py +++ b/tests_python/tests_alpha/test_contract.py @@ -2283,110 +2283,3 @@ code {{ self.check_contract_ko( client, kt1, None, root_type, type_mismatch_error ) - - -@pytest.mark.incremental -@pytest.mark.contract -@pytest.mark.regression -class TestCreateRemoveTickets: - def test_add_clear_tickets_origination( - self, client_regtest_scrubbed, session - ): - client = client_regtest_scrubbed - path = os.path.join( - CONTRACT_PATH, 'mini_scenarios', 'add_clear_tickets.tz' - ) - originate(client, session, path, '{}', 200) - - def test_add_clear_tickets_add_first_transfer( - self, client_regtest_scrubbed - ): - client = client_regtest_scrubbed - client.transfer( - 0, - 'bootstrap2', - 'add_clear_tickets', - ['--entrypoint', 'add', '--arg', 'Pair 1 "A"', '--burn-cap', '2'], - ) - utils.bake(client, 'bootstrap5') - - def test_add_clear_tickets_clear_transfer(self, client_regtest_scrubbed): - client = client_regtest_scrubbed - client.transfer( - 0, - 'bootstrap2', - 'add_clear_tickets', - ['--entrypoint', 'clear', '--arg', 'Unit', '--burn-cap', '2'], - ) - utils.bake(client, 'bootstrap5') - - def test_add_clear_tickets_add_second_transfer( - self, client_regtest_scrubbed - ): - client = client_regtest_scrubbed - client.transfer( - 0, - 'bootstrap2', - 'add_clear_tickets', - ['--entrypoint', 'add', '--arg', 'Pair 1 "B"', '--burn-cap', '2'], - ) - utils.bake(client, 'bootstrap5') - - def test_add_clear_tickets_add_third_transfer( - self, client_regtest_scrubbed - ): - client = client_regtest_scrubbed - client.transfer( - 0, - 'bootstrap2', - 'add_clear_tickets', - ['--entrypoint', 'add', '--arg', 'Pair 1 "C"', '--burn-cap', '2'], - ) - utils.bake(client, 'bootstrap5') - - -# This test originates two contracts. One for receiving a big-map with string -# tickets. Another for creating and sending a big-map with string tickets. -# Scanning the big-map for tickets uses the function [Big_map.list_key_values] -# so the regression tests include gas costs associated with calling this -# function. -@pytest.mark.incremental -@pytest.mark.contract -@pytest.mark.regression -class TestSendTicketsInBigMap: - def test_receive_tickets_in_big_map_originate( - self, client_regtest_scrubbed, session - ): - client = client_regtest_scrubbed - path = os.path.join( - CONTRACT_PATH, 'mini_scenarios', 'receive_tickets_in_big_map.tz' - ) - originate(client, session, path, '{}', 200) - session['receiver_address'] = session['contract'] - - def test_send_tickets_in_big_map_originate( - self, client_regtest_scrubbed, session - ): - client = client_regtest_scrubbed - path = os.path.join( - CONTRACT_PATH, 'mini_scenarios', 'send_tickets_in_big_map.tz' - ) - originate(client, session, path, 'Unit', 200) - - def test_send_tickets_in_big_map(self, client_regtest_scrubbed, session): - receiver_address = session['receiver_address'] - client = client_regtest_scrubbed - client.transfer( - 0, - 'bootstrap2', - 'send_tickets_in_big_map', - [ - '--arg', - f'"{receiver_address}"', - '--burn-cap', - '30', - '-storage-limit', - '1000000', - ], - ) - utils.bake(client, 'bootstrap5') diff --git a/tezt/tests/contracts/proto_alpha/add_clear_tickets.tz b/tezt/tests/contracts/proto_alpha/add_clear_tickets.tz new file mode 100644 index 0000000000000000000000000000000000000000..ed8cf6ce2b6d0b8ba1d46adf35851a35b275c288 --- /dev/null +++ b/tezt/tests/contracts/proto_alpha/add_clear_tickets.tz @@ -0,0 +1,6 @@ +parameter (or (pair %add nat string) (unit %clear)) ; +storage (list (ticket string)) ; +code { UNPAIR ; + IF_LEFT + { UNPAIR ; DIG 2 ; SWAP ; DIG 2 ; TICKET ; ASSERT_SOME ; CONS ; NIL operation ; PAIR } + { DROP 2 ; NIL (ticket string) ; NIL operation ; PAIR } } diff --git a/tezt/tests/contracts/proto_alpha/receive_tickets_in_big_map.tz b/tezt/tests/contracts/proto_alpha/receive_tickets_in_big_map.tz new file mode 100644 index 0000000000000000000000000000000000000000..f8af0da0173a8ed78123a365c7610bdf32c0e543 --- /dev/null +++ b/tezt/tests/contracts/proto_alpha/receive_tickets_in_big_map.tz @@ -0,0 +1,3 @@ +parameter (big_map int (ticket string)); +storage (big_map int (ticket string)); +code { CAR; NIL operation ; PAIR } diff --git a/tezt/tests/contracts/proto_alpha/send_tickets_in_big_map.tz b/tezt/tests/contracts/proto_alpha/send_tickets_in_big_map.tz new file mode 100644 index 0000000000000000000000000000000000000000..050d64cd607107258ddeb00cd90a53dc168832fd --- /dev/null +++ b/tezt/tests/contracts/proto_alpha/send_tickets_in_big_map.tz @@ -0,0 +1,47 @@ +# This contract takes an address, mints 100 string tickets, puts them in a +# big-map and sends the big-map to the given address. +parameter address ; +storage unit ; +code { CAR ; + CONTRACT (big_map int (ticket string)) ; + IF_NONE + { PUSH string "Contract of type `big_map(ticket(string))` not found" ; + FAILWITH } + { EMPTY_BIG_MAP int (ticket string) ; + PUSH int 100 ; + SWAP ; + PAIR ; + LEFT (big_map int (ticket string)) ; + LOOP_LEFT + { UNPAIR ; + SWAP ; + DUP ; + DUG 2 ; + PUSH int 0 ; + COMPARE ; + LT ; + IF { PUSH int 1 ; + DUP 3 ; + SUB ; + SWAP ; + PUSH nat 1 ; + PUSH string "BLUE" ; + TICKET ; + ASSERT_SOME ; + DIG 3 ; + SWAP ; + SOME ; + SWAP ; + UPDATE ; + PAIR ; + LEFT (big_map int (ticket string)) } + { SWAP ; DROP ; RIGHT (pair (big_map int (ticket string)) int) } } ; + SWAP ; + PUSH mutez 0 ; + DIG 2 ; + TRANSFER_TOKENS ; + PUSH unit Unit ; + NIL operation ; + DIG 2 ; + CONS ; + PAIR } } diff --git a/tezt/tests/contracts/proto_current_mainnet/add_clear_tickets.tz b/tezt/tests/contracts/proto_current_mainnet/add_clear_tickets.tz new file mode 100644 index 0000000000000000000000000000000000000000..9275b38a2c39c5d179921a14c15fae95316bd9e5 --- /dev/null +++ b/tezt/tests/contracts/proto_current_mainnet/add_clear_tickets.tz @@ -0,0 +1,6 @@ +parameter (or (pair %add nat string) (unit %clear)) ; +storage (list (ticket string)) ; +code { UNPAIR ; + IF_LEFT + { UNPAIR ; DIG 2 ; SWAP ; DIG 2 ; TICKET ; CONS ; NIL operation ; PAIR } + { DROP 2 ; NIL (ticket string) ; NIL operation ; PAIR } } diff --git a/tezt/tests/contracts/proto_current_mainnet/send_tickets_in_big_map.tz b/tezt/tests/contracts/proto_current_mainnet/send_tickets_in_big_map.tz new file mode 100644 index 0000000000000000000000000000000000000000..e8c27faf309805d39b5c8948e9d67f10bbad24ac --- /dev/null +++ b/tezt/tests/contracts/proto_current_mainnet/send_tickets_in_big_map.tz @@ -0,0 +1,46 @@ +# This contract takes an address, mints 100 string tickets, puts them in a +# big-map and sends the big-map to the given address. +parameter address ; +storage unit ; +code { CAR ; + CONTRACT (big_map int (ticket string)) ; + IF_NONE + { PUSH string "Contract of type `big_map(ticket(string))` not found" ; + FAILWITH } + { EMPTY_BIG_MAP int (ticket string) ; + PUSH int 100 ; + SWAP ; + PAIR ; + LEFT (big_map int (ticket string)) ; + LOOP_LEFT + { UNPAIR ; + SWAP ; + DUP ; + DUG 2 ; + PUSH int 0 ; + COMPARE ; + LT ; + IF { PUSH int 1 ; + DUP 3 ; + SUB ; + SWAP ; + PUSH nat 1 ; + PUSH string "BLUE" ; + TICKET ; + DIG 3 ; + SWAP ; + SOME ; + SWAP ; + UPDATE ; + PAIR ; + LEFT (big_map int (ticket string)) } + { SWAP ; DROP ; RIGHT (pair (big_map int (ticket string)) int) } } ; + SWAP ; + PUSH mutez 0 ; + DIG 2 ; + TRANSFER_TOKENS ; + PUSH unit Unit ; + NIL operation ; + DIG 2 ; + CONS ; + PAIR } } diff --git a/tezt/tests/expected/tickets.ml/Alpha- Create and remove tickets.out b/tezt/tests/expected/tickets.ml/Alpha- Create and remove tickets.out new file mode 100644 index 0000000000000000000000000000000000000000..82c227e5c9433f42d170491139cac41be375584f --- /dev/null +++ b/tezt/tests/expected/tickets.ml/Alpha- Create and remove tickets.out @@ -0,0 +1,220 @@ + +./tezos-client --mode mockup --wait none originate contract add_clear_tickets.tz transferring 200 from bootstrap1 running file:./tezt/tests/contracts/proto_alpha/add_clear_tickets.tz --init '{}' --burn-cap 1 +Node is bootstrapped. +Estimated gas: 1437.760 units (will add 100 for safety) +Estimated storage: 398 bytes added (will add 20 for safety) +Operation successfully injected in the node. +Operation hash is '[OPERATION_HASH]' +NOT waiting for the operation to be included. +Use command + tezos-client wait for [OPERATION_HASH] to be included --confirmations 1 --branch [BLOCK_HASH] +and/or an external block explorer to make sure that it has been included. +This sequence of operations was run: + Manager signed operations: + From: [PUBLIC_KEY_HASH] + Fee to the baker: ꜩ0.000525 + Expected counter: 1 + Gas limit: 1538 + Storage limit: 418 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000525 + payload fees(the block proposer) ....... +ꜩ0.000525 + Origination: + From: [PUBLIC_KEY_HASH] + Credit: ꜩ200 + Script: + { parameter (or (pair %add nat string) (unit %clear)) ; + storage (list (ticket string)) ; + code { UNPAIR ; + IF_LEFT + { UNPAIR ; + DIG 2 ; + SWAP ; + DIG 2 ; + TICKET ; + ASSERT_SOME ; + CONS ; + NIL operation ; + PAIR } + { DROP 2 ; NIL (ticket string) ; NIL operation ; PAIR } } } + Initial storage: {} + No delegate for this contract + This origination was successfully applied + Originated contracts: + [CONTRACT_HASH] + Storage size: 141 bytes + Paid storage size diff: 141 bytes + Consumed gas: 1437.760 + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.03525 + storage fees ........................... +ꜩ0.03525 + [PUBLIC_KEY_HASH] ... -ꜩ0.06425 + storage fees ........................... +ꜩ0.06425 + [PUBLIC_KEY_HASH] ... -ꜩ200 + [CONTRACT_HASH] ... +ꜩ200 + +New contract [CONTRACT_HASH] originated. +Contract memorized as add_clear_tickets.tz. + +./tezos-client --mode mockup --wait none transfer 0 from bootstrap2 to '[CONTRACT_HASH]' --burn-cap 2 --entrypoint add --arg 'Pair 1 "A"' +Node is bootstrapped. +Estimated gas: 2582.458 units (will add 100 for safety) +Estimated storage: 105 bytes added (will add 20 for safety) +Operation successfully injected in the node. +Operation hash is '[OPERATION_HASH]' +NOT waiting for the operation to be included. +Use command + tezos-client wait for [OPERATION_HASH] to be included --confirmations 1 --branch [BLOCK_HASH] +and/or an external block explorer to make sure that it has been included. +This sequence of operations was run: + Manager signed operations: + From: [PUBLIC_KEY_HASH] + Fee to the baker: ꜩ0.000536 + Expected counter: 1 + Gas limit: 2683 + Storage limit: 125 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000536 + payload fees(the block proposer) ....... +ꜩ0.000536 + Transaction: + Amount: ꜩ0 + From: [PUBLIC_KEY_HASH] + To: [CONTRACT_HASH] + Entrypoint: add + Parameter: (Pair 1 "A") + This transaction was successfully applied + Updated storage: + { Pair 0x0135c48b18c573e6d98d89ef9192f152c92c3ef39a00 (Pair "A" 1) } + Storage size: 180 bytes + Paid storage size diff: 105 bytes + Consumed gas: 2583.103 + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.02625 + storage fees ........................... +ꜩ0.02625 + Ticket updates: + Ticketer: [CONTRACT_HASH] + Content type: string + Content: "A" + Account updates: + [CONTRACT_HASH] ... +1 + + +./tezos-client --mode mockup --wait none transfer 0 from bootstrap2 to '[CONTRACT_HASH]' --burn-cap 2 --entrypoint clear --arg Unit +Node is bootstrapped. +Estimated gas: 2772.454 units (will add 100 for safety) +Estimated storage: no bytes added +Operation successfully injected in the node. +Operation hash is '[OPERATION_HASH]' +NOT waiting for the operation to be included. +Use command + tezos-client wait for [OPERATION_HASH] to be included --confirmations 1 --branch [BLOCK_HASH] +and/or an external block explorer to make sure that it has been included. +This sequence of operations was run: + Manager signed operations: + From: [PUBLIC_KEY_HASH] + Fee to the baker: ꜩ0.000549 + Expected counter: 2 + Gas limit: 2873 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000549 + payload fees(the block proposer) ....... +ꜩ0.000549 + Transaction: + Amount: ꜩ0 + From: [PUBLIC_KEY_HASH] + To: [CONTRACT_HASH] + Entrypoint: clear + This transaction was successfully applied + Updated storage: {} + Storage size: 141 bytes + Consumed gas: 2773.099 + Ticket updates: + Ticketer: [CONTRACT_HASH] + Content type: string + Content: "A" + Account updates: + [CONTRACT_HASH] ... -1 + + +./tezos-client --mode mockup --wait none transfer 0 from bootstrap2 to '[CONTRACT_HASH]' --burn-cap 2 --entrypoint add --arg 'Pair 1 "B"' +Node is bootstrapped. +Estimated gas: 2582.458 units (will add 100 for safety) +Estimated storage: no bytes added +Operation successfully injected in the node. +Operation hash is '[OPERATION_HASH]' +NOT waiting for the operation to be included. +Use command + tezos-client wait for [OPERATION_HASH] to be included --confirmations 1 --branch [BLOCK_HASH] +and/or an external block explorer to make sure that it has been included. +This sequence of operations was run: + Manager signed operations: + From: [PUBLIC_KEY_HASH] + Fee to the baker: ꜩ0.000536 + Expected counter: 3 + Gas limit: 2683 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000536 + payload fees(the block proposer) ....... +ꜩ0.000536 + Transaction: + Amount: ꜩ0 + From: [PUBLIC_KEY_HASH] + To: [CONTRACT_HASH] + Entrypoint: add + Parameter: (Pair 1 "B") + This transaction was successfully applied + Updated storage: + { Pair 0x0135c48b18c573e6d98d89ef9192f152c92c3ef39a00 (Pair "B" 1) } + Storage size: 180 bytes + Consumed gas: 2583.103 + Ticket updates: + Ticketer: [CONTRACT_HASH] + Content type: string + Content: "B" + Account updates: + [CONTRACT_HASH] ... +1 + + +./tezos-client --mode mockup --wait none transfer 0 from bootstrap2 to '[CONTRACT_HASH]' --burn-cap 2 --entrypoint add --arg 'Pair 1 "C"' +Node is bootstrapped. +Estimated gas: 3264.087 units (will add 100 for safety) +Estimated storage: 105 bytes added (will add 20 for safety) +Operation successfully injected in the node. +Operation hash is '[OPERATION_HASH]' +NOT waiting for the operation to be included. +Use command + tezos-client wait for [OPERATION_HASH] to be included --confirmations 1 --branch [BLOCK_HASH] +and/or an external block explorer to make sure that it has been included. +This sequence of operations was run: + Manager signed operations: + From: [PUBLIC_KEY_HASH] + Fee to the baker: ꜩ0.000604 + Expected counter: 4 + Gas limit: 3365 + Storage limit: 125 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000604 + payload fees(the block proposer) ....... +ꜩ0.000604 + Transaction: + Amount: ꜩ0 + From: [PUBLIC_KEY_HASH] + To: [CONTRACT_HASH] + Entrypoint: add + Parameter: (Pair 1 "C") + This transaction was successfully applied + Updated storage: + { Pair 0x0135c48b18c573e6d98d89ef9192f152c92c3ef39a00 (Pair "C" 1) ; + Pair 0x0135c48b18c573e6d98d89ef9192f152c92c3ef39a00 (Pair "B" 1) } + Storage size: 219 bytes + Paid storage size diff: 105 bytes + Consumed gas: 3264.732 + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.02625 + storage fees ........................... +ꜩ0.02625 + Ticket updates: + Ticketer: [CONTRACT_HASH] + Content type: string + Content: "C" + Account updates: + [CONTRACT_HASH] ... +1 + diff --git a/tezt/tests/expected/tickets.ml/Alpha- Send tickets in bigmap.out b/tezt/tests/expected/tickets.ml/Alpha- Send tickets in bigmap.out new file mode 100644 index 0000000000000000000000000000000000000000..db1270315c1104c44d3bdb4058321bb4587f01f6 --- /dev/null +++ b/tezt/tests/expected/tickets.ml/Alpha- Send tickets in bigmap.out @@ -0,0 +1,296 @@ + +./tezos-client --mode mockup --wait none originate contract receive_tickets_in_big_map.tz transferring 200 from bootstrap1 running file:./tezt/tests/contracts/proto_alpha/receive_tickets_in_big_map.tz --init '{}' --burn-cap 1 +Node is bootstrapped. +Estimated gas: 1413.293 units (will add 100 for safety) +Estimated storage: 340 bytes added (will add 20 for safety) +Operation successfully injected in the node. +Operation hash is '[OPERATION_HASH]' +NOT waiting for the operation to be included. +Use command + tezos-client wait for [OPERATION_HASH] to be included --confirmations 1 --branch [BLOCK_HASH] +and/or an external block explorer to make sure that it has been included. +This sequence of operations was run: + Manager signed operations: + From: [PUBLIC_KEY_HASH] + Fee to the baker: ꜩ0.000435 + Expected counter: 1 + Gas limit: 1514 + Storage limit: 360 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000435 + payload fees(the block proposer) ....... +ꜩ0.000435 + Origination: + From: [PUBLIC_KEY_HASH] + Credit: ꜩ200 + Script: + { parameter (big_map int (ticket string)) ; + storage (big_map int (ticket string)) ; + code { CAR ; NIL operation ; PAIR } } + Initial storage: {} + No delegate for this contract + This origination was successfully applied + Originated contracts: + [CONTRACT_HASH] + Storage size: 83 bytes + Updated big_maps: + New map(4) of type (big_map int (ticket string)) + Paid storage size diff: 83 bytes + Consumed gas: 1413.293 + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.02075 + storage fees ........................... +ꜩ0.02075 + [PUBLIC_KEY_HASH] ... -ꜩ0.06425 + storage fees ........................... +ꜩ0.06425 + [PUBLIC_KEY_HASH] ... -ꜩ200 + [CONTRACT_HASH] ... +ꜩ200 + +New contract [CONTRACT_HASH] originated. +Contract memorized as receive_tickets_in_big_map.tz. + +./tezos-client --mode mockup --wait none originate contract send_tickets_in_big_map.tz transferring 200 from bootstrap1 running file:./tezt/tests/contracts/proto_alpha/send_tickets_in_big_map.tz --init Unit --burn-cap 1 +Node is bootstrapped. +Estimated gas: 1497.127 units (will add 100 for safety) +Estimated storage: 577 bytes added (will add 20 for safety) +Operation successfully injected in the node. +Operation hash is '[OPERATION_HASH]' +NOT waiting for the operation to be included. +Use command + tezos-client wait for [OPERATION_HASH] to be included --confirmations 1 --branch [BLOCK_HASH] +and/or an external block explorer to make sure that it has been included. +This sequence of operations was run: + Manager signed operations: + From: [PUBLIC_KEY_HASH] + Fee to the baker: ꜩ0.00071 + Expected counter: 2 + Gas limit: 1598 + Storage limit: 597 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.00071 + payload fees(the block proposer) ....... +ꜩ0.00071 + Origination: + From: [PUBLIC_KEY_HASH] + Credit: ꜩ200 + Script: + { parameter address ; + storage unit ; + code { CAR ; + CONTRACT (big_map int (ticket string)) ; + IF_NONE + { PUSH string "Contract of type `big_map(ticket(string))` not found" ; + FAILWITH } + { EMPTY_BIG_MAP int (ticket string) ; + PUSH int 100 ; + SWAP ; + PAIR ; + LEFT (big_map int (ticket string)) ; + LOOP_LEFT + { UNPAIR ; + SWAP ; + DUP ; + DUG 2 ; + PUSH int 0 ; + COMPARE ; + LT ; + IF { PUSH int 1 ; + DUP 3 ; + SUB ; + SWAP ; + PUSH nat 1 ; + PUSH string "BLUE" ; + TICKET ; + ASSERT_SOME ; + DIG 3 ; + SWAP ; + SOME ; + SWAP ; + UPDATE ; + PAIR ; + LEFT (big_map int (ticket string)) } + { SWAP ; DROP ; RIGHT (pair (big_map int (ticket string)) int) } } ; + SWAP ; + PUSH mutez 0 ; + DIG 2 ; + TRANSFER_TOKENS ; + PUSH unit Unit ; + NIL operation ; + DIG 2 ; + CONS ; + PAIR } } } + Initial storage: Unit + No delegate for this contract + This origination was successfully applied + Originated contracts: + [CONTRACT_HASH] + Storage size: 320 bytes + Paid storage size diff: 320 bytes + Consumed gas: 1497.127 + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.08 + storage fees ........................... +ꜩ0.08 + [PUBLIC_KEY_HASH] ... -ꜩ0.06425 + storage fees ........................... +ꜩ0.06425 + [PUBLIC_KEY_HASH] ... -ꜩ200 + [CONTRACT_HASH] ... +ꜩ200 + +New contract [CONTRACT_HASH] originated. +Contract memorized as send_tickets_in_big_map.tz. + +./tezos-client --mode mockup --wait none transfer 0 from bootstrap2 to '[CONTRACT_HASH]' --burn-cap 30 --storage-limit 1000000 --arg '"[CONTRACT_HASH]"' +Node is bootstrapped. +Estimated gas: 100518.776 units (will add 100 for safety) +Estimated storage: 10767 bytes added (will add 20 for safety) +Operation successfully injected in the node. +Operation hash is '[OPERATION_HASH]' +NOT waiting for the operation to be included. +Use command + tezos-client wait for [OPERATION_HASH] to be included --confirmations 1 --branch [BLOCK_HASH] +and/or an external block explorer to make sure that it has been included. +This sequence of operations was run: + Manager signed operations: + From: [PUBLIC_KEY_HASH] + Fee to the baker: ꜩ0.010358 + Expected counter: 1 + Gas limit: 100619 + Storage limit: 10787 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.010358 + payload fees(the block proposer) ....... +ꜩ0.010358 + Transaction: + Amount: ꜩ0 + From: [PUBLIC_KEY_HASH] + To: [CONTRACT_HASH] + Parameter: "[CONTRACT_HASH]" + This transaction was successfully applied + Updated storage: Unit + Updated big_maps: + New temp(1) of type (big_map int (ticket string)) + Set temp(1)[22] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[48] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[20] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[67] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[30] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[33] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[42] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[13] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[50] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[84] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[44] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[41] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[4] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[73] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[5] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[28] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[19] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[9] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[86] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[76] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[8] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[97] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[80] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[45] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[87] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[1] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[26] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[38] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[65] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[99] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[69] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[2] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[81] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[82] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[64] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[92] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[90] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[98] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[37] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[66] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[32] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[71] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[51] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[56] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[14] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[12] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[85] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[47] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[74] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[18] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[10] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[35] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[96] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[27] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[77] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[62] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[58] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[25] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[94] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[60] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[7] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[53] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[11] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[17] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[83] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[72] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[6] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[88] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[75] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[3] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[70] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[52] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[95] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[68] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[78] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[23] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[79] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[59] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[100] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[24] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[21] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[49] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[93] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[39] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[63] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[55] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[15] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[16] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[31] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[43] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[29] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[54] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[89] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[36] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[46] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[91] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[61] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[34] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[57] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Set temp(1)[40] to (Pair 0x01e09c4d537373c6c8ca48684433c792ceb69c9dd200 (Pair "BLUE" 1)) + Storage size: 320 bytes + Paid storage size diff: 67 bytes + Consumed gas: 50712.463 + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.01675 + storage fees ........................... +ꜩ0.01675 + Internal operations: + Internal Transaction: + Amount: ꜩ0 + From: [CONTRACT_HASH] + To: [CONTRACT_HASH] + Parameter: -1 + This transaction was successfully applied + Updated storage: 5 + Updated big_maps: + Clear map(4) + Copy temp(1) to map(5) + Storage size: 10783 bytes + Paid storage size diff: 10700 bytes + Consumed gas: 49807.345 + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ2.675 + storage fees ........................... +ꜩ2.675 + Ticket updates: + Ticketer: [CONTRACT_HASH] + Content type: string + Content: "BLUE" + Account updates: + [CONTRACT_HASH] ... +100 + diff --git a/tezt/tests/expected/tickets.ml/Jakarta- Create and remove tickets.out b/tezt/tests/expected/tickets.ml/Jakarta- Create and remove tickets.out new file mode 100644 index 0000000000000000000000000000000000000000..2f96eeb1010e6caf793f1c0319d2856b22838b25 --- /dev/null +++ b/tezt/tests/expected/tickets.ml/Jakarta- Create and remove tickets.out @@ -0,0 +1,188 @@ + +./tezos-client --mode mockup --wait none originate contract add_clear_tickets.tz transferring 200 from bootstrap1 running file:./tezt/tests/contracts/proto_current_mainnet/add_clear_tickets.tz --init '{}' --burn-cap 1 +Node is bootstrapped. +Estimated gas: 1427.512 units (will add 100 for safety) +Estimated storage: 372 bytes added (will add 20 for safety) +Operation successfully injected in the node. +Operation hash is '[OPERATION_HASH]' +NOT waiting for the operation to be included. +Use command + tezos-client wait for [OPERATION_HASH] to be included --confirmations 1 --branch [BLOCK_HASH] +and/or an external block explorer to make sure that it has been included. +This sequence of operations was run: + Manager signed operations: + From: [PUBLIC_KEY_HASH] + Fee to the baker: ꜩ0.000498 + Expected counter: 1 + Gas limit: 1528 + Storage limit: 392 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000498 + payload fees(the block proposer) ....... +ꜩ0.000498 + Origination: + From: [PUBLIC_KEY_HASH] + Credit: ꜩ200 + Script: + { parameter (or (pair %add nat string) (unit %clear)) ; + storage (list (ticket string)) ; + code { UNPAIR ; + IF_LEFT + { UNPAIR ; DIG 2 ; SWAP ; DIG 2 ; TICKET ; CONS ; NIL operation ; PAIR } + { DROP 2 ; NIL (ticket string) ; NIL operation ; PAIR } } } + Initial storage: {} + No delegate for this contract + This origination was successfully applied + Originated contracts: + [CONTRACT_HASH] + Storage size: 115 bytes + Paid storage size diff: 115 bytes + Consumed gas: 1427.512 + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.02875 + storage fees ........................... +ꜩ0.02875 + [PUBLIC_KEY_HASH] ... -ꜩ0.06425 + storage fees ........................... +ꜩ0.06425 + [PUBLIC_KEY_HASH] ... -ꜩ200 + [CONTRACT_HASH] ... +ꜩ200 + +New contract [CONTRACT_HASH] originated. +Contract memorized as add_clear_tickets.tz. + +./tezos-client --mode mockup --wait none transfer 0 from bootstrap2 to '[CONTRACT_HASH]' --burn-cap 2 --entrypoint add --arg 'Pair 1 "A"' +Node is bootstrapped. +Estimated gas: 2575.372 units (will add 100 for safety) +Estimated storage: 105 bytes added (will add 20 for safety) +Operation successfully injected in the node. +Operation hash is '[OPERATION_HASH]' +NOT waiting for the operation to be included. +Use command + tezos-client wait for [OPERATION_HASH] to be included --confirmations 1 --branch [BLOCK_HASH] +and/or an external block explorer to make sure that it has been included. +This sequence of operations was run: + Manager signed operations: + From: [PUBLIC_KEY_HASH] + Fee to the baker: ꜩ0.000535 + Expected counter: 1 + Gas limit: 2676 + Storage limit: 125 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000535 + payload fees(the block proposer) ....... +ꜩ0.000535 + Transaction: + Amount: ꜩ0 + From: [PUBLIC_KEY_HASH] + To: [CONTRACT_HASH] + Entrypoint: add + Parameter: (Pair 1 "A") + This transaction was successfully applied + Updated storage: + { Pair 0x017cc48689b532761b262981ee46d8a5065939522a00 (Pair "A" 1) } + Storage size: 154 bytes + Paid storage size diff: 105 bytes + Consumed gas: 2576.227 + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.02625 + storage fees ........................... +ꜩ0.02625 + + +./tezos-client --mode mockup --wait none transfer 0 from bootstrap2 to '[CONTRACT_HASH]' --burn-cap 2 --entrypoint clear --arg Unit +Node is bootstrapped. +Estimated gas: 2766.153 units (will add 100 for safety) +Estimated storage: no bytes added +Operation successfully injected in the node. +Operation hash is '[OPERATION_HASH]' +NOT waiting for the operation to be included. +Use command + tezos-client wait for [OPERATION_HASH] to be included --confirmations 1 --branch [BLOCK_HASH] +and/or an external block explorer to make sure that it has been included. +This sequence of operations was run: + Manager signed operations: + From: [PUBLIC_KEY_HASH] + Fee to the baker: ꜩ0.000548 + Expected counter: 2 + Gas limit: 2867 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000548 + payload fees(the block proposer) ....... +ꜩ0.000548 + Transaction: + Amount: ꜩ0 + From: [PUBLIC_KEY_HASH] + To: [CONTRACT_HASH] + Entrypoint: clear + This transaction was successfully applied + Updated storage: {} + Storage size: 115 bytes + Consumed gas: 2767.008 + + +./tezos-client --mode mockup --wait none transfer 0 from bootstrap2 to '[CONTRACT_HASH]' --burn-cap 2 --entrypoint add --arg 'Pair 1 "B"' +Node is bootstrapped. +Estimated gas: 2575.372 units (will add 100 for safety) +Estimated storage: no bytes added +Operation successfully injected in the node. +Operation hash is '[OPERATION_HASH]' +NOT waiting for the operation to be included. +Use command + tezos-client wait for [OPERATION_HASH] to be included --confirmations 1 --branch [BLOCK_HASH] +and/or an external block explorer to make sure that it has been included. +This sequence of operations was run: + Manager signed operations: + From: [PUBLIC_KEY_HASH] + Fee to the baker: ꜩ0.000535 + Expected counter: 3 + Gas limit: 2676 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000535 + payload fees(the block proposer) ....... +ꜩ0.000535 + Transaction: + Amount: ꜩ0 + From: [PUBLIC_KEY_HASH] + To: [CONTRACT_HASH] + Entrypoint: add + Parameter: (Pair 1 "B") + This transaction was successfully applied + Updated storage: + { Pair 0x017cc48689b532761b262981ee46d8a5065939522a00 (Pair "B" 1) } + Storage size: 154 bytes + Consumed gas: 2576.227 + + +./tezos-client --mode mockup --wait none transfer 0 from bootstrap2 to '[CONTRACT_HASH]' --burn-cap 2 --entrypoint add --arg 'Pair 1 "C"' +Node is bootstrapped. +Estimated gas: 3253.393 units (will add 100 for safety) +Estimated storage: 105 bytes added (will add 20 for safety) +Operation successfully injected in the node. +Operation hash is '[OPERATION_HASH]' +NOT waiting for the operation to be included. +Use command + tezos-client wait for [OPERATION_HASH] to be included --confirmations 1 --branch [BLOCK_HASH] +and/or an external block explorer to make sure that it has been included. +This sequence of operations was run: + Manager signed operations: + From: [PUBLIC_KEY_HASH] + Fee to the baker: ꜩ0.000603 + Expected counter: 4 + Gas limit: 3354 + Storage limit: 125 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000603 + payload fees(the block proposer) ....... +ꜩ0.000603 + Transaction: + Amount: ꜩ0 + From: [PUBLIC_KEY_HASH] + To: [CONTRACT_HASH] + Entrypoint: add + Parameter: (Pair 1 "C") + This transaction was successfully applied + Updated storage: + { Pair 0x017cc48689b532761b262981ee46d8a5065939522a00 (Pair "C" 1) ; + Pair 0x017cc48689b532761b262981ee46d8a5065939522a00 (Pair "B" 1) } + Storage size: 193 bytes + Paid storage size diff: 105 bytes + Consumed gas: 3254.248 + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.02625 + storage fees ........................... +ꜩ0.02625 + diff --git a/tezt/tests/expected/tickets.ml/Jakarta- Send tickets in bigmap.out b/tezt/tests/expected/tickets.ml/Jakarta- Send tickets in bigmap.out new file mode 100644 index 0000000000000000000000000000000000000000..f27b922417f1de917b4969a42d9b5489f823d450 --- /dev/null +++ b/tezt/tests/expected/tickets.ml/Jakarta- Send tickets in bigmap.out @@ -0,0 +1,289 @@ + +./tezos-client --mode mockup --wait none originate contract receive_tickets_in_big_map.tz transferring 200 from bootstrap1 running file:./tezt/tests/contracts/proto_alpha/receive_tickets_in_big_map.tz --init '{}' --burn-cap 1 +Node is bootstrapped. +Estimated gas: 1411.603 units (will add 100 for safety) +Estimated storage: 340 bytes added (will add 20 for safety) +Operation successfully injected in the node. +Operation hash is '[OPERATION_HASH]' +NOT waiting for the operation to be included. +Use command + tezos-client wait for [OPERATION_HASH] to be included --confirmations 1 --branch [BLOCK_HASH] +and/or an external block explorer to make sure that it has been included. +This sequence of operations was run: + Manager signed operations: + From: [PUBLIC_KEY_HASH] + Fee to the baker: ꜩ0.000435 + Expected counter: 1 + Gas limit: 1512 + Storage limit: 360 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000435 + payload fees(the block proposer) ....... +ꜩ0.000435 + Origination: + From: [PUBLIC_KEY_HASH] + Credit: ꜩ200 + Script: + { parameter (big_map int (ticket string)) ; + storage (big_map int (ticket string)) ; + code { CAR ; NIL operation ; PAIR } } + Initial storage: {} + No delegate for this contract + This origination was successfully applied + Originated contracts: + [CONTRACT_HASH] + Storage size: 83 bytes + Updated big_maps: + New map(4) of type (big_map int (ticket string)) + Paid storage size diff: 83 bytes + Consumed gas: 1411.603 + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.02075 + storage fees ........................... +ꜩ0.02075 + [PUBLIC_KEY_HASH] ... -ꜩ0.06425 + storage fees ........................... +ꜩ0.06425 + [PUBLIC_KEY_HASH] ... -ꜩ200 + [CONTRACT_HASH] ... +ꜩ200 + +New contract [CONTRACT_HASH] originated. +Contract memorized as receive_tickets_in_big_map.tz. + +./tezos-client --mode mockup --wait none originate contract send_tickets_in_big_map.tz transferring 200 from bootstrap1 running file:./tezt/tests/contracts/proto_current_mainnet/send_tickets_in_big_map.tz --init Unit --burn-cap 1 +Node is bootstrapped. +Estimated gas: 1480.193 units (will add 100 for safety) +Estimated storage: 551 bytes added (will add 20 for safety) +Operation successfully injected in the node. +Operation hash is '[OPERATION_HASH]' +NOT waiting for the operation to be included. +Use command + tezos-client wait for [OPERATION_HASH] to be included --confirmations 1 --branch [BLOCK_HASH] +and/or an external block explorer to make sure that it has been included. +This sequence of operations was run: + Manager signed operations: + From: [PUBLIC_KEY_HASH] + Fee to the baker: ꜩ0.000683 + Expected counter: 2 + Gas limit: 1581 + Storage limit: 571 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000683 + payload fees(the block proposer) ....... +ꜩ0.000683 + Origination: + From: [PUBLIC_KEY_HASH] + Credit: ꜩ200 + Script: + { parameter address ; + storage unit ; + code { CAR ; + CONTRACT (big_map int (ticket string)) ; + IF_NONE + { PUSH string "Contract of type `big_map(ticket(string))` not found" ; + FAILWITH } + { EMPTY_BIG_MAP int (ticket string) ; + PUSH int 100 ; + SWAP ; + PAIR ; + LEFT (big_map int (ticket string)) ; + LOOP_LEFT + { UNPAIR ; + SWAP ; + DUP ; + DUG 2 ; + PUSH int 0 ; + COMPARE ; + LT ; + IF { PUSH int 1 ; + DUP 3 ; + SUB ; + SWAP ; + PUSH nat 1 ; + PUSH string "BLUE" ; + TICKET ; + DIG 3 ; + SWAP ; + SOME ; + SWAP ; + UPDATE ; + PAIR ; + LEFT (big_map int (ticket string)) } + { SWAP ; DROP ; RIGHT (pair (big_map int (ticket string)) int) } } ; + SWAP ; + PUSH mutez 0 ; + DIG 2 ; + TRANSFER_TOKENS ; + PUSH unit Unit ; + NIL operation ; + DIG 2 ; + CONS ; + PAIR } } } + Initial storage: Unit + No delegate for this contract + This origination was successfully applied + Originated contracts: + [CONTRACT_HASH] + Storage size: 294 bytes + Paid storage size diff: 294 bytes + Consumed gas: 1480.193 + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.0735 + storage fees ........................... +ꜩ0.0735 + [PUBLIC_KEY_HASH] ... -ꜩ0.06425 + storage fees ........................... +ꜩ0.06425 + [PUBLIC_KEY_HASH] ... -ꜩ200 + [CONTRACT_HASH] ... +ꜩ200 + +New contract [CONTRACT_HASH] originated. +Contract memorized as send_tickets_in_big_map.tz. + +./tezos-client --mode mockup --wait none transfer 0 from bootstrap2 to '[CONTRACT_HASH]' --burn-cap 30 --storage-limit 1000000 --arg '"[CONTRACT_HASH]"' +Node is bootstrapped. +Estimated gas: 100118.342 units (will add 100 for safety) +Estimated storage: 10767 bytes added (will add 20 for safety) +Operation successfully injected in the node. +Operation hash is '[OPERATION_HASH]' +NOT waiting for the operation to be included. +Use command + tezos-client wait for [OPERATION_HASH] to be included --confirmations 1 --branch [BLOCK_HASH] +and/or an external block explorer to make sure that it has been included. +This sequence of operations was run: + Manager signed operations: + From: [PUBLIC_KEY_HASH] + Fee to the baker: ꜩ0.010318 + Expected counter: 1 + Gas limit: 100219 + Storage limit: 10787 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.010318 + payload fees(the block proposer) ....... +ꜩ0.010318 + Transaction: + Amount: ꜩ0 + From: [PUBLIC_KEY_HASH] + To: [CONTRACT_HASH] + Parameter: "[CONTRACT_HASH]" + This transaction was successfully applied + Updated storage: Unit + Updated big_maps: + New temp(1) of type (big_map int (ticket string)) + Set temp(1)[22] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[48] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[20] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[67] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[30] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[33] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[42] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[13] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[50] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[84] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[44] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[41] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[4] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[73] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[5] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[28] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[19] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[9] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[86] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[76] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[8] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[97] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[80] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[45] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[87] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[1] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[26] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[38] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[65] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[99] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[69] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[2] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[81] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[82] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[64] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[92] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[90] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[98] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[37] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[66] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[32] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[71] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[51] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[56] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[14] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[12] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[85] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[47] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[74] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[18] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[10] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[35] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[96] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[27] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[77] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[62] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[58] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[25] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[94] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[60] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[7] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[53] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[11] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[17] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[83] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[72] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[6] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[88] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[75] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[3] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[70] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[52] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[95] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[68] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[78] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[23] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[79] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[59] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[100] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[24] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[21] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[49] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[93] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[39] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[63] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[55] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[15] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[16] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[31] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[43] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[29] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[54] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[89] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[36] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[46] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[91] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[61] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[34] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[57] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Set temp(1)[40] to (Pair 0x019f62ea58611c1308a4d0d4919966a02356ef627200 (Pair "BLUE" 1)) + Storage size: 294 bytes + Paid storage size diff: 67 bytes + Consumed gas: 51526.736 + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.01675 + storage fees ........................... +ꜩ0.01675 + Internal operations: + Transaction: + Amount: ꜩ0 + From: [CONTRACT_HASH] + To: [CONTRACT_HASH] + Parameter: -1 + This transaction was successfully applied + Updated storage: 5 + Updated big_maps: + Clear map(4) + Copy temp(1) to map(5) + Storage size: 10783 bytes + Paid storage size diff: 10700 bytes + Consumed gas: 48592.803 + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ2.675 + storage fees ........................... +ꜩ2.675 + diff --git a/tezt/tests/expected/tickets.ml/Kathmandu- Create and remove tickets.out b/tezt/tests/expected/tickets.ml/Kathmandu- Create and remove tickets.out new file mode 100644 index 0000000000000000000000000000000000000000..285171ea40acbbff6a661083950833dde170ee9b --- /dev/null +++ b/tezt/tests/expected/tickets.ml/Kathmandu- Create and remove tickets.out @@ -0,0 +1,188 @@ + +./tezos-client --mode mockup --wait none originate contract add_clear_tickets.tz transferring 200 from bootstrap1 running file:./tezt/tests/contracts/proto_current_mainnet/add_clear_tickets.tz --init '{}' --burn-cap 1 +Node is bootstrapped. +Estimated gas: 1427.482 units (will add 100 for safety) +Estimated storage: 372 bytes added (will add 20 for safety) +Operation successfully injected in the node. +Operation hash is '[OPERATION_HASH]' +NOT waiting for the operation to be included. +Use command + tezos-client wait for [OPERATION_HASH] to be included --confirmations 1 --branch [BLOCK_HASH] +and/or an external block explorer to make sure that it has been included. +This sequence of operations was run: + Manager signed operations: + From: [PUBLIC_KEY_HASH] + Fee to the baker: ꜩ0.000498 + Expected counter: 1 + Gas limit: 1528 + Storage limit: 392 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000498 + payload fees(the block proposer) ....... +ꜩ0.000498 + Origination: + From: [PUBLIC_KEY_HASH] + Credit: ꜩ200 + Script: + { parameter (or (pair %add nat string) (unit %clear)) ; + storage (list (ticket string)) ; + code { UNPAIR ; + IF_LEFT + { UNPAIR ; DIG 2 ; SWAP ; DIG 2 ; TICKET ; CONS ; NIL operation ; PAIR } + { DROP 2 ; NIL (ticket string) ; NIL operation ; PAIR } } } + Initial storage: {} + No delegate for this contract + This origination was successfully applied + Originated contracts: + [CONTRACT_HASH] + Storage size: 115 bytes + Paid storage size diff: 115 bytes + Consumed gas: 1427.482 + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.02875 + storage fees ........................... +ꜩ0.02875 + [PUBLIC_KEY_HASH] ... -ꜩ0.06425 + storage fees ........................... +ꜩ0.06425 + [PUBLIC_KEY_HASH] ... -ꜩ200 + [CONTRACT_HASH] ... +ꜩ200 + +New contract [CONTRACT_HASH] originated. +Contract memorized as add_clear_tickets.tz. + +./tezos-client --mode mockup --wait none transfer 0 from bootstrap2 to '[CONTRACT_HASH]' --burn-cap 2 --entrypoint add --arg 'Pair 1 "A"' +Node is bootstrapped. +Estimated gas: 2575.389 units (will add 100 for safety) +Estimated storage: 105 bytes added (will add 20 for safety) +Operation successfully injected in the node. +Operation hash is '[OPERATION_HASH]' +NOT waiting for the operation to be included. +Use command + tezos-client wait for [OPERATION_HASH] to be included --confirmations 1 --branch [BLOCK_HASH] +and/or an external block explorer to make sure that it has been included. +This sequence of operations was run: + Manager signed operations: + From: [PUBLIC_KEY_HASH] + Fee to the baker: ꜩ0.000535 + Expected counter: 1 + Gas limit: 2676 + Storage limit: 125 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000535 + payload fees(the block proposer) ....... +ꜩ0.000535 + Transaction: + Amount: ꜩ0 + From: [PUBLIC_KEY_HASH] + To: [CONTRACT_HASH] + Entrypoint: add + Parameter: (Pair 1 "A") + This transaction was successfully applied + Updated storage: + { Pair 0x017cc48689b532761b262981ee46d8a5065939522a00 (Pair "A" 1) } + Storage size: 154 bytes + Paid storage size diff: 105 bytes + Consumed gas: 2576.077 + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.02625 + storage fees ........................... +ꜩ0.02625 + + +./tezos-client --mode mockup --wait none transfer 0 from bootstrap2 to '[CONTRACT_HASH]' --burn-cap 2 --entrypoint clear --arg Unit +Node is bootstrapped. +Estimated gas: 2766.213 units (will add 100 for safety) +Estimated storage: no bytes added +Operation successfully injected in the node. +Operation hash is '[OPERATION_HASH]' +NOT waiting for the operation to be included. +Use command + tezos-client wait for [OPERATION_HASH] to be included --confirmations 1 --branch [BLOCK_HASH] +and/or an external block explorer to make sure that it has been included. +This sequence of operations was run: + Manager signed operations: + From: [PUBLIC_KEY_HASH] + Fee to the baker: ꜩ0.000548 + Expected counter: 2 + Gas limit: 2867 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000548 + payload fees(the block proposer) ....... +ꜩ0.000548 + Transaction: + Amount: ꜩ0 + From: [PUBLIC_KEY_HASH] + To: [CONTRACT_HASH] + Entrypoint: clear + This transaction was successfully applied + Updated storage: {} + Storage size: 115 bytes + Consumed gas: 2766.858 + + +./tezos-client --mode mockup --wait none transfer 0 from bootstrap2 to '[CONTRACT_HASH]' --burn-cap 2 --entrypoint add --arg 'Pair 1 "B"' +Node is bootstrapped. +Estimated gas: 2575.389 units (will add 100 for safety) +Estimated storage: no bytes added +Operation successfully injected in the node. +Operation hash is '[OPERATION_HASH]' +NOT waiting for the operation to be included. +Use command + tezos-client wait for [OPERATION_HASH] to be included --confirmations 1 --branch [BLOCK_HASH] +and/or an external block explorer to make sure that it has been included. +This sequence of operations was run: + Manager signed operations: + From: [PUBLIC_KEY_HASH] + Fee to the baker: ꜩ0.000535 + Expected counter: 3 + Gas limit: 2676 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000535 + payload fees(the block proposer) ....... +ꜩ0.000535 + Transaction: + Amount: ꜩ0 + From: [PUBLIC_KEY_HASH] + To: [CONTRACT_HASH] + Entrypoint: add + Parameter: (Pair 1 "B") + This transaction was successfully applied + Updated storage: + { Pair 0x017cc48689b532761b262981ee46d8a5065939522a00 (Pair "B" 1) } + Storage size: 154 bytes + Consumed gas: 2576.077 + + +./tezos-client --mode mockup --wait none transfer 0 from bootstrap2 to '[CONTRACT_HASH]' --burn-cap 2 --entrypoint add --arg 'Pair 1 "C"' +Node is bootstrapped. +Estimated gas: 3253.573 units (will add 100 for safety) +Estimated storage: 105 bytes added (will add 20 for safety) +Operation successfully injected in the node. +Operation hash is '[OPERATION_HASH]' +NOT waiting for the operation to be included. +Use command + tezos-client wait for [OPERATION_HASH] to be included --confirmations 1 --branch [BLOCK_HASH] +and/or an external block explorer to make sure that it has been included. +This sequence of operations was run: + Manager signed operations: + From: [PUBLIC_KEY_HASH] + Fee to the baker: ꜩ0.000603 + Expected counter: 4 + Gas limit: 3354 + Storage limit: 125 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000603 + payload fees(the block proposer) ....... +ꜩ0.000603 + Transaction: + Amount: ꜩ0 + From: [PUBLIC_KEY_HASH] + To: [CONTRACT_HASH] + Entrypoint: add + Parameter: (Pair 1 "C") + This transaction was successfully applied + Updated storage: + { Pair 0x017cc48689b532761b262981ee46d8a5065939522a00 (Pair "C" 1) ; + Pair 0x017cc48689b532761b262981ee46d8a5065939522a00 (Pair "B" 1) } + Storage size: 193 bytes + Paid storage size diff: 105 bytes + Consumed gas: 3254.218 + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.02625 + storage fees ........................... +ꜩ0.02625 + diff --git a/tezt/tests/expected/tickets.ml/Kathmandu- Send tickets in bigmap.out b/tezt/tests/expected/tickets.ml/Kathmandu- Send tickets in bigmap.out new file mode 100644 index 0000000000000000000000000000000000000000..ff8b911b2d08fe0cf1cb7e4dcc15dbfa12d63c93 --- /dev/null +++ b/tezt/tests/expected/tickets.ml/Kathmandu- Send tickets in bigmap.out @@ -0,0 +1,289 @@ + +./tezos-client --mode mockup --wait none originate contract receive_tickets_in_big_map.tz transferring 200 from bootstrap1 running file:./tezt/tests/contracts/proto_alpha/receive_tickets_in_big_map.tz --init '{}' --burn-cap 1 +Node is bootstrapped. +Estimated gas: 1411.468 units (will add 100 for safety) +Estimated storage: 340 bytes added (will add 20 for safety) +Operation successfully injected in the node. +Operation hash is '[OPERATION_HASH]' +NOT waiting for the operation to be included. +Use command + tezos-client wait for [OPERATION_HASH] to be included --confirmations 1 --branch [BLOCK_HASH] +and/or an external block explorer to make sure that it has been included. +This sequence of operations was run: + Manager signed operations: + From: [PUBLIC_KEY_HASH] + Fee to the baker: ꜩ0.000435 + Expected counter: 1 + Gas limit: 1512 + Storage limit: 360 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000435 + payload fees(the block proposer) ....... +ꜩ0.000435 + Origination: + From: [PUBLIC_KEY_HASH] + Credit: ꜩ200 + Script: + { parameter (big_map int (ticket string)) ; + storage (big_map int (ticket string)) ; + code { CAR ; NIL operation ; PAIR } } + Initial storage: {} + No delegate for this contract + This origination was successfully applied + Originated contracts: + [CONTRACT_HASH] + Storage size: 83 bytes + Updated big_maps: + New map(4) of type (big_map int (ticket string)) + Paid storage size diff: 83 bytes + Consumed gas: 1411.468 + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.02075 + storage fees ........................... +ꜩ0.02075 + [PUBLIC_KEY_HASH] ... -ꜩ0.06425 + storage fees ........................... +ꜩ0.06425 + [PUBLIC_KEY_HASH] ... -ꜩ200 + [CONTRACT_HASH] ... +ꜩ200 + +New contract [CONTRACT_HASH] originated. +Contract memorized as receive_tickets_in_big_map.tz. + +./tezos-client --mode mockup --wait none originate contract send_tickets_in_big_map.tz transferring 200 from bootstrap1 running file:./tezt/tests/contracts/proto_current_mainnet/send_tickets_in_big_map.tz --init Unit --burn-cap 1 +Node is bootstrapped. +Estimated gas: 1479.998 units (will add 100 for safety) +Estimated storage: 551 bytes added (will add 20 for safety) +Operation successfully injected in the node. +Operation hash is '[OPERATION_HASH]' +NOT waiting for the operation to be included. +Use command + tezos-client wait for [OPERATION_HASH] to be included --confirmations 1 --branch [BLOCK_HASH] +and/or an external block explorer to make sure that it has been included. +This sequence of operations was run: + Manager signed operations: + From: [PUBLIC_KEY_HASH] + Fee to the baker: ꜩ0.000682 + Expected counter: 2 + Gas limit: 1580 + Storage limit: 571 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000682 + payload fees(the block proposer) ....... +ꜩ0.000682 + Origination: + From: [PUBLIC_KEY_HASH] + Credit: ꜩ200 + Script: + { parameter address ; + storage unit ; + code { CAR ; + CONTRACT (big_map int (ticket string)) ; + IF_NONE + { PUSH string "Contract of type `big_map(ticket(string))` not found" ; + FAILWITH } + { EMPTY_BIG_MAP int (ticket string) ; + PUSH int 100 ; + SWAP ; + PAIR ; + LEFT (big_map int (ticket string)) ; + LOOP_LEFT + { UNPAIR ; + SWAP ; + DUP ; + DUG 2 ; + PUSH int 0 ; + COMPARE ; + LT ; + IF { PUSH int 1 ; + DUP 3 ; + SUB ; + SWAP ; + PUSH nat 1 ; + PUSH string "BLUE" ; + TICKET ; + DIG 3 ; + SWAP ; + SOME ; + SWAP ; + UPDATE ; + PAIR ; + LEFT (big_map int (ticket string)) } + { SWAP ; DROP ; RIGHT (pair (big_map int (ticket string)) int) } } ; + SWAP ; + PUSH mutez 0 ; + DIG 2 ; + TRANSFER_TOKENS ; + PUSH unit Unit ; + NIL operation ; + DIG 2 ; + CONS ; + PAIR } } } + Initial storage: Unit + No delegate for this contract + This origination was successfully applied + Originated contracts: + [CONTRACT_HASH] + Storage size: 294 bytes + Paid storage size diff: 294 bytes + Consumed gas: 1479.998 + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.0735 + storage fees ........................... +ꜩ0.0735 + [PUBLIC_KEY_HASH] ... -ꜩ0.06425 + storage fees ........................... +ꜩ0.06425 + [PUBLIC_KEY_HASH] ... -ꜩ200 + [CONTRACT_HASH] ... +ꜩ200 + +New contract [CONTRACT_HASH] originated. +Contract memorized as send_tickets_in_big_map.tz. + +./tezos-client --mode mockup --wait none transfer 0 from bootstrap2 to '[CONTRACT_HASH]' --burn-cap 30 --storage-limit 1000000 --arg '"[CONTRACT_HASH]"' +Node is bootstrapped. +Estimated gas: 100128.602 units (will add 100 for safety) +Estimated storage: 10767 bytes added (will add 20 for safety) +Operation successfully injected in the node. +Operation hash is '[OPERATION_HASH]' +NOT waiting for the operation to be included. +Use command + tezos-client wait for [OPERATION_HASH] to be included --confirmations 1 --branch [BLOCK_HASH] +and/or an external block explorer to make sure that it has been included. +This sequence of operations was run: + Manager signed operations: + From: [PUBLIC_KEY_HASH] + Fee to the baker: ꜩ0.010319 + Expected counter: 1 + Gas limit: 100229 + Storage limit: 10787 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.010319 + payload fees(the block proposer) ....... +ꜩ0.010319 + Transaction: + Amount: ꜩ0 + From: [PUBLIC_KEY_HASH] + To: [CONTRACT_HASH] + Parameter: "[CONTRACT_HASH]" + This transaction was successfully applied + Updated storage: Unit + Updated big_maps: + New temp(1) of type (big_map int (ticket string)) + Set temp(1)[22] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[48] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[20] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[67] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[30] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[33] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[42] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[13] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[50] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[84] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[44] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[41] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[4] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[73] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[5] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[28] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[19] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[9] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[86] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[76] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[8] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[97] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[80] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[45] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[87] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[1] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[26] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[38] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[65] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[99] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[69] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[2] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[81] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[82] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[64] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[92] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[90] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[98] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[37] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[66] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[32] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[71] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[51] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[56] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[14] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[12] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[85] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[47] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[74] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[18] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[10] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[35] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[96] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[27] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[77] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[62] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[58] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[25] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[94] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[60] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[7] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[53] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[11] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[17] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[83] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[72] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[6] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[88] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[75] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[3] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[70] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[52] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[95] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[68] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[78] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[23] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[79] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[59] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[100] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[24] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[21] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[49] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[93] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[39] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[63] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[55] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[15] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[16] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[31] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[43] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[29] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[54] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[89] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[36] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[46] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[91] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[61] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[34] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[57] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Set temp(1)[40] to (Pair 0x01d134609dab44c9aa19bd850df432d425e018585100 (Pair "BLUE" 1)) + Storage size: 294 bytes + Paid storage size diff: 67 bytes + Consumed gas: 50519 + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.01675 + storage fees ........................... +ꜩ0.01675 + Internal operations: + Internal Transaction: + Amount: ꜩ0 + From: [CONTRACT_HASH] + To: [CONTRACT_HASH] + Parameter: -1 + This transaction was successfully applied + Updated storage: 5 + Updated big_maps: + Clear map(4) + Copy temp(1) to map(5) + Storage size: 10783 bytes + Paid storage size diff: 10700 bytes + Consumed gas: 49610.634 + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ2.675 + storage fees ........................... +ꜩ2.675 + diff --git a/tezt/tests/main.ml b/tezt/tests/main.ml index 6b5131d670f95684e166165942bfc6c0b0f79a1e..22392fb98b381866850ea97b80cd3d97011d27c9 100644 --- a/tezt/tests/main.ml +++ b/tezt/tests/main.ml @@ -137,6 +137,7 @@ let register_protocol_agnostic_tests () = Test_contract_bls12_381.register ~protocols:[Alpha] ; Ticket_updates_in_receipt.register ~protocols:[Alpha] ; Timelock.register ~protocols ; + Tickets.register ~protocols ; Tx_rollup.register ~protocols ; Tx_rollup_l2_node.register ~protocols ; Views.register [Alpha] ; diff --git a/tezt/tests/tickets.ml b/tezt/tests/tickets.ml new file mode 100644 index 0000000000000000000000000000000000000000..70296f530829aed01732d2a5ae0afd4f910cb3f9 --- /dev/null +++ b/tezt/tests/tickets.ml @@ -0,0 +1,163 @@ +(*****************************************************************************) +(* *) +(* Open Source License *) +(* Copyright (c) 2022 Marigold *) +(* *) +(* Permission is hereby granted, free of charge, to any person obtaining a *) +(* copy of this software and associated documentation files (the "Software"),*) +(* to deal in the Software without restriction, including without limitation *) +(* the rights to use, copy, modify, merge, publish, distribute, sublicense, *) +(* and/or sell copies of the Software, and to permit persons to whom the *) +(* Software is furnished to do so, subject to the following conditions: *) +(* *) +(* The above copyright notice and this permission notice shall be included *) +(* in all copies or substantial portions of the Software. *) +(* *) +(* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR*) +(* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *) +(* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *) +(* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER*) +(* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *) +(* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *) +(* DEALINGS IN THE SOFTWARE. *) +(* *) +(*****************************************************************************) + +(* Testing + ------- + Component: Michelson + Invocation: dune exec tezt/tests/main.exe -- --file tickets.ml + Subject: Regression tests for tickets +*) + +let hooks = Tezos_regression.hooks + +let protocol_dependent_path protocol contract = + let directory_name = + match protocol with + (* We use separate contracts because we introduced a backward incompatible change + for tickets in Lima: https://gitlab.com/tezos/tezos/-/merge_requests/5963/ *) + | Protocol.Alpha -> "proto_alpha" + | Jakarta | Kathmandu -> "proto_current_mainnet" + in + sf "file:./tezt/tests/contracts/%s/%s" directory_name contract + +let test_create_and_remove_tickets = + Protocol.register_regression_test + ~__FILE__ + ~title:"Create and remove tickets" + ~tags:["client"; "michelson"] + @@ fun protocol -> + let* client = Client.init_mockup ~protocol () in + let* contract_id = + Client.originate_contract + ~alias:"add_clear_tickets.tz" + ~amount:(Tez.of_int 200) + ~src:"bootstrap1" + ~prg:(protocol_dependent_path protocol "add_clear_tickets.tz") + ~init:"{}" + ~burn_cap:Tez.one + ~hooks + client + in + let* () = + (* Add ticket with payload (Pair 1 "A") *) + Client.transfer + ~burn_cap:(Tez.of_int 2) + ~amount:Tez.zero + ~giver:"bootstrap2" + ~receiver:contract_id + ~entrypoint:"add" + ~arg:{|Pair 1 "A"|} + ~hooks + client + in + let* () = + (* Remove tickets by calling clear entrypoint *) + Client.transfer + ~burn_cap:(Tez.of_int 2) + ~amount:Tez.zero + ~giver:"bootstrap2" + ~receiver:contract_id + ~entrypoint:"clear" + ~arg:"Unit" + ~hooks + client + in + let* () = + (* Add ticket with payload (Pair 1 "B") *) + Client.transfer + ~burn_cap:(Tez.of_int 2) + ~amount:Tez.zero + ~giver:"bootstrap2" + ~receiver:contract_id + ~entrypoint:"add" + ~arg:{|Pair 1 "B"|} + ~hooks + client + in + let* () = + (* Add ticket with payload (Pair 1 "C") *) + Client.transfer + ~burn_cap:(Tez.of_int 2) + ~amount:Tez.zero + ~giver:"bootstrap2" + ~receiver:contract_id + ~entrypoint:"add" + ~arg:{|Pair 1 "C"|} + ~hooks + client + in + unit + +(* This test originates two contracts. One for receiving a big-map with string + tickets. Another for creating and sending a big-map with string tickets. + Scanning the big-map for tickets uses the function [Big_map.list_key_values] + so the regression tests include gas costs associated with calling this + function. *) +let test_send_tickets_in_big_map = + Protocol.register_regression_test + ~__FILE__ + ~title:"Send tickets in bigmap" + ~tags:["client"; "michelson"] + @@ fun protocol -> + let* client = Client.init_mockup ~protocol () in + let* receive_contract_hash = + Client.originate_contract + ~alias:"receive_tickets_in_big_map.tz" + ~amount:(Tez.of_int 200) + ~src:"bootstrap1" + ~prg: + "file:./tezt/tests/contracts/proto_alpha/receive_tickets_in_big_map.tz" + ~init:"{}" + ~burn_cap:Tez.one + ~hooks + client + in + let* send_contract_hash = + Client.originate_contract + ~alias:"send_tickets_in_big_map.tz" + ~amount:(Tez.of_int 200) + ~src:"bootstrap1" + ~prg:(protocol_dependent_path protocol "send_tickets_in_big_map.tz") + ~init:"Unit" + ~burn_cap:Tez.one + ~hooks + client + in + let* () = + Client.transfer + ~burn_cap:(Tez.of_int 30) + ~storage_limit:1000000 + ~amount:Tez.zero + ~giver:"bootstrap2" + ~receiver:send_contract_hash + ~arg:(sf {|"%s"|} receive_contract_hash) + ~hooks + client + in + unit + +let register ~protocols = + test_create_and_remove_tickets protocols ; + test_send_tickets_in_big_map protocols