From ecf79eeb4c5dbef220ab8da757a26d07c3a4d4a0 Mon Sep 17 00:00:00 2001 From: Daniel McGregor Date: Tue, 15 Oct 2024 15:49:07 +0800 Subject: [PATCH] feat: add ARC-56 support --- .../amm/out/ConstantProductAMM.arc56.json | 506 ++++ examples/amm/puya.log | 3 +- examples/arc_28/out/EventEmitter.approval.mir | 14 +- examples/arc_28/out/EventEmitter.arc56.json | 219 ++ .../arc_28/out/EventEmitter.destructured.ir | 12 +- examples/arc_28/out/EventEmitter.ssa.ir | 16 +- .../arc_28/out/EventEmitter.ssa.opt_pass_1.ir | 16 +- .../arc_28/out/EventEmitter.ssa.opt_pass_2.ir | 12 +- examples/arc_28/out/module.awst | 8 +- .../out_O2/EventEmitter.destructured.ir | 12 +- .../EventEmitter.destructured.ir | 16 +- examples/arc_28/puya.log | 27 +- examples/auction/out/Auction.arc56.json | 360 +++ examples/auction/puya.log | 3 +- .../box_storage/out/BoxContract.arc56.json | 475 ++++ examples/box_storage/puya.log | 3 +- examples/calculator/puya.log | 2 +- examples/global_state/puya.log | 2 +- examples/hello_world/puya.log | 2 +- .../out/HelloWorldContract.arc56.json | 107 + examples/hello_world_arc4/puya.log | 3 +- examples/local_state/puya.log | 2 +- examples/merkle/out/MerkleTree.arc56.json | 143 + examples/merkle/puya.log | 3 +- examples/sizes.txt | 3 +- .../out/ExampleContract.arc56.json | 186 ++ .../out/client_ExampleContract.py | 2 +- examples/struct_in_box/puya.log | 3 +- .../out/TicTacToeContract.arc56.json | 268 ++ examples/tictactoe/puya.log | 3 +- examples/voting/out/VotingRoundApp.arc56.json | 495 ++++ examples/voting/out/client_VotingRoundApp.py | 2 +- examples/voting/puya.log | 3 +- scripts/compile_all_examples.py | 16 + src/puya/arc32.py | 20 +- src/puya/arc56.py | 328 +++ src/puya/arc56_models.py | 364 +++ src/puya/awst/function_traverser.py | 4 + src/puya/awst/nodes.py | 10 + src/puya/awst/to_code_visitor.py | 4 + src/puya/awst/validation/arc4_copy.py | 4 + src/puya/awst/visitors.py | 3 + src/puya/awst/wtypes.py | 3 + src/puya/compile.py | 33 +- src/puya/ir/_puya_lib.awst.json | 8 + src/puya/ir/arc4_router.py | 102 +- src/puya/ir/builder/_utils.py | 210 ++ src/puya/ir/builder/arc4.py | 257 +- src/puya/ir/builder/main.py | 16 + src/puya/ir/main.py | 259 +- src/puya/models.py | 49 +- src/puya/options.py | 1 + src/puya/ussemble/assemble.py | 6 + src/puya/ussemble/context.py | 20 +- src/puya/ussemble/main.py | 22 +- src/puya/ussemble/models.py | 4 +- src/puyapy/__main__.py | 6 + src/puyapy/awst_build/arc32_client_gen.py | 36 +- src/puyapy/awst_build/arc4_utils.py | 27 +- src/puyapy/awst_build/eb/arc4/emit.py | 40 +- src/puyapy/awst_build/module.py | 2 + src/puyapy/awst_build/pytypes.py | 11 +- src/puyapy/client_gen.py | 46 +- src/puyapy/compile.py | 4 +- .../abi_routing/out/CustomApproval.arc56.json | 113 + .../abi_routing/out/MinimumARC4.arc56.json | 79 + .../abi_routing/out/Reference.arc56.json | 798 ++++++ test_cases/abi_routing/puya.log | 5 +- test_cases/application/puya.log | 2 +- .../out/DynamicArrayContract.arc56.json | 210 ++ test_cases/arc4_dynamic_arrays/puya.log | 3 +- test_cases/arc4_numeric_comparisons/puya.log | 2 +- .../Arc4DynamicStringArrayContract.arc56.json | 120 + test_cases/arc4_types/puya.log | 3 +- test_cases/arc_56/contract.py | 120 + test_cases/arc_56/out/Contract.approval.mir | 403 +++ test_cases/arc_56/out/Contract.approval.teal | 355 +++ test_cases/arc_56/out/Contract.arc32.json | 266 ++ test_cases/arc_56/out/Contract.arc56.json | 495 ++++ test_cases/arc_56/out/Contract.clear.mir | 7 + test_cases/arc_56/out/Contract.clear.teal | 5 + .../arc_56/out/Contract.destructured.ir | 164 ++ test_cases/arc_56/out/Contract.ssa.ir | 288 ++ .../arc_56/out/Contract.ssa.opt_pass_1.ir | 220 ++ .../arc_56/out/Contract.ssa.opt_pass_10.ir | 164 ++ .../arc_56/out/Contract.ssa.opt_pass_2.ir | 191 ++ .../arc_56/out/Contract.ssa.opt_pass_3.ir | 180 ++ .../arc_56/out/Contract.ssa.opt_pass_4.ir | 175 ++ .../arc_56/out/Contract.ssa.opt_pass_5.ir | 171 ++ .../arc_56/out/Contract.ssa.opt_pass_6.ir | 168 ++ .../arc_56/out/Contract.ssa.opt_pass_7.ir | 167 ++ .../arc_56/out/Contract.ssa.opt_pass_8.ir | 166 ++ .../arc_56/out/Contract.ssa.opt_pass_9.ir | 165 ++ test_cases/arc_56/out/client_Contract.py | 55 + test_cases/arc_56/out/module.awst | 79 + .../arc_56/out_O2/Contract.approval.teal | 247 ++ test_cases/arc_56/out_O2/Contract.clear.teal | 5 + .../arc_56/out_O2/Contract.destructured.ir | 164 ++ .../out_unoptimized/Contract.approval.teal | 561 ++++ .../out_unoptimized/Contract.clear.teal | 5 + .../out_unoptimized/Contract.destructured.ir | 261 ++ test_cases/arc_56/puya.log | 2317 +++++++++++++++++ test_cases/arc_56/template.vars | 4 + test_cases/asset/puya.log | 2 +- test_cases/augmented_assignment/puya.log | 2 +- .../out/TestContract.arc56.json | 153 ++ test_cases/avm_types_in_abi/puya.log | 3 +- test_cases/biguint_binary_ops/puya.log | 2 +- test_cases/boolean_binary_ops/puya.log | 2 +- test_cases/bug_load_store_load_store/puya.log | 2 +- test_cases/bytes_ops/puya.log | 2 +- test_cases/callsub/puya.log | 2 +- test_cases/chained_assignment/puya.log | 2 +- test_cases/compile/out/Hello.arc56.json | 165 ++ test_cases/compile/out/HelloBase.arc56.json | 145 ++ .../compile/out/HelloFactory.arc56.json | 317 +++ .../out/HelloOtherConstants.arc56.json | 208 ++ test_cases/compile/out/HelloPrfx.arc56.json | 165 ++ test_cases/compile/out/HelloTmpl.arc56.json | 165 ++ .../compile/out/LargeProgram.arc56.json | 125 + test_cases/compile/puya.log | 9 +- test_cases/conditional_execution/puya.log | 2 +- test_cases/conditional_expressions/puya.log | 2 +- test_cases/constants/puya.log | 2 +- test_cases/contains/puya.log | 2 +- test_cases/control_op_simplification/puya.log | 2 +- test_cases/debug/out/DebugContract.arc56.json | 120 + test_cases/debug/puya.log | 3 +- test_cases/diamond_mro/out/Base1.arc56.json | 117 + test_cases/diamond_mro/out/Base2.arc56.json | 117 + test_cases/diamond_mro/out/Derived.arc56.json | 117 + test_cases/diamond_mro/out/GP.arc56.json | 117 + test_cases/diamond_mro/puya.log | 6 +- test_cases/dup2_optimization_bug/puya.log | 2 +- test_cases/edverify/puya.log | 2 +- test_cases/enumeration/puya.log | 2 +- .../everything/out/MyContract.arc56.json | 233 ++ test_cases/everything/puya.log | 3 +- .../group_side_effects/out/AppCall.arc56.json | 102 + .../out/AppExpectingEffects.arc56.json | 189 ++ test_cases/group_side_effects/puya.log | 4 +- test_cases/inheritance/puya.log | 2 +- .../out/ArrayAccessContract.arc56.json | 127 + .../out/CreateAndTransferContract.arc56.json | 108 + .../out/FieldTupleContract.arc56.json | 120 + .../inner_transactions/out/Greeter.arc56.json | 151 ++ test_cases/inner_transactions/puya.log | 6 +- .../out/Contract.arc56.json | 120 + .../inner_transactions_assignment/puya.log | 3 +- test_cases/intrinsics/puya.log | 2 +- test_cases/iteration/puya.log | 2 +- test_cases/koopman/puya.log | 2 +- test_cases/less_simple/puya.log | 2 +- test_cases/literals/puya.log | 2 +- test_cases/log/puya.log | 2 +- test_cases/logic_signature/puya.log | 2 +- test_cases/loop_else/puya.log | 2 +- test_cases/match/puya.log | 2 +- test_cases/module_consts/puya.log | 2 +- test_cases/mylib/puya.log | 2 +- test_cases/named_tuples/contract.py | 2 + .../out/NamedTuplesContract.approval.mir | 52 +- .../out/NamedTuplesContract.approval.teal | 46 +- .../out/NamedTuplesContract.arc32.json | 2 +- .../out/NamedTuplesContract.arc56.json | 169 ++ .../out/NamedTuplesContract.destructured.ir | 22 +- .../out/NamedTuplesContract.ssa.ir | 32 +- .../out/NamedTuplesContract.ssa.opt_pass_1.ir | 22 +- .../out/NamedTuplesContract.ssa.opt_pass_2.ir | 22 +- .../out/client_NamedTuplesContract.py | 2 +- .../NamedTuplesContract.destructured.ir | 22 +- .../NamedTuplesContract.approval.teal | 50 +- .../NamedTuplesContract.destructured.ir | 32 +- test_cases/named_tuples/puya.log | 91 +- test_cases/nested_loops/puya.log | 2 +- .../regression_tests/out/Issue118.arc56.json | 107 + test_cases/regression_tests/puya.log | 3 +- .../reinterpret_cast/out/Contract.arc56.json | 120 + test_cases/reinterpret_cast/puya.log | 3 +- test_cases/scratch_slots/puya.log | 2 +- test_cases/simple/puya.log | 2 +- test_cases/simplish/puya.log | 2 +- test_cases/ssa/puya.log | 2 +- test_cases/ssa2/puya.log | 2 +- .../state_mutations/out/Contract.arc56.json | 219 ++ test_cases/state_mutations/puya.log | 3 +- .../out/StateProxyContract.arc56.json | 120 + test_cases/state_proxies/puya.log | 3 +- .../state_totals/out/Contract.arc56.json | 85 + test_cases/state_totals/puya.log | 3 +- test_cases/stress_tests/puya.log | 2 +- test_cases/string_ops/puya.log | 2 +- test_cases/stubs/puya.log | 2 +- .../out/TemplateVariablesContract.arc56.json | 148 ++ test_cases/template_variables/puya.log | 3 +- test_cases/too_many_permutations/puya.log | 2 +- .../out/TransactionContract.arc56.json | 747 ++++++ test_cases/transaction/puya.log | 3 +- .../tuple_support/out/NestedTuples.arc56.json | 217 ++ .../tuple_support/out/client_NestedTuples.py | 4 +- test_cases/tuple_support/puya.log | 3 +- .../typed_abi_call/out/Greeter.arc56.json | 534 ++++ .../typed_abi_call/out/Logger.arc56.json | 618 +++++ test_cases/typed_abi_call/puya.log | 4 +- .../typed_abi_call_txn/out/Caller.arc56.json | 228 ++ .../out/TxnContract.arc56.json | 214 ++ test_cases/typed_abi_call_txn/puya.log | 4 +- test_cases/unary/puya.log | 2 +- .../out/Unassigned.arc56.json | 138 + test_cases/unassigned_expression/puya.log | 3 +- test_cases/undefined_phi_args/puya.log | 2 +- test_cases/unssa/puya.log | 2 +- test_cases/with_reentrancy/puya.log | 2 +- tests/test_compile.py | 16 + tests/utils/__init__.py | 2 +- 215 files changed, 20406 insertions(+), 763 deletions(-) create mode 100644 examples/amm/out/ConstantProductAMM.arc56.json create mode 100644 examples/arc_28/out/EventEmitter.arc56.json create mode 100644 examples/auction/out/Auction.arc56.json create mode 100644 examples/box_storage/out/BoxContract.arc56.json create mode 100644 examples/hello_world_arc4/out/HelloWorldContract.arc56.json create mode 100644 examples/merkle/out/MerkleTree.arc56.json create mode 100644 examples/struct_in_box/out/ExampleContract.arc56.json create mode 100644 examples/tictactoe/out/TicTacToeContract.arc56.json create mode 100644 examples/voting/out/VotingRoundApp.arc56.json create mode 100644 src/puya/arc56.py create mode 100644 src/puya/arc56_models.py create mode 100644 test_cases/abi_routing/out/CustomApproval.arc56.json create mode 100644 test_cases/abi_routing/out/MinimumARC4.arc56.json create mode 100644 test_cases/abi_routing/out/Reference.arc56.json create mode 100644 test_cases/arc4_dynamic_arrays/out/DynamicArrayContract.arc56.json create mode 100644 test_cases/arc4_types/out/Arc4DynamicStringArrayContract.arc56.json create mode 100644 test_cases/arc_56/contract.py create mode 100644 test_cases/arc_56/out/Contract.approval.mir create mode 100644 test_cases/arc_56/out/Contract.approval.teal create mode 100644 test_cases/arc_56/out/Contract.arc32.json create mode 100644 test_cases/arc_56/out/Contract.arc56.json create mode 100644 test_cases/arc_56/out/Contract.clear.mir create mode 100644 test_cases/arc_56/out/Contract.clear.teal create mode 100644 test_cases/arc_56/out/Contract.destructured.ir create mode 100644 test_cases/arc_56/out/Contract.ssa.ir create mode 100644 test_cases/arc_56/out/Contract.ssa.opt_pass_1.ir create mode 100644 test_cases/arc_56/out/Contract.ssa.opt_pass_10.ir create mode 100644 test_cases/arc_56/out/Contract.ssa.opt_pass_2.ir create mode 100644 test_cases/arc_56/out/Contract.ssa.opt_pass_3.ir create mode 100644 test_cases/arc_56/out/Contract.ssa.opt_pass_4.ir create mode 100644 test_cases/arc_56/out/Contract.ssa.opt_pass_5.ir create mode 100644 test_cases/arc_56/out/Contract.ssa.opt_pass_6.ir create mode 100644 test_cases/arc_56/out/Contract.ssa.opt_pass_7.ir create mode 100644 test_cases/arc_56/out/Contract.ssa.opt_pass_8.ir create mode 100644 test_cases/arc_56/out/Contract.ssa.opt_pass_9.ir create mode 100644 test_cases/arc_56/out/client_Contract.py create mode 100644 test_cases/arc_56/out/module.awst create mode 100644 test_cases/arc_56/out_O2/Contract.approval.teal create mode 100644 test_cases/arc_56/out_O2/Contract.clear.teal create mode 100644 test_cases/arc_56/out_O2/Contract.destructured.ir create mode 100644 test_cases/arc_56/out_unoptimized/Contract.approval.teal create mode 100644 test_cases/arc_56/out_unoptimized/Contract.clear.teal create mode 100644 test_cases/arc_56/out_unoptimized/Contract.destructured.ir create mode 100644 test_cases/arc_56/puya.log create mode 100644 test_cases/arc_56/template.vars create mode 100644 test_cases/avm_types_in_abi/out/TestContract.arc56.json create mode 100644 test_cases/compile/out/Hello.arc56.json create mode 100644 test_cases/compile/out/HelloBase.arc56.json create mode 100644 test_cases/compile/out/HelloFactory.arc56.json create mode 100644 test_cases/compile/out/HelloOtherConstants.arc56.json create mode 100644 test_cases/compile/out/HelloPrfx.arc56.json create mode 100644 test_cases/compile/out/HelloTmpl.arc56.json create mode 100644 test_cases/compile/out/LargeProgram.arc56.json create mode 100644 test_cases/debug/out/DebugContract.arc56.json create mode 100644 test_cases/diamond_mro/out/Base1.arc56.json create mode 100644 test_cases/diamond_mro/out/Base2.arc56.json create mode 100644 test_cases/diamond_mro/out/Derived.arc56.json create mode 100644 test_cases/diamond_mro/out/GP.arc56.json create mode 100644 test_cases/everything/out/MyContract.arc56.json create mode 100644 test_cases/group_side_effects/out/AppCall.arc56.json create mode 100644 test_cases/group_side_effects/out/AppExpectingEffects.arc56.json create mode 100644 test_cases/inner_transactions/out/ArrayAccessContract.arc56.json create mode 100644 test_cases/inner_transactions/out/CreateAndTransferContract.arc56.json create mode 100644 test_cases/inner_transactions/out/FieldTupleContract.arc56.json create mode 100644 test_cases/inner_transactions/out/Greeter.arc56.json create mode 100644 test_cases/inner_transactions_assignment/out/Contract.arc56.json create mode 100644 test_cases/named_tuples/out/NamedTuplesContract.arc56.json create mode 100644 test_cases/regression_tests/out/Issue118.arc56.json create mode 100644 test_cases/reinterpret_cast/out/Contract.arc56.json create mode 100644 test_cases/state_mutations/out/Contract.arc56.json create mode 100644 test_cases/state_proxies/out/StateProxyContract.arc56.json create mode 100644 test_cases/state_totals/out/Contract.arc56.json create mode 100644 test_cases/template_variables/out/TemplateVariablesContract.arc56.json create mode 100644 test_cases/transaction/out/TransactionContract.arc56.json create mode 100644 test_cases/tuple_support/out/NestedTuples.arc56.json create mode 100644 test_cases/typed_abi_call/out/Greeter.arc56.json create mode 100644 test_cases/typed_abi_call/out/Logger.arc56.json create mode 100644 test_cases/typed_abi_call_txn/out/Caller.arc56.json create mode 100644 test_cases/typed_abi_call_txn/out/TxnContract.arc56.json create mode 100644 test_cases/unassigned_expression/out/Unassigned.arc56.json diff --git a/examples/amm/out/ConstantProductAMM.arc56.json b/examples/amm/out/ConstantProductAMM.arc56.json new file mode 100644 index 0000000000..ffaf94e0cd --- /dev/null +++ b/examples/amm/out/ConstantProductAMM.arc56.json @@ -0,0 +1,506 @@ +{ + "arcs": [ + 22, + 28 + ], + "name": "ConstantProductAMM", + "structs": {}, + "methods": [ + { + "name": "set_governor", + "args": [ + { + "type": "account", + "name": "new_governor" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {}, + "desc": "sets the governor of the contract, may only be called by the current governor" + }, + { + "name": "bootstrap", + "args": [ + { + "type": "pay", + "name": "seed", + "desc": "Initial Payment transaction to the app account so it can opt in to assets and create pool token." + }, + { + "type": "asset", + "name": "a_asset", + "desc": "One of the two assets this pool should allow swapping between." + }, + { + "type": "asset", + "name": "b_asset", + "desc": "The other of the two assets this pool should allow swapping between." + } + ], + "returns": { + "type": "uint64", + "desc": "The asset id of the pool token created." + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {}, + "desc": "bootstraps the contract by opting into the assets and creating the pool token.\nNote this method will fail if it is attempted more than once on the same contract since the assets and pool token application state values are marked as static and cannot be overridden." + }, + { + "name": "mint", + "args": [ + { + "type": "axfer", + "name": "a_xfer", + "desc": "Asset Transfer Transaction of asset A as a deposit to the pool in exchange for pool tokens." + }, + { + "type": "axfer", + "name": "b_xfer", + "desc": "Asset Transfer Transaction of asset B as a deposit to the pool in exchange for pool tokens." + }, + { + "type": "asset", + "name": "pool_asset", + "desc": "The asset ID of the pool token so that we may distribute it.", + "defaultValue": { + "source": "global", + "data": "cG9vbF90b2tlbg==", + "type": "AVMString" + } + }, + { + "type": "asset", + "name": "a_asset", + "desc": "The asset ID of the Asset A so that we may inspect our balance.", + "defaultValue": { + "source": "global", + "data": "YXNzZXRfYQ==", + "type": "AVMString" + } + }, + { + "type": "asset", + "name": "b_asset", + "desc": "The asset ID of the Asset B so that we may inspect our balance.", + "defaultValue": { + "source": "global", + "data": "YXNzZXRfYg==", + "type": "AVMString" + } + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {}, + "desc": "mint pool tokens given some amount of asset A and asset B.\nGiven some amount of Asset A and Asset B in the transfers, mint some number of pool tokens commensurate with the pools current balance and circulating supply of pool tokens." + }, + { + "name": "burn", + "args": [ + { + "type": "axfer", + "name": "pool_xfer", + "desc": "Asset Transfer Transaction of the pool token for the amount the sender wishes to redeem" + }, + { + "type": "asset", + "name": "pool_asset", + "desc": "Asset ID of the pool token so we may inspect balance.", + "defaultValue": { + "source": "global", + "data": "cG9vbF90b2tlbg==", + "type": "AVMString" + } + }, + { + "type": "asset", + "name": "a_asset", + "desc": "Asset ID of Asset A so we may inspect balance and distribute it", + "defaultValue": { + "source": "global", + "data": "YXNzZXRfYQ==", + "type": "AVMString" + } + }, + { + "type": "asset", + "name": "b_asset", + "desc": "Asset ID of Asset B so we may inspect balance and distribute it", + "defaultValue": { + "source": "global", + "data": "YXNzZXRfYg==", + "type": "AVMString" + } + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {}, + "desc": "burn pool tokens to get back some amount of asset A and asset B" + }, + { + "name": "swap", + "args": [ + { + "type": "axfer", + "name": "swap_xfer", + "desc": "Asset Transfer Transaction of either Asset A or Asset B" + }, + { + "type": "asset", + "name": "a_asset", + "desc": "Asset ID of asset A so we may inspect balance and possibly transfer it", + "defaultValue": { + "source": "global", + "data": "YXNzZXRfYQ==", + "type": "AVMString" + } + }, + { + "type": "asset", + "name": "b_asset", + "desc": "Asset ID of asset B so we may inspect balance and possibly transfer it", + "defaultValue": { + "source": "global", + "data": "YXNzZXRfYg==", + "type": "AVMString" + } + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {}, + "desc": "Swap some amount of either asset A or asset B for the other" + } + ], + "state": { + "schema": { + "global": { + "ints": 4, + "bytes": 1 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": { + "asset_a": { + "keyType": "AVMString", + "valueType": "AVMUint64", + "key": "YXNzZXRfYQ==" + }, + "asset_b": { + "keyType": "AVMString", + "valueType": "AVMUint64", + "key": "YXNzZXRfYg==" + }, + "governor": { + "keyType": "AVMString", + "valueType": "AVMBytes", + "key": "Z292ZXJub3I=" + }, + "pool_token": { + "keyType": "AVMString", + "valueType": "AVMUint64", + "key": "cG9vbF90b2tlbg==" + }, + "ratio": { + "keyType": "AVMString", + "valueType": "AVMUint64", + "key": "cmF0aW8=" + } + }, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "events": [], + "templateVariables": {}, + "networks": {}, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 124, + 142, + 186, + 237, + 277 + ], + "errorMessage": "OnCompletion is NoOp" + }, + { + "pc": [ + 342 + ], + "errorMessage": "Only the account set in global_state.governor may call this method" + }, + { + "pc": [ + 668, + 681, + 694 + ], + "errorMessage": "account opted into asset" + }, + { + "pc": [ + 379, + 590, + 614, + 850, + 969 + ], + "errorMessage": "amount minimum not met" + }, + { + "pc": [ + 352 + ], + "errorMessage": "application has already been bootstrapped" + }, + { + "pc": [ + 542, + 584, + 828, + 955 + ], + "errorMessage": "asset a incorrect" + }, + { + "pc": [ + 385 + ], + "errorMessage": "asset a must be less than asset b" + }, + { + "pc": [ + 550, + 608, + 836, + 963 + ], + "errorMessage": "asset b incorrect" + }, + { + "pc": [ + 429, + 448 + ], + "errorMessage": "asset exists" + }, + { + "pc": [ + 996 + ], + "errorMessage": "asset id incorrect" + }, + { + "pc": [ + 534, + 820, + 860 + ], + "errorMessage": "asset pool incorrect" + }, + { + "pc": [ + 655 + ], + "errorMessage": "bootstrap method needs to be called first" + }, + { + "pc": [ + 403, + 426, + 538, + 582, + 678, + 824, + 899, + 951, + 981, + 1011 + ], + "errorMessage": "check self.asset_a exists" + }, + { + "pc": [ + 410, + 445, + 546, + 606, + 691, + 832, + 910, + 959, + 985, + 1029 + ], + "errorMessage": "check self.asset_b exists" + }, + { + "pc": [ + 340 + ], + "errorMessage": "check self.governor exists" + }, + { + "pc": [ + 350, + 417, + 530, + 638, + 654, + 665, + 816, + 858 + ], + "errorMessage": "check self.pool_token exists" + }, + { + "pc": [ + 361 + ], + "errorMessage": "group size not 2" + }, + { + "pc": [ + 316 + ], + "errorMessage": "is creating" + }, + { + "pc": [ + 127, + 145, + 189, + 240, + 280 + ], + "errorMessage": "is not creating" + }, + { + "pc": [ + 369, + 574, + 598, + 844 + ], + "errorMessage": "receiver not app address" + }, + { + "pc": [ + 632, + 1040 + ], + "errorMessage": "send amount too low" + }, + { + "pc": [ + 558, + 566, + 868, + 977 + ], + "errorMessage": "sender invalid" + }, + { + "pc": [ + 200, + 210, + 250, + 290 + ], + "errorMessage": "transaction type is axfer" + }, + { + "pc": [ + 155 + ], + "errorMessage": "transaction type is pay" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgpleGFtcGxlcy5hbW0uY29udHJhY3QuQ29uc3RhbnRQcm9kdWN0QU1NLmFwcHJvdmFsX3Byb2dyYW06CiAgICBpbnRjYmxvY2sgMCAxIDEwMDAgNCAxMDAwMDAwMDAwMAogICAgYnl0ZWNibG9jayAiYXNzZXRfYSIgImFzc2V0X2IiICJwb29sX3Rva2VuIiAiZ292ZXJub3IiICJyYXRpbyIKICAgIHR4biBBcHBsaWNhdGlvbklECiAgICBibnogbWFpbl9lbnRyeXBvaW50QDIKICAgIGNhbGxzdWIgX19pbml0X18KCm1haW5fZW50cnlwb2ludEAyOgogICAgY2FsbHN1YiBfX3B1eWFfYXJjNF9yb3V0ZXJfXwogICAgcmV0dXJuCgoKLy8gZXhhbXBsZXMuYW1tLmNvbnRyYWN0LkNvbnN0YW50UHJvZHVjdEFNTS5fX3B1eWFfYXJjNF9yb3V0ZXJfXygpIC0+IHVpbnQ2NDoKX19wdXlhX2FyYzRfcm91dGVyX186CiAgICAvLyBhbW0vY29udHJhY3QucHk6MjcKICAgIC8vIGNsYXNzIENvbnN0YW50UHJvZHVjdEFNTShBUkM0Q29udHJhY3QpOgogICAgcHJvdG8gMCAxCiAgICB0eG4gTnVtQXBwQXJncwogICAgYnogX19wdXlhX2FyYzRfcm91dGVyX19fYmFyZV9yb3V0aW5nQDkKICAgIHB1c2hieXRlc3MgMHgwOGE5NTZmNyAweDZiNTlkOTY1IDB4NWNiZjFlMmQgMHgxNDM2YzJhYyAweDRhODhlMDU1IC8vIG1ldGhvZCAic2V0X2dvdmVybm9yKGFjY291bnQpdm9pZCIsIG1ldGhvZCAiYm9vdHN0cmFwKHBheSxhc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AicG9vbF90b2tlbiIsCiAgICAvLyAgICAgICAgICJhX2Fzc2V0IjogImFzc2V0X2EiLAogICAgLy8gICAgICAgICAiYl9hc3NldCI6ICJhc3NldF9iIiwKICAgIC8vICAgICB9LAogICAgLy8gKQogICAgY2FsbHN1YiBtaW50CiAgICBpbnRjXzEgLy8gMQogICAgcmV0c3ViCgpfX3B1eWFfYXJjNF9yb3V0ZXJfX19idXJuX3JvdXRlQDU6CiAgICAvLyBhbW0vY29udHJhY3QucHk6MTQ3LTE1MwogICAgLy8gQGFyYzQuYWJpbWV0aG9kKAogICAgLy8gICAgIGRlZmF1bHRfYXJncz17CiAgICAvLyAgICAgICAgICJwb29sX2Fzc2V0IjogInBvb2xfdG9rZW4iLAogICAgLy8gICAgICAgICAiYV9hc3NldCI6ICJhc3NldF9hIiwKICAgIC8vICAgICAgICAgImJfYXNzZXQiOiAiYXNzZXRfYiIsCiAgICAvLyAgICAgfSwKICAgIC8vICkKICAgIHR4biBPbkNvbXBsZXRpb24KICAgICEKICAgIGFzc2VydCAvLyBPbkNvbXBsZXRpb24gaXMgTm9PcAogICAgdHhuIEFwcGxpY2F0aW9uSUQKICAgIGFzc2VydCAvLyBpcyBub3QgY3JlYXRpbmcKICAgIC8vIGFtbS9jb250cmFjdC5weToyNwogICAgLy8gY2xhc3MgQ29uc3RhbnRQcm9kdWN0QU1NKEFSQzRDb250cmFjdCk6CiAgICB0eG4gR3JvdXBJbmRleAogICAgaW50Y18xIC8vIDEKICAgIC0KICAgIGR1cAogICAgZ3R4bnMgVHlwZUVudW0KICAgIGludGNfMyAvLyBheGZlcgogICAgPT0KICAgIGFzc2VydCAvLyB0cmFuc2FjdGlvbiB0eXBlIGlzIGF4ZmVyCiAgICB0eG5hIEFwcGxpY2F0aW9uQXJncyAxCiAgICBidG9pCiAgICB0eG5hcyBBc3NldHMKICAgIHR4bmEgQXBwbGljYXRpb25BcmdzIDIKICAgIGJ0b2kKICAgIHR4bmFzIEFzc2V0cwogICAgdHhuYSBBcHBsaWNhdGlvbkFyZ3MgMwogICAgYnRvaQogICAgdHhuYXMgQXNzZXRzCiAgICAvLyBhbW0vY29udHJhY3QucHk6MTQ3LTE1MwogICAgLy8gQGFyYzQuYWJpbWV0aG9kKAogICAgLy8gICAgIGRlZmF1bHRfYXJncz17CiAgICAvLyAgICAgICAgICJwb29sX2Fzc2V0IjogInBvb2xfdG9rZW4iLAogICAgLy8gICAgICAgICAiYV9hc3NldCI6ICJhc3NldF9hIiwKICAgIC8vICAgICAgICAgImJfYXNzZXQiOiAiYXNzZXRfYiIsCiAgICAvLyAgICAgfSwKICAgIC8vICkKICAgIGNhbGxzdWIgYnVybgogICAgaW50Y18xIC8vIDEKICAgIHJldHN1YgoKX19wdXlhX2FyYzRfcm91dGVyX19fc3dhcF9yb3V0ZUA2OgogICAgLy8gYW1tL2NvbnRyYWN0LnB5OjIwNC0yMDkKICAgIC8vIEBhcmM0LmFiaW1ldGhvZCgKICAgIC8vICAgICBkZWZhdWx0X2FyZ3M9ewogICAgLy8gICAgICAgICAiYV9hc3NldCI6ICJhc3NldF9hIiwKICAgIC8vICAgICAgICAgImJfYXNzZXQiOiAiYXNzZXRfYiIsCiAgICAvLyAgICAgfSwKICAgIC8vICkKICAgIHR4biBPbkNvbXBsZXRpb24KICAgICEKICAgIGFzc2VydCAvLyBPbkNvbXBsZXRpb24gaXMgTm9PcAogICAgdHhuIEFwcGxpY2F0aW9uSUQKICAgIGFzc2VydCAvLyBpcyBub3QgY3JlYXRpbmcKICAgIC8vIGFtbS9jb250cmFjdC5weToyNwogICAgLy8gY2xhc3MgQ29uc3RhbnRQcm9kdWN0QU1NKEFSQzRDb250cmFjdCk6CiAgICB0eG4gR3JvdXBJbmRleAogICAgaW50Y18xIC8vIDEKICAgIC0KICAgIGR1cAogICAgZ3R4bnMgVHlwZUVudW0KICAgIGludGNfMyAvLyBheGZlcgogICAgPT0KICAgIGFzc2VydCAvLyB0cmFuc2FjdGlvbiB0eXBlIGlzIGF4ZmVyC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YiJEUFQtIiArIHNlbGYuYXNzZXRfYS51bml0X25hbWUgKyBiIi0iICsgc2VsZi5hc3NldF9iLnVuaXRfbmFtZSwKICAgIC8vICAgICB1bml0X25hbWU9YiJkYnQiLAogICAgLy8gICAgIHRvdGFsPVRPVEFMX1NVUFBMWSwKICAgIC8vICAgICBkZWNpbWFscz0zLAogICAgLy8gICAgIG1hbmFnZXI9R2xvYmFsLmN1cnJlbnRfYXBwbGljYXRpb25fYWRkcmVzcywKICAgIC8vICAgICByZXNlcnZlPUdsb2JhbC5jdXJyZW50X2FwcGxpY2F0aW9uX2FkZHJlc3MsCiAgICAvLyApCiAgICAvLyAuc3VibWl0KCkKICAgIC8vIC5jcmVhdGVkX2Fzc2V0CiAgICBpdHhuIENyZWF0ZWRBc3NldElECiAgICAvLyBhbW0vY29udHJhY3QucHk6MjcwLTI4MQogICAgLy8gcmV0dXJuICgKICAgIC8vICAgICBpdHhuLkFzc2V0Q29uZmlnKAogICAgLy8gICAgICAgICBhc3NldF9uYW1lPWIiRFBULSIgKyBzZWxmLmFzc2V0X2EudW5pdF9uYW1lICsgYiItIiArIHNlbGYuYXNzZXRfYi51bml0X25hbWUsCiAgICAvLyAgICAgICAgIHVuaXRfbmFtZT1iImRidCIsCiAgICAvLyAgICAgICAgIHRvdGFsPVRPVEFMX1NVUFBMWSwKICAgIC8vICAgICAgICAgZGVjaW1hbHM9MywKICAgIC8vICAgICAgICAgbWFuYWdlcj1HbG9iYWwuY3VycmVudF9hcHBsaWNhdGlvbl9hZGRyZXNzLAogICAgLy8gICAgICAgICByZXNlcnZlPUdsb2JhbC5jdXJyZW50X2FwcGxpY2F0aW9uX2FkZHJlc3MsCiAgICAvLyAgICAgKQogICAgLy8gICAgIC5zdWJtaXQoKQogICAgLy8gICAgIC5jcmVhdGVkX2Fzc2V0CiAgICAvLyApCiAgICByZXRzdWIKCgovLyBleGFtcGxlcy5hbW0uY29udHJhY3QuQ29uc3RhbnRQcm9kdWN0QU1NLl9kb19vcHR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ASRIv8OAAxABJEi/s4FDIKEkSL+zgRIihlRBJEi/s4EklEi/w4FDIKEkSL/DgRIillRBJEi/w4EklEiAAniAAxiAA7TwRPBIgAQUlEMQAiKmVETwKI/22IAI2JigAAIiplRESJigABMgoiKmVEcABEiYoAATIKIihlRHAARImKAAEyCiIpZURwAESJigUBgABJi/yL/hJBAAyL/Yv/EkEABCNCAAEiQQALi/6L/wuSJAmMAIkhBIv7CSSL/guL/Iv+CQpJjAAki/8Li/2L/wkKSYwBDEEACIsACyQKjACJiwELJAqMAImKAACI/4SI/45MJAtMCicETGeJigQAiP9bIiplRIv9EkQiKGVEi/4SRCIpZUSL/xJEi/w4FDIKEkSL/DgSSUSL/DgRIiplRBJEi/w4ADEAEkSI/ymI/zNLAUxLA4gAJYj/NU8CTE8DiAAaMQAiKGVETwOI/mgxACIpZURPAoj+XYj/fYmKAwEhBIv9CYv/CYv+i/8LTAqJigMAgABJiP7UIihlRIv+EkQiKWVEi/8SRIv9OBJJRIv9OAAxABJEIihlRCIpZUSL/TgRjgIAAQATAIj+w4wAiP6xIihlTIwBREIAD4j+pIwAiP6sIillTIwBRIsCiwBPAogAD0lEMQCLAU8CiP3XiP73iYoDAYv+i/0JJAuL/YHjBwtMSwEITIv/C0wKiYoAACgiZykiZysxAGcqImcnBCJniQ==", + "clear": "CoEBQw==" + }, + "compilerInfo": { + "compiler": "puya", + "compilerVersion": { + "major": 99, + "minor": 99, + "patch": 99 + } + } +} \ No newline at end of file diff --git a/examples/amm/puya.log b/examples/amm/puya.log index f75ebb7e3c..682ce7f060 100644 --- a/examples/amm/puya.log +++ b/examples/amm/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['amm'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['amm'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing amm/out/module.awst debug: Sealing block@0: // L12 @@ -1962,6 +1962,7 @@ debug: examples.amm.contract.tokens_to_mint f-stack on first store: [] debug: examples.amm.contract.ConstantProductAMM.swap f-stack entry: ['in_supply#0', 'out_asset#0'] debug: examples.amm.contract.ConstantProductAMM.swap f-stack on first store: ['tmp%2#0'] info: Writing amm/out/ConstantProductAMM.arc32.json +info: Writing amm/out/ConstantProductAMM.arc56.json info: Writing amm/out/ConstantProductAMM.approval.teal info: Writing amm/out/ConstantProductAMM.clear.teal info: Writing amm/out/ConstantProductAMM.approval.bin diff --git a/examples/arc_28/out/EventEmitter.approval.mir b/examples/arc_28/out/EventEmitter.approval.mir index 4274f22d63..63bbda1108 100644 --- a/examples/arc_28/out/EventEmitter.approval.mir +++ b/examples/arc_28/out/EventEmitter.approval.mir @@ -107,16 +107,16 @@ emit_swapped_block@0: ( concat (𝕡) a#0,b#0 | encoded_tuple_buffer%2#0 method Swapped(uint64,uint64) (𝕡) a#0,b#0 | encoded_tuple_buffer%2#0,Method(Swapped(uint64,uint64)) l-load encoded_tuple_buffer%2#0 1 (𝕡) a#0,b#0 | Method(Swapped(uint64,uint64)),encoded_tuple_buffer%2#0 - concat (𝕡) a#0,b#0 | tmp%0#0 - l-load-copy tmp%0#0 0 (𝕡) a#0,b#0 | tmp%0#0,tmp%0#0 (copy) - log (𝕡) a#0,b#0 | tmp%0#0 + concat (𝕡) a#0,b#0 | event%0#0 + l-load-copy event%0#0 0 (𝕡) a#0,b#0 | event%0#0,event%0#0 (copy) + log (𝕡) a#0,b#0 | event%0#0 // arc_28/contract.py:15 // arc4.emit("Swapped(uint64,uint64)", b, a) - l-load-copy tmp%0#0 0 (𝕡) a#0,b#0 | tmp%0#0,tmp%0#0 (copy) - log (𝕡) a#0,b#0 | tmp%0#0 + l-load-copy event%0#0 0 (𝕡) a#0,b#0 | event%0#0,event%0#0 (copy) + log (𝕡) a#0,b#0 | event%0#0 // arc_28/contract.py:16 // arc4.emit("Swapped", b, a) - l-load tmp%0#0 0 (𝕡) a#0,b#0 | tmp%0#0 + l-load event%0#0 0 (𝕡) a#0,b#0 | event%0#0 log (𝕡) a#0,b#0 | retsub @@ -140,7 +140,7 @@ emit_ufixed_block@0: ( concat (𝕡) a#0,b#0 | encoded_tuple_buffer%2#0 method AnEvent(ufixed256x16,ufixed64x2) (𝕡) a#0,b#0 | encoded_tuple_buffer%2#0,Method(AnEvent(ufixed256x16,ufixed64x2)) l-load encoded_tuple_buffer%2#0 1 (𝕡) a#0,b#0 | Method(AnEvent(ufixed256x16,ufixed64x2)),encoded_tuple_buffer%2#0 - concat (𝕡) a#0,b#0 | tmp%0#0 + concat (𝕡) a#0,b#0 | event%0#0 log (𝕡) a#0,b#0 | retsub diff --git a/examples/arc_28/out/EventEmitter.arc56.json b/examples/arc_28/out/EventEmitter.arc56.json new file mode 100644 index 0000000000..8492e0dfb0 --- /dev/null +++ b/examples/arc_28/out/EventEmitter.arc56.json @@ -0,0 +1,219 @@ +{ + "arcs": [ + 22, + 28 + ], + "name": "EventEmitter", + "structs": {}, + "methods": [ + { + "name": "emit_swapped", + "args": [ + { + "type": "uint64", + "name": "a" + }, + { + "type": "uint64", + "name": "b" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [ + { + "name": "Swapped", + "args": [ + { + "type": "uint64", + "name": "a" + }, + { + "type": "uint64", + "name": "b" + } + ] + }, + { + "name": "Swapped", + "args": [ + { + "type": "uint64", + "name": "field1" + }, + { + "type": "uint64", + "name": "field2" + } + ] + } + ], + "recommendations": {} + }, + { + "name": "emit_ufixed", + "args": [ + { + "type": "ufixed256x16", + "name": "a" + }, + { + "type": "ufixed64x2", + "name": "b" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [ + { + "name": "AnEvent", + "args": [ + { + "type": "ufixed256x16", + "name": "field1" + }, + { + "type": "ufixed64x2", + "name": "field2" + } + ] + } + ], + "recommendations": {} + } + ], + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "events": [ + { + "name": "Swapped", + "args": [ + { + "type": "uint64", + "name": "a" + }, + { + "type": "uint64", + "name": "b" + } + ] + }, + { + "name": "Swapped", + "args": [ + { + "type": "uint64", + "name": "field1" + }, + { + "type": "uint64", + "name": "field2" + } + ] + }, + { + "name": "AnEvent", + "args": [ + { + "type": "ufixed256x16", + "name": "field1" + }, + { + "type": "ufixed64x2", + "name": "field2" + } + ] + } + ], + "templateVariables": {}, + "networks": {}, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 43, + 61 + ], + "errorMessage": "OnCompletion is NoOp" + }, + { + "pc": [ + 84 + ], + "errorMessage": "is creating" + }, + { + "pc": [ + 46, + 64 + ], + "errorMessage": "is not creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgpleGFtcGxlcy5hcmNfMjguY29udHJhY3QuRXZlbnRFbWl0dGVyLmFwcHJvdmFsX3Byb2dyYW06CiAgICBpbnRjYmxvY2sgMSAwCiAgICBjYWxsc3ViIF9fcHV5YV9hcmM0X3JvdXRlcl9fCiAgICByZXR1cm4KC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==" + }, + "compilerInfo": { + "compiler": "puya", + "compilerVersion": { + "major": 99, + "minor": 99, + "patch": 99 + } + } +} \ No newline at end of file diff --git a/examples/arc_28/out/EventEmitter.destructured.ir b/examples/arc_28/out/EventEmitter.destructured.ir index 78f46ee11d..0f4bcc536e 100644 --- a/examples/arc_28/out/EventEmitter.destructured.ir +++ b/examples/arc_28/out/EventEmitter.destructured.ir @@ -46,17 +46,17 @@ contract examples.arc_28.contract.EventEmitter: subroutine examples.arc_28.contract.EventEmitter.emit_swapped(a: bytes, b: bytes) -> void: block@0: // L12 let encoded_tuple_buffer%2#0: bytes = (concat b#0 a#0) - let tmp%0#0: bytes = (concat method "Swapped(uint64,uint64)" encoded_tuple_buffer%2#0) - (log tmp%0#0) - (log tmp%0#0) - (log tmp%0#0) + let event%0#0: bytes = (concat method "Swapped(uint64,uint64)" encoded_tuple_buffer%2#0) + (log event%0#0) + (log event%0#0) + (log event%0#0) return subroutine examples.arc_28.contract.EventEmitter.emit_ufixed(a: bytes, b: bytes) -> void: block@0: // L18 let encoded_tuple_buffer%2#0: bytes = (concat a#0 b#0) - let tmp%0#0: bytes = (concat method "AnEvent(ufixed256x16,ufixed64x2)" encoded_tuple_buffer%2#0) - (log tmp%0#0) + let event%0#0: bytes = (concat method "AnEvent(ufixed256x16,ufixed64x2)" encoded_tuple_buffer%2#0) + (log event%0#0) return program clear-state: diff --git a/examples/arc_28/out/EventEmitter.ssa.ir b/examples/arc_28/out/EventEmitter.ssa.ir index e7563fd07f..39ef432e55 100644 --- a/examples/arc_28/out/EventEmitter.ssa.ir +++ b/examples/arc_28/out/EventEmitter.ssa.ir @@ -61,20 +61,20 @@ contract examples.arc_28.contract.EventEmitter: let encoded_tuple_buffer%0#0: bytes = 0x let encoded_tuple_buffer%1#0: bytes = (concat encoded_tuple_buffer%0#0 b#0) let encoded_tuple_buffer%2#0: bytes = (concat encoded_tuple_buffer%1#0 a#0) - let tmp%0#0: bytes = (concat method "Swapped(uint64,uint64)" encoded_tuple_buffer%2#0) - (log tmp%0#0) + let event%0#0: bytes = (concat method "Swapped(uint64,uint64)" encoded_tuple_buffer%2#0) + (log event%0#0) let current_tail_offset%1#0: uint64 = 16u let encoded_tuple_buffer%3#0: bytes = 0x let encoded_tuple_buffer%4#0: bytes = (concat encoded_tuple_buffer%3#0 b#0) let encoded_tuple_buffer%5#0: bytes = (concat encoded_tuple_buffer%4#0 a#0) - let tmp%1#0: bytes = (concat method "Swapped(uint64,uint64)" encoded_tuple_buffer%5#0) - (log tmp%1#0) + let event%1#0: bytes = (concat method "Swapped(uint64,uint64)" encoded_tuple_buffer%5#0) + (log event%1#0) let current_tail_offset%2#0: uint64 = 16u let encoded_tuple_buffer%6#0: bytes = 0x let encoded_tuple_buffer%7#0: bytes = (concat encoded_tuple_buffer%6#0 b#0) let encoded_tuple_buffer%8#0: bytes = (concat encoded_tuple_buffer%7#0 a#0) - let tmp%2#0: bytes = (concat method "Swapped(uint64,uint64)" encoded_tuple_buffer%8#0) - (log tmp%2#0) + let event%2#0: bytes = (concat method "Swapped(uint64,uint64)" encoded_tuple_buffer%8#0) + (log event%2#0) return subroutine examples.arc_28.contract.EventEmitter.emit_ufixed(a: bytes, b: bytes) -> void: @@ -83,8 +83,8 @@ contract examples.arc_28.contract.EventEmitter: let encoded_tuple_buffer%0#0: bytes = 0x let encoded_tuple_buffer%1#0: bytes = (concat encoded_tuple_buffer%0#0 a#0) let encoded_tuple_buffer%2#0: bytes = (concat encoded_tuple_buffer%1#0 b#0) - let tmp%0#0: bytes = (concat method "AnEvent(ufixed256x16,ufixed64x2)" encoded_tuple_buffer%2#0) - (log tmp%0#0) + let event%0#0: bytes = (concat method "AnEvent(ufixed256x16,ufixed64x2)" encoded_tuple_buffer%2#0) + (log event%0#0) return subroutine examples.arc_28.contract.EventEmitter.__algopy_default_create() -> void: diff --git a/examples/arc_28/out/EventEmitter.ssa.opt_pass_1.ir b/examples/arc_28/out/EventEmitter.ssa.opt_pass_1.ir index 96159c6b02..fc9973ea1a 100644 --- a/examples/arc_28/out/EventEmitter.ssa.opt_pass_1.ir +++ b/examples/arc_28/out/EventEmitter.ssa.opt_pass_1.ir @@ -47,24 +47,24 @@ contract examples.arc_28.contract.EventEmitter: block@0: // L12 let encoded_tuple_buffer%1#0: bytes = b#0 let encoded_tuple_buffer%2#0: bytes = (concat encoded_tuple_buffer%1#0 a#0) - let tmp%0#0: bytes = (concat method "Swapped(uint64,uint64)" encoded_tuple_buffer%2#0) - (log tmp%0#0) + let event%0#0: bytes = (concat method "Swapped(uint64,uint64)" encoded_tuple_buffer%2#0) + (log event%0#0) let encoded_tuple_buffer%4#0: bytes = b#0 let encoded_tuple_buffer%5#0: bytes = (concat encoded_tuple_buffer%4#0 a#0) - let tmp%1#0: bytes = (concat method "Swapped(uint64,uint64)" encoded_tuple_buffer%5#0) - (log tmp%1#0) + let event%1#0: bytes = (concat method "Swapped(uint64,uint64)" encoded_tuple_buffer%5#0) + (log event%1#0) let encoded_tuple_buffer%7#0: bytes = b#0 let encoded_tuple_buffer%8#0: bytes = (concat encoded_tuple_buffer%7#0 a#0) - let tmp%2#0: bytes = (concat method "Swapped(uint64,uint64)" encoded_tuple_buffer%8#0) - (log tmp%2#0) + let event%2#0: bytes = (concat method "Swapped(uint64,uint64)" encoded_tuple_buffer%8#0) + (log event%2#0) return subroutine examples.arc_28.contract.EventEmitter.emit_ufixed(a: bytes, b: bytes) -> void: block@0: // L18 let encoded_tuple_buffer%1#0: bytes = a#0 let encoded_tuple_buffer%2#0: bytes = (concat encoded_tuple_buffer%1#0 b#0) - let tmp%0#0: bytes = (concat method "AnEvent(ufixed256x16,ufixed64x2)" encoded_tuple_buffer%2#0) - (log tmp%0#0) + let event%0#0: bytes = (concat method "AnEvent(ufixed256x16,ufixed64x2)" encoded_tuple_buffer%2#0) + (log event%0#0) return program clear-state: diff --git a/examples/arc_28/out/EventEmitter.ssa.opt_pass_2.ir b/examples/arc_28/out/EventEmitter.ssa.opt_pass_2.ir index 78f46ee11d..0f4bcc536e 100644 --- a/examples/arc_28/out/EventEmitter.ssa.opt_pass_2.ir +++ b/examples/arc_28/out/EventEmitter.ssa.opt_pass_2.ir @@ -46,17 +46,17 @@ contract examples.arc_28.contract.EventEmitter: subroutine examples.arc_28.contract.EventEmitter.emit_swapped(a: bytes, b: bytes) -> void: block@0: // L12 let encoded_tuple_buffer%2#0: bytes = (concat b#0 a#0) - let tmp%0#0: bytes = (concat method "Swapped(uint64,uint64)" encoded_tuple_buffer%2#0) - (log tmp%0#0) - (log tmp%0#0) - (log tmp%0#0) + let event%0#0: bytes = (concat method "Swapped(uint64,uint64)" encoded_tuple_buffer%2#0) + (log event%0#0) + (log event%0#0) + (log event%0#0) return subroutine examples.arc_28.contract.EventEmitter.emit_ufixed(a: bytes, b: bytes) -> void: block@0: // L18 let encoded_tuple_buffer%2#0: bytes = (concat a#0 b#0) - let tmp%0#0: bytes = (concat method "AnEvent(ufixed256x16,ufixed64x2)" encoded_tuple_buffer%2#0) - (log tmp%0#0) + let event%0#0: bytes = (concat method "AnEvent(ufixed256x16,ufixed64x2)" encoded_tuple_buffer%2#0) + (log event%0#0) return program clear-state: diff --git a/examples/arc_28/out/module.awst b/examples/arc_28/out/module.awst index 0051446976..eb1abee1c2 100644 --- a/examples/arc_28/out/module.awst +++ b/examples/arc_28/out/module.awst @@ -6,13 +6,13 @@ contract EventEmitter extends (algopy.arc4.ARC4Contract) abimethod emit_swapped(a: arc4.uint64, b: arc4.uint64): void { - log(concat(Method("Swapped(uint64,uint64)"), new examples.arc_28.contract.Swapped(a=b, b=a))) - log(concat(Method("Swapped(uint64,uint64)"), arc4_encode((b, a), arc4.tuple))) - log(concat(Method("Swapped(uint64,uint64)"), arc4_encode((b, a), arc4.tuple))) + emit('Swapped(uint64,uint64)', new examples.arc_28.contract.Swapped(a=b, b=a)) + emit('Swapped(uint64,uint64)', new Swapped(field1=b, field2=a)) + emit('Swapped(uint64,uint64)', new Swapped(field1=b, field2=a)) } abimethod emit_ufixed(a: arc4.ufixed256x16, b: arc4.ufixed64x2): void { - log(concat(Method("AnEvent(ufixed256x16,ufixed64x2)"), arc4_encode((a, b), arc4.tuple))) + emit('AnEvent(ufixed256x16,ufixed64x2)', new AnEvent(field1=a, field2=b)) } } \ No newline at end of file diff --git a/examples/arc_28/out_O2/EventEmitter.destructured.ir b/examples/arc_28/out_O2/EventEmitter.destructured.ir index 78f46ee11d..0f4bcc536e 100644 --- a/examples/arc_28/out_O2/EventEmitter.destructured.ir +++ b/examples/arc_28/out_O2/EventEmitter.destructured.ir @@ -46,17 +46,17 @@ contract examples.arc_28.contract.EventEmitter: subroutine examples.arc_28.contract.EventEmitter.emit_swapped(a: bytes, b: bytes) -> void: block@0: // L12 let encoded_tuple_buffer%2#0: bytes = (concat b#0 a#0) - let tmp%0#0: bytes = (concat method "Swapped(uint64,uint64)" encoded_tuple_buffer%2#0) - (log tmp%0#0) - (log tmp%0#0) - (log tmp%0#0) + let event%0#0: bytes = (concat method "Swapped(uint64,uint64)" encoded_tuple_buffer%2#0) + (log event%0#0) + (log event%0#0) + (log event%0#0) return subroutine examples.arc_28.contract.EventEmitter.emit_ufixed(a: bytes, b: bytes) -> void: block@0: // L18 let encoded_tuple_buffer%2#0: bytes = (concat a#0 b#0) - let tmp%0#0: bytes = (concat method "AnEvent(ufixed256x16,ufixed64x2)" encoded_tuple_buffer%2#0) - (log tmp%0#0) + let event%0#0: bytes = (concat method "AnEvent(ufixed256x16,ufixed64x2)" encoded_tuple_buffer%2#0) + (log event%0#0) return program clear-state: diff --git a/examples/arc_28/out_unoptimized/EventEmitter.destructured.ir b/examples/arc_28/out_unoptimized/EventEmitter.destructured.ir index 027ba867d2..c65cfeac65 100644 --- a/examples/arc_28/out_unoptimized/EventEmitter.destructured.ir +++ b/examples/arc_28/out_unoptimized/EventEmitter.destructured.ir @@ -59,24 +59,24 @@ contract examples.arc_28.contract.EventEmitter: block@0: // L12 let encoded_tuple_buffer%1#0: bytes = (concat 0x b#0) let encoded_tuple_buffer%2#0: bytes = (concat encoded_tuple_buffer%1#0 a#0) - let tmp%0#0: bytes = (concat method "Swapped(uint64,uint64)" encoded_tuple_buffer%2#0) - (log tmp%0#0) + let event%0#0: bytes = (concat method "Swapped(uint64,uint64)" encoded_tuple_buffer%2#0) + (log event%0#0) let encoded_tuple_buffer%4#0: bytes = (concat 0x b#0) let encoded_tuple_buffer%5#0: bytes = (concat encoded_tuple_buffer%4#0 a#0) - let tmp%1#0: bytes = (concat method "Swapped(uint64,uint64)" encoded_tuple_buffer%5#0) - (log tmp%1#0) + let event%1#0: bytes = (concat method "Swapped(uint64,uint64)" encoded_tuple_buffer%5#0) + (log event%1#0) let encoded_tuple_buffer%7#0: bytes = (concat 0x b#0) let encoded_tuple_buffer%8#0: bytes = (concat encoded_tuple_buffer%7#0 a#0) - let tmp%2#0: bytes = (concat method "Swapped(uint64,uint64)" encoded_tuple_buffer%8#0) - (log tmp%2#0) + let event%2#0: bytes = (concat method "Swapped(uint64,uint64)" encoded_tuple_buffer%8#0) + (log event%2#0) return subroutine examples.arc_28.contract.EventEmitter.emit_ufixed(a: bytes, b: bytes) -> void: block@0: // L18 let encoded_tuple_buffer%1#0: bytes = (concat 0x a#0) let encoded_tuple_buffer%2#0: bytes = (concat encoded_tuple_buffer%1#0 b#0) - let tmp%0#0: bytes = (concat method "AnEvent(ufixed256x16,ufixed64x2)" encoded_tuple_buffer%2#0) - (log tmp%0#0) + let event%0#0: bytes = (concat method "AnEvent(ufixed256x16,ufixed64x2)" encoded_tuple_buffer%2#0) + (log event%0#0) return subroutine examples.arc_28.contract.EventEmitter.__algopy_default_create() -> void: diff --git a/examples/arc_28/puya.log b/examples/arc_28/puya.log index efa3f4d8e7..f5025eb4fc 100644 --- a/examples/arc_28/puya.log +++ b/examples/arc_28/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['arc_28'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['arc_28'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing arc_28/out/module.awst debug: Sealing block@0: // L12 @@ -551,10 +551,10 @@ debug: Replacing redundant declaration let encoded_tuple_buffer%5#0: bytes = (co debug: Replacing redundant declaration let encoded_tuple_buffer%8#0: bytes = (concat b#0 a#0) with copy of existing registers (Register(source_location=arc_28/contract.py:14:18-31, ir_type=bytes, name='encoded_tuple_buffer%2', version=0),) debug: Found equivalence set: encoded_tuple_buffer%2#0, encoded_tuple_buffer%5#0, encoded_tuple_buffer%8#0 debug: Replacing {encoded_tuple_buffer%5#0, encoded_tuple_buffer%8#0} with encoded_tuple_buffer%2#0 made 2 modifications -debug: Replacing redundant declaration let tmp%1#0: bytes = (concat method "Swapped(uint64,uint64)" encoded_tuple_buffer%2#0) with copy of existing registers (Register(source_location=arc_28/contract.py:14:8-32, ir_type=bytes, name='tmp%0', version=0),) -debug: Replacing redundant declaration let tmp%2#0: bytes = (concat method "Swapped(uint64,uint64)" encoded_tuple_buffer%2#0) with copy of existing registers (Register(source_location=arc_28/contract.py:14:8-32, ir_type=bytes, name='tmp%0', version=0),) -debug: Found equivalence set: tmp%0#0, tmp%1#0, tmp%2#0 -debug: Replacing {tmp%1#0, tmp%2#0} with tmp%0#0 made 2 modifications +debug: Replacing redundant declaration let event%1#0: bytes = (concat method "Swapped(uint64,uint64)" encoded_tuple_buffer%2#0) with copy of existing registers (Register(source_location=arc_28/contract.py:14:8-32, ir_type=bytes, name='event%0', version=0),) +debug: Replacing redundant declaration let event%2#0: bytes = (concat method "Swapped(uint64,uint64)" encoded_tuple_buffer%2#0) with copy of existing registers (Register(source_location=arc_28/contract.py:14:8-32, ir_type=bytes, name='event%0', version=0),) +debug: Found equivalence set: event%0#0, event%1#0, event%2#0 +debug: Replacing {event%1#0, event%2#0} with event%0#0 made 2 modifications debug: Optimizer: Remove Calls To No Op Subroutines debug: Optimizing subroutine examples.arc_28.contract.EventEmitter.emit_ufixed debug: Optimizer: Constant Replacer @@ -706,20 +706,21 @@ debug: Inserted __puya_arc4_router_____algopy_default_create@7.ops[1]: 'l-store- debug: Replaced __puya_arc4_router_____algopy_default_create@7.ops[3]: 'v-load tmp%16#0' with 'l-load tmp%16#0' debug: Inserted __puya_arc4_router_____algopy_default_create@7.ops[5]: 'l-store-copy tmp%17#0 0' debug: Replaced __puya_arc4_router_____algopy_default_create@7.ops[7]: 'v-load tmp%17#0' with 'l-load tmp%17#0' -debug: Inserted emit_swapped_block@0.ops[7]: 'l-store-copy tmp%0#0 0' -debug: Replaced emit_swapped_block@0.ops[9]: 'v-load tmp%0#0' with 'l-load tmp%0#0' +debug: Inserted emit_swapped_block@0.ops[7]: 'l-store-copy event%0#0 0' +debug: Replaced emit_swapped_block@0.ops[9]: 'v-load event%0#0' with 'l-load event%0#0' debug: Inserted emit_swapped_block@0.ops[3]: 'l-store-copy encoded_tuple_buffer%2#0 0' debug: Replaced emit_swapped_block@0.ops[6]: 'v-load encoded_tuple_buffer%2#0' with 'l-load encoded_tuple_buffer%2#0' -debug: Inserted emit_swapped_block@0.ops[11]: 'l-store-copy tmp%0#0 0' -debug: Replaced emit_swapped_block@0.ops[13]: 'v-load tmp%0#0' with 'l-load tmp%0#0' -debug: Inserted emit_swapped_block@0.ops[14]: 'l-store-copy tmp%0#0 0' -debug: Replaced emit_swapped_block@0.ops[16]: 'v-load tmp%0#0' with 'l-load tmp%0#0' -debug: Inserted emit_ufixed_block@0.ops[7]: 'l-store-copy tmp%0#0 0' -debug: Replaced emit_ufixed_block@0.ops[9]: 'v-load tmp%0#0' with 'l-load tmp%0#0' +debug: Inserted emit_swapped_block@0.ops[11]: 'l-store-copy event%0#0 0' +debug: Replaced emit_swapped_block@0.ops[13]: 'v-load event%0#0' with 'l-load event%0#0' +debug: Inserted emit_swapped_block@0.ops[14]: 'l-store-copy event%0#0 0' +debug: Replaced emit_swapped_block@0.ops[16]: 'v-load event%0#0' with 'l-load event%0#0' +debug: Inserted emit_ufixed_block@0.ops[7]: 'l-store-copy event%0#0 0' +debug: Replaced emit_ufixed_block@0.ops[9]: 'v-load event%0#0' with 'l-load event%0#0' debug: Inserted emit_ufixed_block@0.ops[3]: 'l-store-copy encoded_tuple_buffer%2#0 0' debug: Replaced emit_ufixed_block@0.ops[6]: 'v-load encoded_tuple_buffer%2#0' with 'l-load encoded_tuple_buffer%2#0' debug: Found 3 edge set/s for examples.arc_28.contract.EventEmitter.__puya_arc4_router__ info: Writing arc_28/out/EventEmitter.arc32.json +info: Writing arc_28/out/EventEmitter.arc56.json info: Writing arc_28/out/EventEmitter.approval.teal info: Writing arc_28/out/EventEmitter.clear.teal info: Writing arc_28/out/EventEmitter.approval.bin diff --git a/examples/auction/out/Auction.arc56.json b/examples/auction/out/Auction.arc56.json new file mode 100644 index 0000000000..0c0aa83861 --- /dev/null +++ b/examples/auction/out/Auction.arc56.json @@ -0,0 +1,360 @@ +{ + "arcs": [ + 22, + 28 + ], + "name": "Auction", + "structs": {}, + "methods": [ + { + "name": "opt_into_asset", + "args": [ + { + "type": "asset", + "name": "asset" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "start_auction", + "args": [ + { + "type": "uint64", + "name": "starting_price" + }, + { + "type": "uint64", + "name": "length" + }, + { + "type": "axfer", + "name": "axfer" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "opt_in", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "bid", + "args": [ + { + "type": "pay", + "name": "pay" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "claim_bids", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "claim_asset", + "args": [ + { + "type": "asset", + "name": "asset" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "state": { + "schema": { + "global": { + "ints": 4, + "bytes": 1 + }, + "local": { + "ints": 1, + "bytes": 0 + } + }, + "keys": { + "global": { + "auction_end": { + "keyType": "AVMString", + "valueType": "AVMUint64", + "key": "YXVjdGlvbl9lbmQ=" + }, + "previous_bid": { + "keyType": "AVMString", + "valueType": "AVMUint64", + "key": "cHJldmlvdXNfYmlk" + }, + "asa_amount": { + "keyType": "AVMString", + "valueType": "AVMUint64", + "key": "YXNhX2Ftb3VudA==" + }, + "asa": { + "keyType": "AVMString", + "valueType": "AVMUint64", + "key": "YXNh" + }, + "previous_bidder": { + "keyType": "AVMString", + "valueType": "AVMBytes", + "key": "cHJldmlvdXNfYmlkZGVy" + } + }, + "local": { + "claimable_amount": { + "keyType": "AVMString", + "valueType": "AVMUint64", + "key": "Y2xhaW0=", + "desc": "The claimable amount" + } + }, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "events": [], + "templateVariables": {}, + "networks": {}, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 277 + ], + "errorMessage": "ASA already opted in" + }, + { + "pc": [ + 374 + ], + "errorMessage": "Bid must be higher than previous bid" + }, + { + "pc": [ + 144, + 162, + 192, + 201, + 223, + 235 + ], + "errorMessage": "OnCompletion is NoOp" + }, + { + "pc": [ + 271 + ], + "errorMessage": "Only creator can opt in to ASA" + }, + { + "pc": [ + 313 + ], + "errorMessage": "auction already started" + }, + { + "pc": [ + 353 + ], + "errorMessage": "auction has ended" + }, + { + "pc": [ + 464 + ], + "errorMessage": "auction has not ended" + }, + { + "pc": [ + 307 + ], + "errorMessage": "auction must be started by creator" + }, + { + "pc": [ + 321 + ], + "errorMessage": "axfer must transfer to this app" + }, + { + "pc": [ + 275 + ], + "errorMessage": "check self.asa exists" + }, + { + "pc": [ + 478 + ], + "errorMessage": "check self.asa_amount exists" + }, + { + "pc": [ + 311, + 351, + 462 + ], + "errorMessage": "check self.auction_end exists" + }, + { + "pc": [ + 404 + ], + "errorMessage": "check self.claimable_amount exists for account" + }, + { + "pc": [ + 370, + 418 + ], + "errorMessage": "check self.previous_bid exists" + }, + { + "pc": [ + 410, + 469, + 473 + ], + "errorMessage": "check self.previous_bidder exists" + }, + { + "pc": [ + 258 + ], + "errorMessage": "is creating" + }, + { + "pc": [ + 147, + 165, + 195, + 204, + 226, + 238 + ], + "errorMessage": "is not creating" + }, + { + "pc": [ + 362 + ], + "errorMessage": "payment sender must match transaction sender" + }, + { + "pc": [ + 183 + ], + "errorMessage": "transaction type is axfer" + }, + { + "pc": [ + 214 + ], + "errorMessage": "transaction type is pay" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgpleGFtcGxlcy5hdWN0aW9uLmNvbnRyYWN0LkF1Y3Rpb24uYXBwcm92YWxfcHJvZ3JhbToKICAgIGludGNibG9jayAwIDEgNAogICAgYnl0ZWNibG9jayAiYXVjdGlvbl9lbmQiICJwcmV2aW91c19iaWQiICJw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pbnRjXzAgLy8gMAogICAgYXBwX2dsb2JhbF9wdXQKICAgIC8vIGF1Y3Rpb24vY29udHJhY3QucHk6MTkKICAgIC8vIHNlbGYucHJldmlvdXNfYmlkID0gVUludDY0KDApCiAgICBieXRlY18xIC8vICJwcmV2aW91c19iaWQiCiAgICBpbnRjXzAgLy8gMAogICAgYXBwX2dsb2JhbF9wdXQKICAgIC8vIGF1Y3Rpb24vY29udHJhY3QucHk6MjAKICAgIC8vIHNlbGYuYXNhX2Ftb3VudCA9IFVJbnQ2NCgwKQogICAgYnl0ZWMgNCAvLyAiYXNhX2Ftb3VudCIKICAgIGludGNfMCAvLyAwCiAgICBhcHBfZ2xvYmFsX3B1dAogICAgLy8gYXVjdGlvbi9jb250cmFjdC5weToyMQogICAgLy8gc2VsZi5hc2EgPSBBc3NldCgpCiAgICBieXRlY18zIC8vICJhc2EiCiAgICBpbnRjXzAgLy8gMAogICAgYXBwX2dsb2JhbF9wdXQKICAgIC8vIGF1Y3Rpb24vY29udHJhY3QucHk6MjIKICAgIC8vIHNlbGYucHJldmlvdXNfYmlkZGVyID0gQWNjb3VudCgpCiAgICBieXRlY18yIC8vICJwcmV2aW91c19iaWRkZXIiCiAgICBnbG9iYWwgWmVyb0FkZHJlc3MKICAgIGFwcF9nbG9iYWxfcHV0CiAgICByZXRzdWIK", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgpleGFtcGxlcy5hdWN0aW9uLmNvbnRyYWN0LkF1Y3Rpb24uY2xlYXJfc3RhdGVfcHJvZ3JhbToKICAgIC8vIGF1Y3Rpb24vY29udHJhY3QucHk6MTE2CiAgICAvLyByZXR1cm4gVHJ1ZQogICAgcHVzaGludCAxIC8vIDEKICAgIHJldHVybgo=" + }, + "byteCode": { + "approval": "CiADAAEEJgYLYXVjdGlvbl9lbmQMcHJldmlvdXNfYmlkD3ByZXZpb3VzX2JpZGRlcgNhc2EKYXNhX2Ftb3VudAVjbGFpbTEYQAADiAGjiAABQ4oAATEbQQCgggYEKCayAgTwqnAjBDDG1YoE23/oQwTmVGJbBB7BK+82GgCOBgACABQAMgA7AFEAXSKJMRkURDEYRDYaARfAMIgAaiOJMRkURDEYRDYaARc2GgIXMRYjCUk4ECQSRIgAcCOJMRkURDEYRCOJMRkURDEYRDEWIwlJOBAjEkSIAH0jiTEZFEQxGESIAKEjiTEZFEQxGEQ2GgEXwDCIAM4jiTEZQAAGMRgURCOJIomKAQAxADIJEkQiK2VEFEQri/9nsTIKi/+yEbIUJLIQIrIBs4mKAwAxADIJEkQiKGVEFESL/zgUMgoSRIv/OBInBExnMgeL/ggoTGcpi/1niYoBADIHIihlRAxEi/84AEkxABJEi/84CCIpZURLAQxEKUsBZypPAmcxACcFTwJmiYoAADEAIicFY0xJTwJEMQAiKmVEEkEACiIpZUSLAEwJjAGxMQCyB4sBSbIII7IQIrIBszEAiwBPAgknBUxmiYoBADIHIihlRA1EsSIqZUQiKmVEIicEZUSyErIUshWL/7IRJLIQIrIBs4mKAAAoImcpImcnBCJnKyJnKjIDZ4k=", + "clear": "CoEBQw==" + }, + "compilerInfo": { + "compiler": "puya", + "compilerVersion": { + "major": 99, + "minor": 99, + "patch": 99 + } + } +} \ No newline at end of file diff --git a/examples/auction/puya.log b/examples/auction/puya.log index 33295ff182..8bf4664b25 100644 --- a/examples/auction/puya.log +++ b/examples/auction/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['auction'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['auction'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing auction/out/module.awst debug: Sealing block@0: // L12 @@ -1171,6 +1171,7 @@ debug: Found 1 edge set/s for examples.auction.contract.Auction.claim_bids debug: examples.auction.contract.Auction.claim_bids f-stack entry: [] debug: examples.auction.contract.Auction.claim_bids f-stack on first store: ['original_amount#0', 'amount#1'] info: Writing auction/out/Auction.arc32.json +info: Writing auction/out/Auction.arc56.json info: Writing auction/out/Auction.approval.teal info: Writing auction/out/Auction.clear.teal info: Writing auction/out/Auction.approval.bin diff --git a/examples/box_storage/out/BoxContract.arc56.json b/examples/box_storage/out/BoxContract.arc56.json new file mode 100644 index 0000000000..7c06cfe4dc --- /dev/null +++ b/examples/box_storage/out/BoxContract.arc56.json @@ -0,0 +1,475 @@ +{ + "arcs": [ + 22, + 28 + ], + "name": "BoxContract", + "structs": {}, + "methods": [ + { + "name": "set_boxes", + "args": [ + { + "type": "uint64", + "name": "a" + }, + { + "type": "byte[]", + "name": "b" + }, + { + "type": "string", + "name": "c" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "check_keys", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "delete_boxes", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "read_boxes", + "args": [], + "returns": { + "type": "(uint64,byte[],string)" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "boxes_exist", + "args": [], + "returns": { + "type": "(bool,bool,bool)" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "slice_box", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "arc4_box", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "test_box_ref", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "box_map_test", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "box_map_set", + "args": [ + { + "type": "uint64", + "name": "key" + }, + { + "type": "string", + "name": "value" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "box_map_get", + "args": [ + { + "type": "uint64", + "name": "key" + } + ], + "returns": { + "type": "string" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "box_map_del", + "args": [ + { + "type": "uint64", + "name": "key" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "box_map_exists", + "args": [ + { + "type": "uint64", + "name": "key" + } + ], + "returns": { + "type": "bool" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": { + "box_a": { + "keyType": "AVMString", + "valueType": "AVMUint64", + "key": "Ym94X2E=" + }, + "box_b": { + "keyType": "AVMString", + "valueType": "byte[]", + "key": "Yg==" + }, + "box_c": { + "keyType": "AVMBytes", + "valueType": "string", + "key": "Qk9YX0M=" + }, + "box_d": { + "keyType": "AVMString", + "valueType": "AVMBytes", + "key": "Ym94X2Q=" + }, + "box_ref": { + "keyType": "AVMString", + "valueType": "AVMBytes", + "key": "Ym94X3JlZg==" + } + } + }, + "maps": { + "global": {}, + "local": {}, + "box": { + "box_map": { + "keyType": "AVMUint64", + "valueType": "AVMString", + "prefix": "" + } + } + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "events": [], + "templateVariables": {}, + "networks": {}, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 1246 + ], + "errorMessage": "Blob exists" + }, + { + "pc": [ + 187, + 209, + 218, + 230, + 281, + 331, + 343, + 355, + 367, + 379, + 401, + 430, + 446 + ], + "errorMessage": "OnCompletion is NoOp" + }, + { + "pc": [ + 930, + 1093, + 1104, + 1116, + 1128 + ], + "errorMessage": "check Box exists" + }, + { + "pc": [ + 1376 + ], + "errorMessage": "check BoxMap entry exists" + }, + { + "pc": [ + 1249, + 1285 + ], + "errorMessage": "check BoxRef exists" + }, + { + "pc": [ + 540, + 550 + ], + "errorMessage": "check self.box_a exists" + }, + { + "pc": [ + 523, + 527, + 558, + 913 + ], + "errorMessage": "check self.box_b exists" + }, + { + "pc": [ + 566, + 919 + ], + "errorMessage": "check self.box_c exists" + }, + { + "pc": [ + 577 + ], + "errorMessage": "check self.box_d exists" + }, + { + "pc": [ + 1307, + 1314, + 1398 + ], + "errorMessage": "check self.box_map entry exists" + }, + { + "pc": [ + 534 + ], + "errorMessage": "direct reference should match copy" + }, + { + "pc": [ + 1174, + 1273 + ], + "errorMessage": "has data" + }, + { + "pc": [ + 478 + ], + "errorMessage": "is creating" + }, + { + "pc": [ + 190, + 212, + 221, + 233, + 284, + 334, + 346, + 358, + 370, + 382, + 404, + 433, + 449 + ], + "errorMessage": "is not creating" + }, + { + "pc": [ + 1146, + 1152, + 1158, + 1164 + ], + "errorMessage": "no data" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgpleGFtcGxlcy5ib3hfc3RvcmFnZS5jb250cmFjdC5Cb3hDb250cmFjdC5hcHByb3ZhbF9wcm9ncmFtOgogICAgaW50Y2Jsb2NrIDEgMCAyIDUKICAgIGJ5dGVjYmxvY2sgMHg0MjRmNTg1ZjQzIDB4NjI2YzZmNjIgImJveF9kIiAiYm94X2EiICJiIiAweDAwIDB4NjQgMHgxNTFmN2M3NSAiMCIgMHg2ODY1NmM2YzZmIDB4MDAwMjM0MzIgImJveF9yZWYiICJkZWZhdWx0IgogICAgY2FsbHN1YiBfX3B1eWFfYXJjNF9yb3V0ZXJfXwogICAgcmV0dXJuCgoKLy8gZXhhbXBsZXMuYm94X3N0b3JhZ2UuY29udHJhY3QuQm94Q29udHJhY3QuX19wdXlhX2FyYzRfcm91dGVyX18oKSAtPiB1aW50NjQ6Cl9fcHV5YV9hcmM0X3JvdXRlcl9fOgogICAgLy8gYm94X3N0b3JhZ2UvY29udHJhY3QucHk6OAogICAgLy8gY2xhc3MgQm94Q29udHJhY3QoYXJjNC5BUkM0Q29udHJhY3QpOgogICAgcHJvdG8gMCAxCiAgICB0eG4gTnVtQXBwQXJncwogICAgYnogX19wdXlhX2FyYzRfcm91dGVyX19fYmFyZV9yb3V0aW5nQDE3CiAgICBwdXNoYnl0ZXNzIDB4N2QzNzI5NmUgMHgzMzMyNWQzZCAweGQ1NjZjNjMyIDB4ZmJkYTliYTAgMHhlNWEzZWQ1MiAweDA0ZWY0OTcxIDB4MjNlY2IzMmMgMHhlZWY3NTgxNiAweGI1MzI5MTNhIDB4YzI5ZjE2NjkgMHg5Yzg4OGMwOSAweGU2ZjY4NTA2IDB4OGVlMmMzNjQgLy8gbWV0aG9kICJzZXRfYm94ZXModWludDY0LGJ5dGVb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VzIHR5cGUKICAgIC8vIGFzc2VydCBzZWxmLmJveF9kLnZhbHVlWzBdID09IGIubmF0aXZlWzBdCiAgICBieXRlY18yIC8vICJib3hfZCIKICAgIGludGNfMSAvLyAwCiAgICBpbnRjXzAgLy8gMQogICAgYm94X2V4dHJhY3QKICAgIGRpZyAyCiAgICBleHRyYWN0IDAgMQogICAgPT0KICAgIGFzc2VydAogICAgLy8gYm94X3N0b3JhZ2UvY29udHJhY3QucHk6NDMKICAgIC8vIGFzc2VydCBzZWxmLmJveF9kLnZhbHVlWy0xXSA9PSBiLm5hdGl2ZVstMV0KICAgIGJ5dGVjXzIgLy8gImJveF9kIgogICAgYm94X2xlbgogICAgcG9wCiAgICBpbnRjXzAgLy8gMQogICAgLQogICAgYnl0ZWNfMiAvLyAiYm94X2QiCiAgICBzd2FwCiAgICBpbnRjXzAgLy8gMQogICAgYm94X2V4dHJhY3QKICAgIGRpZyAxCiAgICBpbnRjXzAgLy8gMQogICAgLQogICAgZHVwCiAgICBpbnRjXzAgLy8gMQogICAgKwogICAgZGlnIDQKICAgIGNvdmVyIDIKICAgIHN1YnN0cmluZzMKICAgID09CiAgICBhc3NlcnQKICAgIC8vIGJveF9zdG9yYWdlL2NvbnRyYWN0LnB5OjQ0CiAgICAvLyBhc3NlcnQgc2VsZi5ib3hfZC52YWx1ZVs6LTFdID09IGIubmF0aXZlWzotMV0KICAgIGJ5dGVjXzIgLy8gImJveF9kIgogICAgYm94X2xlbgogICAgcG9wCiAgICBpbnRjXzAgLy8gMQogICAgZGlnIDEKICAgIDwKICAgIGRpZyAxCiAgICBpbnRjXzAgLy8gMQogICAgdW5jb3ZlciAyCiAgICBzZWxlY3QKICAgIC0KICAgIGJ5dGVjXzIgLy8gImJveF9kIgogICAgaW50Y18xIC8vIDAKICAgIHVuY292ZXIgMgogICAgYm94X2V4dHJhY3QKICAgIGludGNfMCAvLyAxCiAgICBkaWcgMgogICAgPj0KICAgIGludGNfMCAvLyAxCiAgICBkaWcgMwogICAgdW5jb3ZlciAyCiAgICBzZWxlY3QKICAgIGRpZyAyCiAgICBzd2FwCiAgICAtCiAgICBkaWcgMwogICAgaW50Y18xIC8vIDAKICAgIHVuY292ZXIgMgogICAgc3Vic3RyaW5nMwogICAgPT0KICAgIGFzc2VydAogICAgLy8gYm94X3N0b3JhZ2UvY29udHJhY3QucHk6NDUKICAgIC8vIGFzc2VydCBzZWxmLmJveF9kLnZhbHVlWzo1XSA9PSBiLm5hdGl2ZVs6NV0KICAgIGJ5dGVjXzIgLy8gImJveF9kIgogICAgYm94X2xlbgogICAgcG9wCiAgICBpbnRjXzMgLy8gNQogICAgZGlnIDEKICAgIDwKICAgIGludGNfMyAvLyA1CiAgICBzd2FwCiAgICBzZWxlY3QKICAgIGJ5dGVjXzIgLy8gImJveF9kIgogICAgaW50Y18xIC8vIDAKICAgIHVuY292ZXIgMgogICAgYm94X2V4dHJhY3QKICAgIGludGNfMyAvLyA1CiAgICBkaWcgMgogICAgPj0KICAgIGludGNfMyAvLyA1CiAgICBkaWcgMwogICAgdW5jb3ZlciAyCiAgICBzZWxlY3QKICAgIGRpZyAzCiAgICBpbnRjXzEgLy8gMAogICAgdW5jb3ZlciAyCiAgICBzdWJzdHJpbmczCiAgICA9PQogICAgYXNzZXJ0CiAgICAvLyBib3hfc3RvcmFnZS9jb250cmFjdC5weTo0NgogICAgLy8gYXNzZXJ0IHNlbGYuYm94X2QudmFsdWVbOiBVSW50NjQoMildID09IGIubmF0aXZlWzogVUludDY0KDIpXQogICAgYnl0ZWNfMiAvLyAiYm94X2QiCiAgICBib3hfbGVuCiAgICBwb3AKICAgIGludGNfMiAvLyAyCiAgICBkaWcgMQogICAgPAogICAgaW50Y18yIC8vIDIKICAgIHN3YXAKICAgIHNlbGVjdAogICAgYnl0ZWNfMiAvLyAiYm94X2QiCiAgICBpbnRjXzEgLy8gMAogICAgdW5jb3ZlciAyCiAgICBib3hfZXh0cmFjdAogICAgaW50Y18yIC8vIDIKICAgIGRpZyAyCiAgIC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292ZXIgMgogICAgc2VsZWN0CiAgICBkaWcgMQogICAgLQogICAgLy8gYm94X3N0b3JhZ2UvY29udHJhY3QucHk6NzYKICAgIC8vIGJveF8wID0gQm94KEJ5dGVzLCBrZXk9U3RyaW5nKCIwIikpCiAgICBieXRlYyA4IC8vICIwIgogICAgLy8gYm94X3N0b3JhZ2UvY29udHJhY3QucHk6NzgKICAgIC8vIGFzc2VydCBib3hfMC52YWx1ZVswOjddID09IGIiVGVzdGluZyIKICAgIGNvdmVyIDIKICAgIGJveF9leHRyYWN0CiAgICBwdXNoYnl0ZXMgMHg1NDY1NzM3NDY5NmU2NwogICAgPT0KICAgIGFzc2VydAogICAgLy8gYm94X3N0b3JhZ2UvY29udHJhY3QucHk6ODAKICAgIC8vIHNlbGYuYm94X2MudmFsdWUgPSBhcmM0LlN0cmluZygiSGVsbG8iKQogICAgYnl0ZWNfMCAvLyAweDQyNGY1ODVmNDMKICAgIGJveF9kZWwKICAgIHBvcAogICAgYnl0ZWNfMCAvLyAweDQyNGY1ODVmNDMKICAgIHB1c2hieXRlcyAweDAwMDU0ODY1NmM2YzZmCiAgICBib3hfcHV0CiAgICAvLyBib3hfc3RvcmFnZS9jb250cmFjdC5weTo4MQogICAgLy8gYXNzZXJ0IHNlbGYuYm94X2MudmFsdWUuYnl0ZXNbMjoxMF0gPT0gYiJIZWxsbyIKICAgIGJ5dGVjXzAgLy8gMHg0MjRmNTg1ZjQzCiAgICBib3hfbGVuCiAgICBwb3AKICAgIGludGNfMiAvLyAyCiAgICBkaWcgMQogICAgPAogICAgZGlnIDEKICAgIGludGNfMiAvLyAyCiAgICB1bmNvdmVyIDIKICAgIHNlbGVjdAogICAgcHVzaGludCAxMCAvLyAxMAogICAgZGlnIDIKICAgIDwKICAgIHVuY292ZXIgMgogICAgcHVzaGludCAxMCAvLyAxMAogICAgdW5jb3ZlciAyCiAgICBzZWxlY3QKICAgIGRpZyAxCiAgICAtCiAgICBieXRlY18wIC8vIDB4NDI0ZjU4NWY0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NzAtMTcxCiAgICAvLyBAYXJjNC5hYmltZXRob2QKICAgIC8vIGRlZiBib3hfbWFwX2RlbChzZWxmLCBrZXk6IFVJbnQ2NCkgLT4gTm9uZToKICAgIHByb3RvIDEgMAogICAgLy8gYm94X3N0b3JhZ2UvY29udHJhY3QucHk6MTcyCiAgICAvLyBkZWwgc2VsZi5ib3hfbWFwW2tleV0KICAgIGZyYW1lX2RpZyAtMQogICAgaXRvYgogICAgYm94X2RlbAogICAgcG9wCiAgICByZXRzdWIKCgovLyBleGFtcGxlcy5ib3hfc3RvcmFnZS5jb250cmFjdC5Cb3hDb250cmFjdC5ib3hfbWFwX2V4aXN0cyhrZXk6IHVpbnQ2NCkgLT4gdWludDY0Ogpib3hfbWFwX2V4aXN0czoKICAgIC8vIGJveF9zdG9yYWdlL2NvbnRyYWN0LnB5OjE3NC0xNzUKICAgIC8vIEBhcmM0LmFiaW1ldGhvZAogICAgLy8gZGVmIGJveF9tYXBfZXhpc3RzKHNlbGYsIGtleTogVUludDY0KSAtPiBib29sOgogICAgcHJvdG8gMSAxCiAgICAvLyBib3hfc3RvcmFnZS9jb250cmFjdC5weToxNzYKICAgIC8vIHJldHVybiBrZXkgaW4gc2VsZi5ib3hfbWFwCiAgICBmcmFtZV9kaWcgLTEKICAgIGl0b2IKICAgIGJveF9sZW4KICAgIGJ1cnkgMQogICAgcmV0c3ViCg==", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgpleGFtcGxlcy5ib3hfc3RvcmFnZS5jb250cmFjdC5Cb3hDb250cmFjdC5jbGVhcl9zdGF0ZV9wcm9ncmFtOgogICAgcHVzaGludCAxIC8vIDEKICAgIHJldHVybgo=" + }, + "byteCode": { + "approval": "CiAEAQACBSYNBUJPWF9DBGJsb2IFYm94X2QFYm94X2EBYgEAAWQEFR98dQEwBWhlbGxvBAACNDIHYm94X3JlZgdkZWZhdWx0iAABQ4oAATEbQQGCgg0EfTcpbgQzMl09BNVmxjIE+9qboATlo+1SBATvSXEEI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IIiYoAAyu9RQEnBL1FASi9RQGJigAAJwi8SCcIgBNUZXN0aW5nIHRlc3RpbmcgMTIzvycIvUhJI0sCTYEHSwIMTwKBB08CTUsBCScITgK6gAdUZXN0aW5nEkQovEgogAcABUhlbGxvvyi9SCRLAQxLASRPAk2BCksCDE8CgQpPAk1LAQkoTgK6gAVIZWxsbxJEiYoAACcGgAQAAQIDvycGvkRXAAEnBahEJwa+RFcBAYABAahEJwa+RFcCAYABAqhEJwa+RFcDAYABA6hEiYoAACm9RQEURCm9RQEURCm9RQEURCm9RQEURCmBILlEKb1FAUQxADIKKSNLA7spgcA+0ykjSUsD0imBQCcJuykjgUW6SwFLA1AnCVASRCm8RCm+FESAABJEKb5LA04CTUsCEkRQKUy/Kb1FAUQpvUSBQBJEKYgAFYFAEkQnC4EguUgnC71FAUQnC7xIiYoBAYv/vUSJigAAIxZJvEhJgAZIbW1tbW2/Sb1EgQYSREm9RIEGEkQiFkm+JwxOAk0nDBJESb5FARRETL1FAURJvEhJJwm/gAAjiAAHJwkSRLxIiYoCAYv/IggWi/5MUL5EiYoCAIv+Fkm8SIv/v4mKAQGL/xa+RImKAQCL/xa8SImKAQGL/xa9RQGJ", + "clear": "CoEBQw==" + }, + "compilerInfo": { + "compiler": "puya", + "compilerVersion": { + "major": 99, + "minor": 99, + "patch": 99 + } + } +} \ No newline at end of file diff --git a/examples/box_storage/puya.log b/examples/box_storage/puya.log index cc6cf4f4ed..ef35f4870b 100644 --- a/examples/box_storage/puya.log +++ b/examples/box_storage/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['box_storage'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['box_storage'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv box_storage/contract.py:137:9 warning: expression result is ignored box_storage/contract.py:139:9 warning: expression result is ignored @@ -3016,6 +3016,7 @@ debug: Inserted box_map_exists_block@0.ops[6]: 'l-store-copy maybe_exists%0#0 1' debug: Replaced box_map_exists_block@0.ops[9]: 'v-load maybe_exists%0#0' with 'l-load maybe_exists%0#0' debug: Found 3 edge set/s for examples.box_storage.contract.BoxContract.__puya_arc4_router__ info: Writing box_storage/out/BoxContract.arc32.json +info: Writing box_storage/out/BoxContract.arc56.json info: Writing box_storage/out/BoxContract.approval.teal info: Writing box_storage/out/BoxContract.clear.teal info: Writing box_storage/out/BoxContract.approval.bin diff --git a/examples/calculator/puya.log b/examples/calculator/puya.log index 5ffc94d805..5d73287b54 100644 --- a/examples/calculator/puya.log +++ b/examples/calculator/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['calculator'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['calculator'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing calculator/out/module.awst debug: Sealing block@0: // L12 diff --git a/examples/global_state/puya.log b/examples/global_state/puya.log index 9b0d72ed78..403d6a73d5 100644 --- a/examples/global_state/puya.log +++ b/examples/global_state/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['global_state'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['global_state'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing global_state/out/module.awst debug: Sealing block@0: // L12 diff --git a/examples/hello_world/puya.log b/examples/hello_world/puya.log index 7c180b7731..95e846f3b2 100644 --- a/examples/hello_world/puya.log +++ b/examples/hello_world/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['hello_world'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['hello_world'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing hello_world/out/module.awst debug: Sealing block@0: // L12 diff --git a/examples/hello_world_arc4/out/HelloWorldContract.arc56.json b/examples/hello_world_arc4/out/HelloWorldContract.arc56.json new file mode 100644 index 0000000000..76f0f02f56 --- /dev/null +++ b/examples/hello_world_arc4/out/HelloWorldContract.arc56.json @@ -0,0 +1,107 @@ +{ + "arcs": [ + 22, + 28 + ], + "name": "HelloWorldContract", + "structs": {}, + "methods": [ + { + "name": "hello", + "args": [ + { + "type": "string", + "name": "name" + } + ], + "returns": { + "type": "string" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "events": [], + "templateVariables": {}, + "networks": {}, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 35 + ], + "errorMessage": "OnCompletion is NoOp" + }, + { + "pc": [ + 75 + ], + "errorMessage": "is creating" + }, + { + "pc": [ + 38 + ], + "errorMessage": "is not creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgpleGFtcGxlcy5oZWxsb193b3JsZF9hcmM0LmNvbnRyYWN0LkhlbGxvV29ybGRDb250cmFjdC5hcHByb3ZhbF9wcm9ncmFtOgogICAgaW50Y2Jsb2NrIDAgMQogICAgY2FsbHN1YiBfX3B1eWFfYXJjNF9yb3V0ZXJfXwogICAgcmV0dXJuCgoKLy8gZXhhbXBsZXMuaGVsbG9fd29ybGRfYXJjNC5jb250cmFjdC5IZWxsb1dvcmxkQ29udHJhY3QuX19wdXlhX2FyYzRfcm91dGVyX18oKSAtPiB1a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cgLTEKICAgIGNvbmNhdAogICAgcmV0c3ViCg==", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgpleGFtcGxlcy5oZWxsb193b3JsZF9hcmM0LmNvbnRyYWN0LkhlbGxvV29ybGRDb250cmFjdC5jbGVhcl9zdGF0ZV9wcm9ncmFtOgogICAgcHVzaGludCAxIC8vIDEKICAgIHJldHVybgo=" + }, + "byteCode": { + "approval": "CiACAAGIAAFDigABMRtBADKABAK+zhE2GgCOAQACIokxGRREMRhENhoBVwIAiAAgSRUWVwYCTFCABBUffHVMULAjiTEZQAAGMRgURCOJIomKAQGAB0hlbGxvLCCL/1CJ", + "clear": "CoEBQw==" + }, + "compilerInfo": { + "compiler": "puya", + "compilerVersion": { + "major": 99, + "minor": 99, + "patch": 99 + } + } +} \ No newline at end of file diff --git a/examples/hello_world_arc4/puya.log b/examples/hello_world_arc4/puya.log index c6d311d835..bb268ff961 100644 --- a/examples/hello_world_arc4/puya.log +++ b/examples/hello_world_arc4/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['hello_world_arc4'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['hello_world_arc4'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing hello_world_arc4/out/module.awst debug: Sealing block@0: // L12 @@ -586,6 +586,7 @@ debug: Inserted hello_block@0.ops[3]: 'l-store-copy tmp%0#0 0' debug: Replaced hello_block@0.ops[5]: 'v-load tmp%0#0' with 'l-load tmp%0#0' debug: Found 3 edge set/s for examples.hello_world_arc4.contract.HelloWorldContract.__puya_arc4_router__ info: Writing hello_world_arc4/out/HelloWorldContract.arc32.json +info: Writing hello_world_arc4/out/HelloWorldContract.arc56.json info: Writing hello_world_arc4/out/HelloWorldContract.approval.teal info: Writing hello_world_arc4/out/HelloWorldContract.clear.teal info: Writing hello_world_arc4/out/HelloWorldContract.approval.bin diff --git a/examples/local_state/puya.log b/examples/local_state/puya.log index 0d4be6fa25..d7deaea12a 100644 --- a/examples/local_state/puya.log +++ b/examples/local_state/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['local_state'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['local_state'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing local_state/out/module.awst debug: Sealing block@0: // L12 diff --git a/examples/merkle/out/MerkleTree.arc56.json b/examples/merkle/out/MerkleTree.arc56.json new file mode 100644 index 0000000000..34ab180aed --- /dev/null +++ b/examples/merkle/out/MerkleTree.arc56.json @@ -0,0 +1,143 @@ +{ + "arcs": [ + 22, + 28 + ], + "name": "MerkleTree", + "structs": {}, + "methods": [ + { + "name": "create", + "args": [ + { + "type": "byte[32]", + "name": "root" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "verify", + "args": [ + { + "type": "byte[32][]", + "name": "proof" + }, + { + "type": "byte[32]", + "name": "leaf" + } + ], + "returns": { + "type": "bool" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 1 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": { + "root": { + "keyType": "AVMString", + "valueType": "AVMBytes", + "key": "cm9vdA==" + } + }, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [], + "call": [] + }, + "events": [], + "templateVariables": {}, + "networks": {}, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 51, + 67 + ], + "errorMessage": "OnCompletion is NoOp" + }, + { + "pc": [ + 114 + ], + "errorMessage": "check self.root exists" + }, + { + "pc": [ + 55 + ], + "errorMessage": "is creating" + }, + { + "pc": [ + 70 + ], + "errorMessage": "is not creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgpleGFtcGxlcy5tZXJrbGUuY29udHJhY3QuTWVya2xlVHJlZS5hcHByb3ZhbF9wcm9ncmFtOgogICAgaW50Y2Jsb2NrIDAgMSAzMgogICAgYnl0ZWNibG9jayAicm9vdCIKICAgIGNhbGxzdWIgX19wdXlhX2FyYzRfcm91dGVyX18KICAgIHJldHVybgoKCi8vIGV4YW1wbGVzLm1lcmtsZS5jb250cmFjdC5NZXJrbGVUcmVlLl9fcHV5YV9hcmM0X3JvdXRlcl9fKCkgLT4gdWludDY0OgpfX3B1eWFfYXJjNF9yb3V0ZXJfXzoKICAgIC8vIG1lcmtsZS9jb250cmFjdC5weTo5CiAgICAvLyBjbGFzcyBNZXJrbGVUcmVlK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JbnQuZnJvbV9ieXRlcyhiKSBlbHNlIGIgKyBhKQogICAgZnJhbWVfZGlnIC0xCiAgICBmcmFtZV9kaWcgLTIKICAgIGNvbmNhdAoKaGFzaF9wYWlyX3Rlcm5hcnlfbWVyZ2VAMzoKICAgIC8vIG1lcmtsZS9jb250cmFjdC5weToyOQogICAgLy8gcmV0dXJuIG9wLnNoYTI1NihhICsgYiBpZiBCaWdVSW50LmZyb21fYnl0ZXMoYSkgPCBCaWdVSW50LmZyb21fYnl0ZXMoYikgZWxzZSBiICsgYSkKICAgIHNoYTI1NgogICAgcmV0c3ViCg==", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgpleGFtcGxlcy5tZXJrbGUuY29udHJhY3QuTWVya2xlVHJlZS5jbGVhcl9zdGF0ZV9wcm9ncmFtOgogICAgcHVzaGludCAxIC8vIDEKICAgIHJldHVybgo=" + }, + "byteCode": { + "approval": "CiADAAEgJgEEcm9vdIgAAUOKAAExG0EASYICBIQkIDsEwCkK1TYaAI4CAAIAEiKJMRkURDEYFEQ2GgGIACYjiTEZFEQxGEQ2GgE2GgKIAByAAQAiTwJUgAQVH3x1TFCwI4kiiYoBACiL/2eJigIBIihlRIv+i/+IAASM/hKJigICi/4iWSKL/4sBiwAMQQAdi/5XAgCLAUlOAiQLJFiLAkyIABKMAiMIjAFC/9uLAov+jAGMAImKAgGL/ov/pEEACIv+i/9QQgAFi/+L/lABiQ==", + "clear": "CoEBQw==" + }, + "compilerInfo": { + "compiler": "puya", + "compilerVersion": { + "major": 99, + "minor": 99, + "patch": 99 + } + } +} \ No newline at end of file diff --git a/examples/merkle/puya.log b/examples/merkle/puya.log index 9bfcfc3b75..859b54eeb0 100644 --- a/examples/merkle/puya.log +++ b/examples/merkle/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['merkle'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['merkle'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing merkle/out/module.awst debug: Sealing block@0: // L12 @@ -749,6 +749,7 @@ debug: shared x-stack for hash_pair_ternary_false@2 -> hash_pair_ternary_merge@3 debug: examples.merkle.contract.compute_root_hash f-stack entry: [] debug: examples.merkle.contract.compute_root_hash f-stack on first store: ['tmp%0#0', 'idx#0', 'computed#1'] info: Writing merkle/out/MerkleTree.arc32.json +info: Writing merkle/out/MerkleTree.arc56.json info: Writing merkle/out/MerkleTree.approval.teal info: Writing merkle/out/MerkleTree.clear.teal info: Writing merkle/out/MerkleTree.approval.bin diff --git a/examples/sizes.txt b/examples/sizes.txt index 73a0e29893..478835ca66 100644 --- a/examples/sizes.txt +++ b/examples/sizes.txt @@ -21,6 +21,7 @@ arc4_types/Arc4StructsType 302 239 - | 204 121 - arc4_types/Arc4TuplesType 795 136 - | 537 58 - arc_28/EventEmitter 186 133 - | 100 64 - + arc_56 678 465 - | 355 190 - asset/Reference 268 261 - | 144 141 - auction/Auction 592 522 - | 328 281 - augmented_assignment/Augmented 151 156 - | 77 78 - @@ -130,4 +131,4 @@ unssa/UnSSA 432 368 - | 241 204 - voting/VotingRoundApp 1593 1483 - | 734 649 - with_reentrancy/WithReentrancy 255 242 - | 132 122 - - Total 69011 53428 53369 | 32727 21672 21628 \ No newline at end of file + Total 69689 53893 53834 | 33082 21862 21818 \ No newline at end of file diff --git a/examples/struct_in_box/out/ExampleContract.arc56.json b/examples/struct_in_box/out/ExampleContract.arc56.json new file mode 100644 index 0000000000..98008dc2d5 --- /dev/null +++ b/examples/struct_in_box/out/ExampleContract.arc56.json @@ -0,0 +1,186 @@ +{ + "arcs": [ + 22, + 28 + ], + "name": "ExampleContract", + "structs": { + "UserStruct": [ + { + "name": "name", + "type": "string" + }, + { + "name": "id", + "type": "uint64" + }, + { + "name": "asset", + "type": "uint64" + } + ] + }, + "methods": [ + { + "name": "add_user", + "args": [ + { + "type": "(string,uint64,uint64)", + "struct": "UserStruct", + "name": "user" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "attach_asset_to_user", + "args": [ + { + "type": "uint64", + "name": "user_id" + }, + { + "type": "asset", + "name": "asset" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "get_user", + "args": [ + { + "type": "uint64", + "name": "user_id" + } + ], + "returns": { + "type": "(string,uint64,uint64)", + "struct": "UserStruct" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "events": [], + "templateVariables": {}, + "networks": {}, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 50, + 65, + 86 + ], + "errorMessage": "OnCompletion is NoOp" + }, + { + "pc": [ + 132 + ], + "errorMessage": "User with id must not exist" + }, + { + "pc": [ + 191 + ], + "errorMessage": "User with that id does not exist" + }, + { + "pc": [ + 115 + ], + "errorMessage": "is creating" + }, + { + "pc": [ + 53, + 68, + 89 + ], + "errorMessage": "is not creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgpleGFtcGxlcy5zdHJ1Y3RfaW5fYm94LmNvbnRyYWN0LkV4YW1wbGVDb250cmFjdC5hcHByb3ZhbF9wcm9ncmFtOgogICAgaW50Y2Jsb2NrIDEgMAogICAgY2FsbHN1YiBfX3B1eWFfYXJjNF9yb3V0ZXJfXwogICAgcmV0dXJuCgoKLy8gZXhhbXBsZXMuc3RydWN0X2luX2JveC5jb250cmFjdC5FeGFtcGxlQ29udHJhY3QuX19wdXlhX2FyYzRfcm91dGVyX18oKSAtPiB1aW50NjQ6Cl9fcHV5YV9hcmM0X3JvdXRlcl9fOgogICAgLy8gc3RydWN0X2luX2JveC9jb250cmFjdC5weToxMAogICAgLy8gY2xhc3MgRXhhbXBsZUNvbnRyYWN0KEFSQzRDb250cmFjdCk6CiAgICBwcm90byAwIDEKICAgIHR4biBOdW1BcHBBcmdzCiAgICBieiBfX3B1eWFfYXJjNF9yb3V0ZXJfX19iYXJlX3JvdXRpbmdANwogICAgcHVzaGJ5dGVzcyAweGRhODUzNGJkIDB4NGViNGU5ZjEgMHgxNjU0NTg4MCAvLyBtZXRob2QgImFkZF91c2VyKChzdHJpbmcsdWludDY0LHVpbnQ2NCkpdm9pZCIsIG1ldGhvZCAiYXR0YWNoX2Fzc2V0X3RvX3VzZXIodWludDY0LGFzc2V0KXZvaWQiLCBtZXRob2QgImdldF91c2VyKHVpbnQ2NCkoc3RyaW5nLHVpbnQ2NCx1aW50NjQpIgogICAgdHhuYSBBcHBsaWNhdGlvbkFyZ3MgMAogICAgbWF0Y2ggX19wdXlhX2FyYzRfcm91dGVyX19fYWRkX3VzZXJfcm91dGVAMiBfX3B1eWFfYXJjNF9yb3V0ZXJfX19hdHRhY2hfYXNzZXRfdG9fdXNlcl9yb3V0ZUAzIF9fcHV5YV9hcmM0X3JvdXRlcl9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ieXRlczoKZ2V0X3VzZXI6CiAgICAvLyBzdHJ1Y3RfaW5fYm94L2NvbnRyYWN0LnB5OjQyLTQzCiAgICAvLyBAYXJjNC5hYmltZXRob2QoKQogICAgLy8gZGVmIGdldF91c2VyKHNlbGYsIHVzZXJfaWQ6IGFyYzQuVUludDY0KSAtPiBVc2VyU3RydWN0OgogICAgcHJvdG8gMSAxCiAgICAvLyBzdHJ1Y3RfaW5fYm94L2NvbnRyYWN0LnB5OjQ0CiAgICAvLyByZXR1cm4gc2VsZi5yZWFkX2Zyb21fYm94KHVzZXJfaWQpCiAgICBmcmFtZV9kaWcgLTEKICAgIGNhbGxzdWIgcmVhZF9mcm9tX2JveAogICAgcmV0c3ViCg==", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgpleGFtcGxlcy5zdHJ1Y3RfaW5fYm94LmNvbnRyYWN0LkV4YW1wbGVDb250cmFjdC5jbGVhcl9zdGF0ZV9wcm9ncmFtOgogICAgcHVzaGludCAxIC8vIDEKICAgIHJldHVybgo=" + }, + "byteCode": { + "approval": "CiACAQCIAAFDigABMRtBAFqCAwTahTS9BE606fEEFlRYgDYaAI4DAAIAEQAmI4kxGRREMRhENhoBiAA8IokxGRREMRhENhoBNhoCF8AwiABWIokxGRREMRhENhoBiABhgAQVH3x1TFCwIokxGUAABjEYFEQiiSOJigEAi/9XAgiIAAoURIv/iAAMjP+JigEBi/++RQGJigEBi/9XAghJvEiL/7+L/4mKAgCL/ogACov/FlwKiP/fSImKAQGL/75EiYoBAYv/iP/wiQ==", + "clear": "CoEBQw==" + }, + "compilerInfo": { + "compiler": "puya", + "compilerVersion": { + "major": 99, + "minor": 99, + "patch": 99 + } + } +} \ No newline at end of file diff --git a/examples/struct_in_box/out/client_ExampleContract.py b/examples/struct_in_box/out/client_ExampleContract.py index fb5e2d2137..3033b5dd8e 100644 --- a/examples/struct_in_box/out/client_ExampleContract.py +++ b/examples/struct_in_box/out/client_ExampleContract.py @@ -28,4 +28,4 @@ def attach_asset_to_user( def get_user( self, user_id: algopy.arc4.UIntN[typing.Literal[64]], - ) -> UserStruct: ... + ) -> algopy.arc4.Tuple[algopy.arc4.String, algopy.arc4.UIntN[typing.Literal[64]], algopy.arc4.UIntN[typing.Literal[64]]]: ... diff --git a/examples/struct_in_box/puya.log b/examples/struct_in_box/puya.log index 0685adb2f5..aac6e5d8b6 100644 --- a/examples/struct_in_box/puya.log +++ b/examples/struct_in_box/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['struct_in_box'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['struct_in_box'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv struct_in_box/contract.py:22:9 warning: expression result is ignored info: writing struct_in_box/out/module.awst @@ -817,6 +817,7 @@ debug: Inserted get_user_block@0.ops[2]: 'l-store-copy tmp%0#0 0' debug: Replaced get_user_block@0.ops[4]: 'v-load tmp%0#0' with 'l-load tmp%0#0' debug: Found 3 edge set/s for examples.struct_in_box.contract.ExampleContract.__puya_arc4_router__ info: Writing struct_in_box/out/ExampleContract.arc32.json +info: Writing struct_in_box/out/ExampleContract.arc56.json info: Writing struct_in_box/out/ExampleContract.approval.teal info: Writing struct_in_box/out/ExampleContract.clear.teal info: Writing struct_in_box/out/ExampleContract.approval.bin diff --git a/examples/tictactoe/out/TicTacToeContract.arc56.json b/examples/tictactoe/out/TicTacToeContract.arc56.json new file mode 100644 index 0000000000..627b4902ef --- /dev/null +++ b/examples/tictactoe/out/TicTacToeContract.arc56.json @@ -0,0 +1,268 @@ +{ + "arcs": [ + 22, + 28 + ], + "name": "TicTacToeContract", + "structs": {}, + "methods": [ + { + "name": "new_game", + "args": [ + { + "type": "(uint64,uint64)", + "name": "move" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [ + "NoOp" + ], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "join_game", + "args": [ + { + "type": "(uint64,uint64)", + "name": "move" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "whose_turn", + "args": [], + "returns": { + "type": "uint8" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "play", + "args": [ + { + "type": "(uint64,uint64)", + "name": "move" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "state": { + "schema": { + "global": { + "ints": 1, + "bytes": 4 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": { + "host": { + "keyType": "AVMString", + "valueType": "AVMBytes", + "key": "aG9zdA==" + }, + "game": { + "keyType": "AVMString", + "valueType": "uint8[3][3]", + "key": "Z2FtZQ==" + }, + "turns": { + "keyType": "AVMString", + "valueType": "AVMUint64", + "key": "dHVybnM=" + }, + "challenger": { + "keyType": "AVMString", + "valueType": "AVMBytes", + "key": "Y2hhbGxlbmdlcg==" + }, + "winner": { + "keyType": "AVMString", + "valueType": "uint8", + "key": "d2lubmVy" + } + }, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [], + "call": [] + }, + "events": [], + "templateVariables": {}, + "networks": {}, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 636 + ], + "errorMessage": "Game is already finished" + }, + { + "pc": [ + 214 + ], + "errorMessage": "Game isn't over" + }, + { + "pc": [ + 301 + ], + "errorMessage": "Host already has a challenger" + }, + { + "pc": [ + 267, + 281, + 372, + 386 + ], + "errorMessage": "Index access is out of bounds" + }, + { + "pc": [ + 670 + ], + "errorMessage": "It is the challenger's turn" + }, + { + "pc": [ + 655 + ], + "errorMessage": "It is the host's turn" + }, + { + "pc": [ + 251, + 339 + ], + "errorMessage": "Move must be in range" + }, + { + "pc": [ + 99, + 121, + 146, + 167 + ], + "errorMessage": "OnCompletion is NoOp" + }, + { + "pc": [ + 361 + ], + "errorMessage": "Square is already taken" + }, + { + "pc": [ + 255, + 276, + 343, + 365, + 381, + 448 + ], + "errorMessage": "check self.game exists" + }, + { + "pc": [ + 653 + ], + "errorMessage": "check self.host exists" + }, + { + "pc": [ + 396, + 424, + 615, + 640 + ], + "errorMessage": "check self.turns exists" + }, + { + "pc": [ + 124, + 149, + 170 + ], + "errorMessage": "is not creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgpleGFtcGxlcy50aWN0YWN0b2UudGljdGFjdG9lLlRpY1RhY1RvZUNvbnRyYWN0LmFwcHJvdmFsX3Byb2dyYW06CiAgICBpbnRjYmxvY2sgMCAxIDMgOQogICAgYnl0ZWNibG9jayAiZ2FtZSIgInR1cm5zIiAiY2hhbGxlbmdlciIgIndpbm5lciIgMHgwMSAweDAyICJob3N0IgogICAgY2FsbHN1YiBfX3B1eWFfYXJjNF9yb3V0ZXJfXwogICAgcmV0dXJuCgoKLy8gZXhhbXBsZXMudGljdGFjdG9lLnRpY3RhY3RvZS5UaWNUYWNUb2VDb250cmFjdC5fX3B1eWFfYXJjNF9yb3V0ZXJfXygpIC0+IHVpbnQ2NDoKX19wdXlhX2FyYzRfcm91dG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iBtYWtlX21vdmUKICAgIHJldHN1Ygo=", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgpleGFtcGxlcy50aWN0YWN0b2UudGljdGFjdG9lLlRpY1RhY1RvZUNvbnRyYWN0LmNsZWFyX3N0YXRlX3Byb2dyYW06CiAgICBwdXNoaW50IDEgLy8gMQogICAgcmV0dXJuCg==" + }, + "byteCode": { + "approval": "CiAEAAEDCSYHBGdhbWUFdHVybnMKY2hhbGxlbmdlcgZ3aW5uZXIBAQECBGhvc3SIAAFDigABMRtBAIKCBASWqXGBBBegebMEu58RRwSe6/WONhoAjgQAAgAYADEARiKJMRkURDYaAUlXAAgXTFcICBeIAEsjiTEZFEQxGEQ2GgFJVwAIF0xXCAgXiACXI4kxGRREMRhEiAHIgAQVH3x1TFCwI4kxGRREMRhENhoBSVcACBdMVwgIF4gBuCOJIomKAgCAADEYQQASIiplRQFBAAYiK2VFAUQqaStpJwYxAGclryhMZ4v+JAxJjABBAAuL/yQMQQAEI0IAASJEIihlRIv/JAtMSwEkWIsARIv+JwRdIihlRIv/JAxETgJdKExnKSJniYoCACIqZUUBFEQqMQBnJwWL/ov/iAABiYoDAIv+JAxJQQALi/8kDEEABCNCAAEiRCIoZUSL/yQLTEsBJFiL/iNYgAEAqEQiKGVESwEkWIsARIv+i/1dIihlRIv/JAxETgJdKExnIillRCMIKUxni/2L/ov/iAAZQQAHK4v9Z0IADiIpZUQlEkEABSuAAQNniYoDASJHAyhlTElPAkSL/yQLJFhHAlcAAUxXAQFJTgKoQQAPiwRXAgGLBahBAAQjjACJiwNJVwADSYwBi/4jWExXAwNJjAKL/iNYSYwAqEEAE4sDVwYDi/4jWIsAqEEABCOMAImLAlcBAYv9qEEAOosBVwABi/2oQQASiwNXBgNXAgGL/ahBAAQjjACJiwFXAgGL/ahBABKLA1cGA1cAAYv9qEEABCOMAIkijACJigABIillRIECGCcFJwRPAk2JigIAIitlRQEURCIpZUSBAhhBAA4xACInBmVEEkQnBEIADDEAMgMiKmVNEkQnBYv+i/+I/pSJ", + "clear": "CoEBQw==" + }, + "compilerInfo": { + "compiler": "puya", + "compilerVersion": { + "major": 99, + "minor": 99, + "patch": 99 + } + } +} \ No newline at end of file diff --git a/examples/tictactoe/puya.log b/examples/tictactoe/puya.log index 7c52543c53..196156f18d 100644 --- a/examples/tictactoe/puya.log +++ b/examples/tictactoe/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['tictactoe'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['tictactoe'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing tictactoe/out/module.awst debug: Sealing block@0: // L12 @@ -1609,6 +1609,7 @@ debug: examples.tictactoe.tictactoe.TicTacToeContract.make_move f-stack on first debug: examples.tictactoe.tictactoe.TicTacToeContract.did_win f-stack entry: ['awst_tmp%1#0', 'tmp%5#0', 'tmp%6#0'] debug: examples.tictactoe.tictactoe.TicTacToeContract.did_win f-stack on first store: ['g#0', 'tmp%0#0', 'awst_tmp%0#0'] info: Writing tictactoe/out/TicTacToeContract.arc32.json +info: Writing tictactoe/out/TicTacToeContract.arc56.json info: Writing tictactoe/out/TicTacToeContract.approval.teal info: Writing tictactoe/out/TicTacToeContract.clear.teal info: Writing tictactoe/out/TicTacToeContract.approval.bin diff --git a/examples/voting/out/VotingRoundApp.arc56.json b/examples/voting/out/VotingRoundApp.arc56.json new file mode 100644 index 0000000000..8aae485e0d --- /dev/null +++ b/examples/voting/out/VotingRoundApp.arc56.json @@ -0,0 +1,495 @@ +{ + "arcs": [ + 22, + 28 + ], + "name": "VotingRoundApp", + "structs": { + "VotingPreconditions": [ + { + "name": "is_voting_open", + "type": "uint64" + }, + { + "name": "is_allowed_to_vote", + "type": "uint64" + }, + { + "name": "has_already_voted", + "type": "uint64" + }, + { + "name": "current_time", + "type": "uint64" + } + ] + }, + "methods": [ + { + "name": "create", + "args": [ + { + "type": "string", + "name": "vote_id" + }, + { + "type": "byte[]", + "name": "snapshot_public_key" + }, + { + "type": "string", + "name": "metadata_ipfs_cid" + }, + { + "type": "uint64", + "name": "start_time" + }, + { + "type": "uint64", + "name": "end_time" + }, + { + "type": "uint8[]", + "name": "option_counts" + }, + { + "type": "uint64", + "name": "quorum" + }, + { + "type": "string", + "name": "nft_image_url" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "bootstrap", + "args": [ + { + "type": "pay", + "name": "fund_min_bal_req" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "close", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "get_preconditions", + "args": [ + { + "type": "byte[]", + "name": "signature" + } + ], + "returns": { + "type": "(uint64,uint64,uint64,uint64)", + "struct": "VotingPreconditions" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": true, + "events": [], + "recommendations": {} + }, + { + "name": "vote", + "args": [ + { + "type": "pay", + "name": "fund_min_bal_req" + }, + { + "type": "byte[]", + "name": "signature" + }, + { + "type": "uint8[]", + "name": "answer_ids" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "state": { + "schema": { + "global": { + "ints": 8, + "bytes": 5 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": { + "is_bootstrapped": { + "keyType": "AVMString", + "valueType": "AVMUint64", + "key": "aXNfYm9vdHN0cmFwcGVk" + }, + "voter_count": { + "keyType": "AVMString", + "valueType": "AVMUint64", + "key": "dm90ZXJfY291bnQ=" + }, + "vote_id": { + "keyType": "AVMString", + "valueType": "AVMString", + "key": "dm90ZV9pZA==" + }, + "snapshot_public_key": { + "keyType": "AVMString", + "valueType": "AVMBytes", + "key": "c25hcHNob3RfcHVibGljX2tleQ==" + }, + "metadata_ipfs_cid": { + "keyType": "AVMString", + "valueType": "AVMString", + "key": "bWV0YWRhdGFfaXBmc19jaWQ=" + }, + "start_time": { + "keyType": "AVMString", + "valueType": "AVMUint64", + "key": "c3RhcnRfdGltZQ==" + }, + "end_time": { + "keyType": "AVMString", + "valueType": "AVMUint64", + "key": "ZW5kX3RpbWU=" + }, + "quorum": { + "keyType": "AVMString", + "valueType": "AVMUint64", + "key": "cXVvcnVt" + }, + "nft_image_url": { + "keyType": "AVMString", + "valueType": "AVMString", + "key": "bmZ0X2ltYWdlX3VybA==" + }, + "nft_asset_id": { + "keyType": "AVMString", + "valueType": "AVMUint64", + "key": "bmZ0X2Fzc2V0X2lk" + }, + "option_counts": { + "keyType": "AVMString", + "valueType": "uint8[]", + "key": "b3B0aW9uX2NvdW50cw==" + }, + "total_options": { + "keyType": "AVMString", + "valueType": "AVMUint64", + "key": "dG90YWxfb3B0aW9ucw==" + }, + "close_time": { + "keyType": "AVMString", + "valueType": "AVMUint64", + "key": "Y2xvc2VfdGltZQ==" + } + }, + "local": {}, + "box": { + "tally_box": { + "keyType": "AVMString", + "valueType": "AVMBytes", + "key": "Vg==" + } + } + }, + "maps": { + "global": {}, + "local": {}, + "box": { + "votes_by_account": { + "keyType": "AVMBytes", + "valueType": "uint8[]", + "prefix": "" + } + } + } + }, + "bareActions": { + "create": [], + "call": [] + }, + "events": [], + "templateVariables": {}, + "networks": {}, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 592 + ], + "errorMessage": "Already closed" + }, + { + "pc": [ + 1272 + ], + "errorMessage": "Already voted" + }, + { + "pc": [ + 1354 + ], + "errorMessage": "Answer option index invalid" + }, + { + "pc": [ + 459 + ], + "errorMessage": "Can't have more than 112 questions" + }, + { + "pc": [ + 502 + ], + "errorMessage": "Can't have more than 128 vote options" + }, + { + "pc": [ + 398 + ], + "errorMessage": "End time should be after start time" + }, + { + "pc": [ + 404 + ], + "errorMessage": "End time should be in the future" + }, + { + "pc": [ + 524 + ], + "errorMessage": "Must not be already bootstrapped" + }, + { + "pc": [ + 1263 + ], + "errorMessage": "Not allowed to vote" + }, + { + "pc": [ + 1288 + ], + "errorMessage": "Number of answers incorrect" + }, + { + "pc": [ + 247, + 299, + 321, + 333, + 360 + ], + "errorMessage": "OnCompletion is NoOp" + }, + { + "pc": [ + 561 + ], + "errorMessage": "Payment must be for the exact min balance requirement" + }, + { + "pc": [ + 1316 + ], + "errorMessage": "Payment must be the exact min balance" + }, + { + "pc": [ + 535, + 1307 + ], + "errorMessage": "Payment must be to app address" + }, + { + "pc": [ + 1267 + ], + "errorMessage": "Voting not open" + }, + { + "pc": [ + 1203 + ], + "errorMessage": "check self.end_time exists" + }, + { + "pc": [ + 522, + 1172 + ], + "errorMessage": "check self.is_bootstrapped exists" + }, + { + "pc": [ + 737 + ], + "errorMessage": "check self.metadata_ipfs_cid exists" + }, + { + "pc": [ + 1024 + ], + "errorMessage": "check self.nft_image_url exists" + }, + { + "pc": [ + 826, + 1276, + 1343 + ], + "errorMessage": "check self.option_counts exists" + }, + { + "pc": [ + 773 + ], + "errorMessage": "check self.quorum exists" + }, + { + "pc": [ + 1233 + ], + "errorMessage": "check self.snapshot_public_key exists" + }, + { + "pc": [ + 1189 + ], + "errorMessage": "check self.start_time exists" + }, + { + "pc": [ + 540 + ], + "errorMessage": "check self.total_options exists" + }, + { + "pc": [ + 601, + 753, + 1001 + ], + "errorMessage": "check self.vote_id exists" + }, + { + "pc": [ + 798, + 1378 + ], + "errorMessage": "check self.voter_count exists" + }, + { + "pc": [ + 251 + ], + "errorMessage": "is creating" + }, + { + "pc": [ + 302, + 324, + 336, + 363 + ], + "errorMessage": "is not creating" + }, + { + "pc": [ + 455 + ], + "errorMessage": "option_counts should be non-empty" + }, + { + "pc": [ + 312, + 373 + ], + "errorMessage": "transaction type is pay" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgpleGFtcGxlcy52b3Rpbmcudm90aW5nLlZvdGluZ1JvdW5kQXBwLmFwcHJvdmFsX3Byb2dyYW06CiAgICBpbnRjYmxvY2sgMCAxIDEwIDgKICAgIGJ5dGVjYmxvY2sgInZvdGVfaWQiICJvcHRpb25fY291bnRzIiAiaXNfYm9vdHN0cmFwcGVkIiAidm90ZXJfY291bnQiICJWIiAiY2xvc2VfdGltZSIgInNuYXBzaG90X3B1YmxpY19rZXkiICJtZXRhZGF0YV9pcGZzX2NpZCIgInN0YXJ0X3RpbWUiICJlbmRfdGltZSIgInF1b3J1bSIgIm5mdF9pbWFnZV91cmwiICJ0b3RhbF9vcHRpb25zIiAweDMwMzEzMjMzMzQzNTM2MzczODM5IDB4MDY4MTAxCiAgICB0eG4gQXBwbGljYXRpb25JRAogICAgYm56IG1haW5fZW50cnlwb2ludEAyCiAgICBjYWxsc3ViIF9faW5pdF9fCgptYWluX2VudHJ5cG9pbnRAMjoKICAgIGNhbGxzdWIgX19wdXlhX2FyYzRfcm91dGVyX18KICAgIHJldHVybgoKCi8vIGV4YW1wbGVzLnZvdGluZy52b3RpbmcuVm90aW5nUm91bmRBcHAuX19wdXlhX2FyYzRfcm91dGVyX18oKSAtPiB1aW50NjQ6Cl9fcHV5YV9hc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CiAC3iACJUIwFIwiMBosDIwiMA0L/yosFgAFdUIsGjAKMAIsCjAaLAIwFiwkjCIwJQv9jiwWAA119fVCxMgAiKGVEgA5bVk9URSBSRVNVTFRdIExQIicLZURPA7IFsieACFZPVEVSU0xUsiWyJiKyJCKyIyOyIoEDshCyAbOADG5mdF9hc3NldF9pZLQ8Z4mKAQGL/yQMQQAMi/8jCCcNi/9PAlKJi/8kCoj/44v/JBhJIwgnDU4CUlCJigEBJwSL/yW6F4mKAQGIABkWi/+IAEgWiABaFjIHFk8DTwNQTwJQTFCJigABgAAiKmVEQQAmIicFZUUBQAAdIicIZUQyB0mMAA5BAA8iJwllRIsAD0EABCNCAAEiTImKAQGB0A8iiADCMQAiJwZlRIv/TISJigABMQC9RQGJigMAgZQ8IogAo4v+iP/SRIj/mUSI/+AURCIpZUQiWUmL/yJZSU8CEkSBIgiBkAMLgcQTCIv9OAcyChJESRawi/04CBJEIkmLAosADEEAQIv/VwIAiwJJTgIjWBciKWVEVwIASwIjWBdKDESLAUlPAwiIABwIjAExAEm8SIv/vyIrZUQjCCtMZyMIjAJC/7iJigEAi/+I/uojCBYnBIv/TwK7iYoAACoiZysiZ4mKAgCL/iQIiwAyDA1BACqxgQayEIEFshknDrIeJw6yH4v/jQIAAwAJQgAKIrIBQgAEMgCyAbNC/86J", + "clear": "CoEBQw==" + }, + "compilerInfo": { + "compiler": "puya", + "compilerVersion": { + "major": 99, + "minor": 99, + "patch": 99 + } + } +} \ No newline at end of file diff --git a/examples/voting/out/client_VotingRoundApp.py b/examples/voting/out/client_VotingRoundApp.py index 394fb0fe69..d41a3400bc 100644 --- a/examples/voting/out/client_VotingRoundApp.py +++ b/examples/voting/out/client_VotingRoundApp.py @@ -40,7 +40,7 @@ def close( def get_preconditions( self, signature: algopy.arc4.DynamicBytes, - ) -> VotingPreconditions: ... + ) -> algopy.arc4.Tuple[algopy.arc4.UIntN[typing.Literal[64]], algopy.arc4.UIntN[typing.Literal[64]], algopy.arc4.UIntN[typing.Literal[64]], algopy.arc4.UIntN[typing.Literal[64]]]: ... @algopy.arc4.abimethod def vote( diff --git a/examples/voting/puya.log b/examples/voting/puya.log index ece5ec9957..594d16c319 100644 --- a/examples/voting/puya.log +++ b/examples/voting/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['voting'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['voting'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing voting/out/module.awst debug: Sealing block@0: // L12 @@ -2042,6 +2042,7 @@ debug: examples.voting.voting.VotingRoundApp.vote f-stack on first store: ['ques debug: _puya_lib.util.ensure_budget f-stack entry: [] debug: _puya_lib.util.ensure_budget f-stack on first store: ['required_budget_with_buffer#0'] info: Writing voting/out/VotingRoundApp.arc32.json +info: Writing voting/out/VotingRoundApp.arc56.json info: Writing voting/out/VotingRoundApp.approval.teal info: Writing voting/out/VotingRoundApp.clear.teal info: Writing voting/out/VotingRoundApp.approval.bin diff --git a/scripts/compile_all_examples.py b/scripts/compile_all_examples.py index 4cc607dcd1..2a8adce0ab 100755 --- a/scripts/compile_all_examples.py +++ b/scripts/compile_all_examples.py @@ -1,5 +1,6 @@ #!/usr/bin/env python3 import argparse +import json import operator import os import re @@ -235,6 +236,11 @@ def checked_compile( ) bin_files_written = re.findall(r"info: Writing (.+\.bin)", result.stdout) + # normalize ARC-56 output + arc56_files_written = re.findall(r"info: Writing (.+\.arc56\.json)", result.stdout) + for arc56_file in arc56_files_written: + _normalize_arc56(root / arc56_file) + if write_logs: if p.is_dir(): log_path = p / "puya.log" @@ -252,6 +258,15 @@ def checked_compile( ) +def _normalize_arc56(path: Path) -> None: + arc56 = json.loads(path.read_text()) + compiler_version = arc56.get("compilerInfo", {}).get("compilerVersion", {}) + compiler_version["major"] = 99 + compiler_version["minor"] = 99 + compiler_version["patch"] = 99 + path.write_text(json.dumps(arc56, indent=4), encoding="utf8") + + def _load_template_vars(path: Path) -> Iterable[str]: if path.exists(): for line in path.read_text("utf8").splitlines(): @@ -294,6 +309,7 @@ def _compile_for_level(arg: tuple[Path, int]) -> tuple[CompilationResult, int]: "--output-memory-ir", "--output-client", "--output-source-map", + "--output-arc56", ] out_suffix = SUFFIX_O1 write_logs = True diff --git a/src/puya/arc32.py b/src/puya/arc32.py index 5d8f44503a..73f9aa2d2e 100644 --- a/src/puya/arc32.py +++ b/src/puya/arc32.py @@ -10,6 +10,7 @@ ARC4BareMethod, ARC4CreateOption, ARC4MethodConfig, + ARC4Struct, ContractMetaData, ContractState, OnCompletionAction, @@ -39,7 +40,7 @@ def _encode_source(teal_text: str) -> str: def _encode_schema_declaration(state: ContractState) -> JSONDict: return { "type": state.storage_type.name, - "key": state.key.decode("utf-8"), # TODO: support not utf8 keys? + "key": state.key_or_prefix.decode("utf-8"), # TODO: support not utf8 keys? "descr": state.description, } @@ -97,12 +98,12 @@ def _encode_default_arg( return { "source": "global-state", # TODO: handle non utf-8 bytes - "data": state.key.decode("utf-8"), + "data": state.key_or_prefix.decode("utf-8"), } if state := metadata.local_state.get(source): return { "source": "local-state", - "data": state.key.decode("utf-8"), + "data": state.key_or_prefix.decode("utf-8"), } for method in metadata.arc4_methods: if isinstance(method, ARC4ABIMethod) and method.name == source: @@ -115,6 +116,9 @@ def _encode_default_arg( def _encode_arc32_method_hint(metadata: ContractMetaData, method: ARC4ABIMethod) -> JSONDict: + structs = {a.name: metadata.structs[a.struct] for a in method.args if a.struct} + if method.returns.struct: + structs["output"] = metadata.structs[method.returns.struct] return { # deprecated by ARC-22 "read_only": True if method.config.readonly else None, @@ -127,18 +131,18 @@ def _encode_arc32_method_hint(metadata: ContractMetaData, method: ARC4ABIMethod) else None ), "call_config": _encode_call_config(method.config), - "structs": _encode_arc32_method_structs(method), + "structs": _encode_arc32_method_structs(structs), } -def _encode_arc32_method_structs(method: ARC4ABIMethod) -> JSONDict | None: - if len(method.config.structs): +def _encode_arc32_method_structs(structs: Mapping[str, ARC4Struct]) -> JSONDict | None: + if len(structs): return { struct_purpose: { "name": struct_def.name, - "elements": struct_def.elements, + "elements": [[f.name, f.type] for f in struct_def.fields], } - for struct_purpose, struct_def in method.config.structs.items() + for struct_purpose, struct_def in structs.items() } return None diff --git a/src/puya/arc56.py b/src/puya/arc56.py new file mode 100644 index 0000000000..b1d6e6ad24 --- /dev/null +++ b/src/puya/arc56.py @@ -0,0 +1,328 @@ +import base64 +import itertools +import typing +from collections import defaultdict +from collections.abc import Iterable, Mapping, Sequence +from importlib.metadata import version as metadata_version + +from cattrs.preconf.json import make_converter +from packaging import version + +from puya import ( + arc56_models as models, + log, +) +from puya.errors import InternalError +from puya.models import ( + ARC4ABIMethod, + ARC4BareMethod, + ARC4CreateOption, + ARC4Struct, + CompiledProgram, + ContractMetaData, + ContractState, + DebugInfo, +) +from puya.utils import unique + +# TODO: use puya once the backend is shipped as separate package +_ALGOPY_VERSION = version.parse(metadata_version("puyapy")) +logger = log.get_logger(__name__) + + +def create_arc56_json( + *, + metadata: ContractMetaData, + approval_program: CompiledProgram, + clear_program: CompiledProgram, + template_prefix: str, +) -> str: + assert approval_program.debug_info is not None + assert clear_program.debug_info is not None + + converter = make_converter(omit_if_default=True) + bare_methods = [m for m in metadata.arc4_methods if isinstance(m, ARC4BareMethod)] + abi_methods = [m for m in metadata.arc4_methods if isinstance(m, ARC4ABIMethod)] + + # use shorter name for structs unless there is a collision + aliases = _StructAliases(metadata.structs.values()) + + schema = metadata.state_totals + app_spec = models.Contract( + arcs=(22, 28), + name=metadata.name, + desc=metadata.description, + networks={}, # TODO: for users to fill in? + structs={ + aliases.resolve(n): [ + models.StructField( + name=e.name, + type=aliases.resolve(e.struct) or e.type, + ) + for e in s.fields + ] + for n, s in metadata.structs.items() + }, + methods=[ + models.Method( + name=m.name, + desc=m.desc, + args=[ + models.MethodArg( + type=a.type_, + name=a.name, + desc=a.desc, + struct=aliases.resolve(a.struct), + defaultValue=_encode_default_arg( + metadata, m.config.default_args.get(a.name) + ), + ) + for a in m.args + ], + returns=models.MethodReturns( + type=m.returns.type_, + desc=m.returns.desc, + struct=aliases.resolve(m.returns.struct), + ), + actions=_method_actions(m), + readonly=m.config.readonly, + events=[_struct_to_event(aliases, struct) for struct in m.events], + recommendations=models.MethodRecommendations( + innerTransactionCount=None, # TODO: collect itxn count? + # TODO: users will fill these other ones in? + boxes=None, + accounts=None, + apps=None, + assets=None, + ), + ) + for m in abi_methods + ], + state=models.ContractState( + schema={ + "global": {"ints": schema.global_uints, "bytes": schema.global_bytes}, + "local": {"ints": schema.local_uints, "bytes": schema.local_bytes}, + }, + keys={ + "global": _storage_keys(aliases, metadata.global_state), + "local": _storage_keys(aliases, metadata.local_state), + "box": _storage_keys(aliases, metadata.boxes), + }, + maps={ + # note: at present there is no way of defining global/local maps + "global": _storage_maps(aliases, metadata.global_state), + "local": _storage_maps(aliases, metadata.local_state), + "box": _storage_maps(aliases, metadata.boxes), + }, + ), + bareActions=_combine_actions(list(map(_method_actions, bare_methods))), + sourceInfo={ + "approval": models.ProgramSourceInfo( + sourceInfo=_get_source_info(approval_program.debug_info), + pcOffsetMethod="cblocks" if approval_program.debug_info.op_pc_offset else "none", + ), + "clear": models.ProgramSourceInfo( + sourceInfo=_get_source_info(clear_program.debug_info), + pcOffsetMethod="cblocks" if clear_program.debug_info.op_pc_offset else "none", + ), + }, + source={ + "approval": _encode_str(approval_program.teal_src), + "clear": _encode_str(clear_program.teal_src), + }, + byteCode=( + { + "approval": _encode_bytes(approval_program.bytecode), + "clear": _encode_bytes(clear_program.bytecode), + } + if approval_program.bytecode and clear_program.bytecode + else None + ), + compilerInfo=( + _compiler_info() if approval_program.bytecode and clear_program.bytecode else None + ), + events=[ + _struct_to_event(aliases, struct) + for struct in unique( + e for m in metadata.arc4_methods if isinstance(m, ARC4ABIMethod) for e in m.events + ) + ], + templateVariables={ + name.removeprefix(template_prefix): models.TemplateVariable( + type=aliases.resolve(metadata.template_variable_types[name]), + value=( + _encode_bytes(value.to_bytes(length=8) if isinstance(value, int) else value) + if value is not None + else None + ), + ) + for program in (approval_program, clear_program) + for name, value in program.template_variables.items() + }, + # TODO: provide a way for contracts to declare "public" scratch vars + scratchVariables=None, + ) + return converter.dumps(app_spec, indent=4) + + +def _get_source_info(debug_info: DebugInfo) -> Sequence[models.SourceInfo]: + errors = defaultdict[str, list[int]](list) + for pc, event in debug_info.pc_events.items(): + if error := event.get("error"): + errors[error].append(pc) + return [ + models.SourceInfo( + pc=errors[error], + errorMessage=error, + ) + for error in sorted(errors) + ] + + +class _StructAliases: + def __init__(self, structs: Iterable[ARC4Struct]) -> None: + self.aliases = dict[str, str]() + for struct in structs: + self.aliases[struct.fullname] = ( + struct.fullname + if struct.name in self.aliases or struct.name in models.AVMType + else struct.name + ) + + def resolve[T: str | None](self, struct: T) -> T: + return self.aliases.get(struct, struct) # type: ignore[arg-type, return-value] + + +def _struct_to_event(structs: _StructAliases, struct: ARC4Struct) -> models.Event: + return models.Event( + name=struct.name, + desc=struct.desc, + args=[ + models.EventArg( + name=f.name, + type=f.type, + struct=structs.resolve(f.struct), + ) + for f in struct.fields + ], + ) + + +def _storage_keys( + structs: _StructAliases, state: Mapping[str, ContractState] +) -> models.StorageKeys: + return { + n: models.StorageKey( + desc=m.description, + keyType=structs.resolve(m.arc56_key_type), + valueType=structs.resolve(m.arc56_value_type), + key=_encode_bytes(m.key_or_prefix), + ) + for n, m in state.items() + if not m.is_map + } + + +def _storage_maps( + structs: _StructAliases, state: Mapping[str, ContractState] +) -> models.StorageMaps: + return { + n: models.StorageMap( + desc=m.description, + keyType=structs.resolve(m.arc56_key_type), + valueType=structs.resolve(m.arc56_value_type), + prefix=_encode_bytes(m.key_or_prefix), + ) + for n, m in state.items() + if m.is_map + } + + +def _method_actions(method: ARC4BareMethod | ARC4ABIMethod) -> models.MethodActions: + config = method.config + return models.MethodActions( + create=[ + oca.name + for oca in config.allowed_completion_types + if config.create != ARC4CreateOption.disallow and _allowed_create_oca(oca.name) + ], + call=[ + oca.name + for oca in config.allowed_completion_types + if config.create != ARC4CreateOption.require and _allowed_call_oca(oca.name) + ], + ) + + +def _encode_default_arg( + metadata: ContractMetaData, source: str | None +) -> models.MethodArgDefaultValue | None: + if source is None: + return None + if (state := metadata.global_state.get(source)) and not state.is_map: + return models.MethodArgDefaultValue( + data=_encode_bytes(state.key_or_prefix), + type=state.arc56_key_type, + source=models.DefaultValueSource.global_, + ) + if (state := metadata.local_state.get(source)) and not state.is_map: + return models.MethodArgDefaultValue( + data=_encode_bytes(state.key_or_prefix), + type=state.arc56_key_type, + source=models.DefaultValueSource.local_, + ) + if (state := metadata.boxes.get(source)) and not state.is_map: + return models.MethodArgDefaultValue( + data=_encode_bytes(state.key_or_prefix), + type=state.arc56_key_type, + source=models.DefaultValueSource.box, + ) + for method in metadata.arc4_methods: + if isinstance(method, ARC4ABIMethod) and method.name == source: + return models.MethodArgDefaultValue( + data=method.signature, + source=models.DefaultValueSource.method, + ) + # TODO: constants + raise InternalError(f"Cannot find {source=!r} on {metadata.ref}") + + +def _combine_actions(actions: Sequence[models.MethodActions]) -> models.MethodActions: + return models.MethodActions( + create=sorted(set(itertools.chain.from_iterable(a.create for a in actions))), + call=sorted(set(itertools.chain.from_iterable(a.call for a in actions))), + ) + + +def _allowed_create_oca( + oca: str, +) -> typing.TypeGuard[typing.Literal["NoOp", "OptIn", "DeleteApplication"]]: + return oca in ("NoOp", "OptIn", "DeleteApplication") + + +def _allowed_call_oca( + oca: str, +) -> typing.TypeGuard[ + typing.Literal["NoOp", "OptIn", "CloseOut", "UpdateApplication", "DeleteApplication"] +]: + return oca in ("NoOp", "OptIn", "CloseOut", "UpdateApplication", "DeleteApplication") + + +def _encode_str(value: str) -> str: + return _encode_bytes(value.encode("utf8")) + + +def _encode_bytes(value: bytes) -> str: + return base64.b64encode(value).decode("utf-8") + + +def _compiler_info() -> models.CompilerInfo: + return models.CompilerInfo( + compiler="puya", + compilerVersion=models.CompilerVersion( + major=_ALGOPY_VERSION.major, + minor=_ALGOPY_VERSION.minor, + patch=_ALGOPY_VERSION.micro, + commitHash=None, + ), + ) diff --git a/src/puya/arc56_models.py b/src/puya/arc56_models.py new file mode 100644 index 0000000000..cae64686c3 --- /dev/null +++ b/src/puya/arc56_models.py @@ -0,0 +1,364 @@ +# ruff: noqa: N815 +import enum +import typing +from collections.abc import Mapping, Sequence + +import attrs + +ABIType = str +"""An ABI-encoded type""" +StructName = str +"""The name of a defined struct""" +ProgramType = typing.Literal["approval", "clear"] + + +class AVMType(enum.StrEnum): + """A native AVM type""" + + bytes = "AVMBytes" + """Raw byteslice without the length prefixed that is specified in ARC-4""" + string = "AVMString" + """A utf-8 string without the length prefix that is specified in ARC-4""" + uint64 = "AVMUint64" + """A 64-bit unsigned integer""" + + +@attrs.frozen +class SourceInfo: + pc: Sequence[int] + """The program counter value(s). Could be offset if pcOffsetMethod is not 'none'""" + errorMessage: str + """A human-readable string that describes the error when the program fails at the given PC""" + + +@attrs.frozen +class ProgramSourceInfo: + sourceInfo: Sequence[SourceInfo] + """The source information for the program""" + pcOffsetMethod: typing.Literal["none", "cblocks"] + """ + How the program counter offset is calculated + none: The pc values in sourceInfo are not offset + cblocks: The pc values in sourceInfo are offset by the PC of the first op after the + last cblock at the top of the program + """ + + +@attrs.frozen(kw_only=True) +class StorageKey: + """Describes a single key in app storage""" + + desc: str | None = None + """Description of what this storage key holds""" + keyType: ABIType | AVMType | StructName + """The type of the key""" + valueType: ABIType | AVMType | StructName + """The type of the value""" + key: str + """The base64-encoded key""" + + +@attrs.frozen(kw_only=True) +class StorageMap: + """Describes a mapping of key-value pairs in storage""" + + desc: str | None = None + """Description of what the key-value pairs in this mapping hold""" + keyType: ABIType | AVMType | StructName + """The type of the keys in the map""" + valueType: ABIType | AVMType | StructName + """The type of the values in the map""" + prefix: str | None = None + """The base64-encoded prefix of the map keys""" + + +@attrs.frozen +class StructField: + """Information about a single field in a struct""" + + name: str + """The name of the struct field""" + type: ABIType | StructName | Sequence["StructField"] + """The type of the struct field's value""" + + +@attrs.frozen +class EventArg: + type: ABIType + """ + The type of the argument. + The `struct` field should also be checked to determine if this arg is a struct. + """ + name: str | None = None + """Optional, user-friendly name for the argument""" + desc: str | None = None + """Optional, user-friendly description for the argument""" + struct: StructName | None = None + """ + If the type is a struct, the name of the struct + Note: this is a separate field to maintain backwards compatability with ARC-23 + """ + + +@attrs.frozen(kw_only=True) +class Event: + name: str + """The name of the event""" + desc: str | None = None + """Optional, user-friendly description for the event""" + args: Sequence[EventArg] + """The arguments of the event, in order""" + + +class DefaultValueSource(enum.Enum): + box = "box" + """The data key signifies the box key to read the value from""" + global_ = "global" + """The data key signifies the global state key to read the value from""" + local_ = "local" + """The data key signifies the local state key to read the value from (for the sender)""" + literal = "literal" + """the value is a literal and should be passed directly as the argument""" + method = "method" + """ + The utf8 signature of the method in this contract to call to get the default value. + If the method has arguments, they all must have default values. + The method **MUST** be readonly so simulate can be used to get the default value. + """ + + +@attrs.frozen(kw_only=True) +class MethodArgDefaultValue: + source: DefaultValueSource + """Where the default value is coming from""" + type: ABIType | AVMType | None = None + """ + How the data is encoded. + This is the encoding for the data provided here, not the arg type. + Not relevant if source is method + """ + data: str + """Base64 encoded bytes or uint64""" + + +@attrs.frozen(kw_only=True) +class MethodArg: + type: ABIType + """ + The type of the argument. + The `struct` field should also be checked to determine if this arg is a struct. + """ + struct: StructName | None = None + """ + If the type is a struct, the name of the struct. + Note: this is a separate field to maintain backwards compatability with ARC-4 + """ + name: str | None = None + """Optional, user-friendly name for the argument""" + desc: str | None = None + """Optional, user-friendly description for the argument""" + defaultValue: MethodArgDefaultValue | None = None + + +@attrs.frozen(kw_only=True) +class MethodReturns: + type: ABIType + """ + The type of the return value, or "void" to indicate no return value. + The `struct` field should also be checked to determine if this return value is a struct. + """ + struct: StructName | None = None + """ + If the type is a struct, the name of the struct + """ + desc: str | None = None + """Optional, user-friendly description for the return value""" + + +@attrs.frozen +class MethodActions: + """An action is a combination of call/create and an OnComplete""" + + create: Sequence[typing.Literal["NoOp", "OptIn", "DeleteApplication"]] + """OnCompletes this method allows when appID === 0""" + call: Sequence[ + typing.Literal["NoOp", "OptIn", "CloseOut", "UpdateApplication", "DeleteApplication"] + ] + """OnCompletes this method allows when appID !== 0""" + + +@attrs.frozen(kw_only=True) +class MethodBoxRecommendation: + app: int | None = None + """The app ID for the box""" + key: str + """The base64 encoded box key""" + readBytes: int + """The number of bytes being read from the box""" + writeBytes: int + """The number of bytes being written to the box""" + + +@attrs.frozen(kw_only=True) +class MethodRecommendations: + innerTransactionCount: int | None = None + """The number of inner transactions the caller should cover the fees for""" + boxes: MethodBoxRecommendation | None = None + """Recommended box references to include""" + accounts: Sequence[str] | None = None + """Recommended foreign accounts""" + apps: Sequence[int] | None = None + """Recommended foreign apps""" + assets: Sequence[int] | None = None + """Recommended foreign assets""" + + +@attrs.frozen(kw_only=True) +class Method: + """ + Describes a method in the contract. + This interface is an extension of the interface described in ARC-4 + """ + + name: str + """The name of the method""" + desc: str | None = None + """Optional, user-friendly description for the method""" + args: Sequence[MethodArg] + """The arguments of the method, in order""" + returns: MethodReturns + """Information about the method's return value""" + actions: MethodActions + """Allowed actions for this method""" + readonly: bool + """If this method does not write anything to the ledger (ARC-22)""" + events: Sequence[Event] + """ARC-28 events that MAY be emitted by this method""" + recommendations: MethodRecommendations + """Information that clients can use when calling the method""" + + +@attrs.frozen +class Network: + appID: int + """The app ID of the deployed contract in this network""" + + +class SchemaSizes(typing.TypedDict): + ints: int + bytes: int + + +ContractSchema = typing.TypedDict("ContractSchema", {"global": SchemaSizes, "local": SchemaSizes}) +StorageMaps = Mapping[str, StorageMap] +StorageKeys = Mapping[str, StorageKey] +ContractStorage = typing.TypedDict( + "ContractStorage", {"global": StorageMaps, "local": StorageMaps, "box": StorageMaps} +) +ContractKeys = typing.TypedDict( + "ContractKeys", {"global": StorageKeys, "local": StorageKeys, "box": StorageKeys} +) + + +@attrs.frozen +class ContractState: + schema: ContractSchema + """ + Defines the values that should be used for GlobalNumUint, GlobalNumByteSlice, LocalNumUint, + and LocalNumByteSlice when creating the application + """ + keys: ContractKeys + """Mapping of human-readable names to StorageKey objects""" + maps: ContractStorage + """Mapping of human-readable names to StorageMap objects""" + + +@attrs.frozen(kw_only=True) +class CompilerVersion: + major: int + minor: int + patch: int + commitHash: str | None = None + + +@attrs.frozen +class CompilerInfo: + compiler: str + """The name of the compiler""" + compilerVersion: CompilerVersion + + +@attrs.frozen(kw_only=True) +class TemplateVariable: + type: ABIType | AVMType | StructName + """The type of the template variable""" + value: str | None = None + """If given, the the base64 encoded value used for the given app/program""" + + +@attrs.frozen +class ScratchVariable: + slot: int + type: ABIType | AVMType | StructName + + +@attrs.frozen(kw_only=True) +class Contract: + """ + Describes the entire contract. + This interface is an extension of the interface described in ARC-4 + """ + + arcs: Sequence[int] + """ + The ARCs used and/or supported by this contract. + All contracts implicitly support ARC-4 and ARC-56 + """ + name: str + """A user-friendly name for the contract""" + desc: str | None = None + """Optional, user-friendly description for the interface""" + networks: Mapping[str, Network] | None = None + """ + Optional object listing the contract instances across different networks. + The key is the base64 genesis hash of the network, and the value contains + information about the deployed contract in the network indicated by the + key. A key containing the human-readable name of the network MAY be + included, but the corresponding genesis hash key MUST also be define + """ + structs: Mapping[str, Sequence[StructField]] + """ + Named structs use by the application. + Each struct field appears in the same order as ABI encoding + """ + methods: Sequence[Method] + """All of the methods that the contract implements""" + state: ContractState + bareActions: MethodActions + """Supported bare actions for the contract""" + sourceInfo: Mapping[ProgramType, ProgramSourceInfo] | None = None + """Information about the TEAL programs""" + source: Mapping[ProgramType, str] | None = None + """ + The pre-compiled TEAL that may contain template variables. + MUST be omitted if included as part of ARC23 + """ + byteCode: Mapping[ProgramType, str] | None = None + """ + The compiled bytecode for the application. + MUST be omitted if included as part of ARC23 + """ + compilerInfo: CompilerInfo | None = None + """ + Information used to get the given byteCode and/or PC values in sourceInfo. + MUST be given if byteCode or PC values are present + """ + events: Sequence[Event] + """ARC-28 events that MAY be emitted by this contract""" + templateVariables: Mapping[str, TemplateVariable] + """ + A mapping of template variable names as they appear in the teal (not including TMPL_ prefix) + to their respective types and values (if applicable) + """ + scratchVariables: Mapping[str, ScratchVariable] | None = None + """The scratch variables used during runtime""" diff --git a/src/puya/awst/function_traverser.py b/src/puya/awst/function_traverser.py index 95014c8d12..527c8b2883 100644 --- a/src/puya/awst/function_traverser.py +++ b/src/puya/awst/function_traverser.py @@ -381,3 +381,7 @@ def visit_range(self, node: awst_nodes.Range) -> None: node.start.accept(self) node.stop.accept(self) node.step.accept(self) + + @typing.override + def visit_emit(self, expr: awst_nodes.Emit) -> None: + expr.value.accept(self) diff --git a/src/puya/awst/nodes.py b/src/puya/awst/nodes.py index d1f226ded4..de1f44a30f 100644 --- a/src/puya/awst/nodes.py +++ b/src/puya/awst/nodes.py @@ -1354,6 +1354,16 @@ def accept(self, visitor: StatementVisitor[T]) -> T: return visitor.visit_bytes_augmented_assignment(self) +@attrs.frozen +class Emit(Expression): + signature: str + value: Expression = attrs.field(validator=expression_has_wtype(wtypes.ARC4Struct)) + wtype: WType = attrs.field(default=wtypes.void_wtype, init=False) + + def accept(self, visitor: ExpressionVisitor[T]) -> T: + return visitor.visit_emit(self) + + @attrs.frozen class Range(Expression): wtype: WType = attrs.field(default=wtypes.uint64_range_wtype, init=False) diff --git a/src/puya/awst/to_code_visitor.py b/src/puya/awst/to_code_visitor.py index 1bbb43850c..cf6a121dea 100644 --- a/src/puya/awst/to_code_visitor.py +++ b/src/puya/awst/to_code_visitor.py @@ -681,6 +681,10 @@ def visit_uint64_postfix_unary_operation(self, expr: nodes.UInt64PostfixUnaryOpe def visit_arc4_router(self, expr: nodes.ARC4Router) -> str: return "arc4_router()" + @typing.override + def visit_emit(self, expr: nodes.Emit) -> str: + return f"emit({expr.signature!r}, {expr.value.accept(self)})" + def _indent(lines: Iterable[str], indent_size: str = " ") -> Iterator[str]: yield from (f"{indent_size}{line}" for line in lines) diff --git a/src/puya/awst/validation/arc4_copy.py b/src/puya/awst/validation/arc4_copy.py index 731c49172c..a24179529f 100644 --- a/src/puya/awst/validation/arc4_copy.py +++ b/src/puya/awst/validation/arc4_copy.py @@ -33,6 +33,10 @@ def visit_intrinsic_call(self, call: awst_nodes.IntrinsicCall) -> None: if _HasAssignmentVisitor.check(call): super().visit_intrinsic_call(call) + def visit_emit(self, emit: awst_nodes.Emit) -> None: + if _HasAssignmentVisitor.check(emit): + super().visit_emit(emit) + def visit_assignment_statement(self, statement: awst_nodes.AssignmentStatement) -> None: _check_assignment(statement.target, statement.value) statement.value.accept(self) diff --git a/src/puya/awst/visitors.py b/src/puya/awst/visitors.py index 3c33398d5f..1cd016437a 100644 --- a/src/puya/awst/visitors.py +++ b/src/puya/awst/visitors.py @@ -289,3 +289,6 @@ def visit_arc4_router(self, expr: puya.awst.nodes.ARC4Router) -> T: ... @abstractmethod def visit_range(self, node: puya.awst.nodes.Range) -> T: ... + + @abstractmethod + def visit_emit(self, emit: puya.awst.nodes.Emit) -> T: ... diff --git a/src/puya/awst/wtypes.py b/src/puya/awst/wtypes.py index 899f721052..4c6860bef7 100644 --- a/src/puya/awst/wtypes.py +++ b/src/puya/awst/wtypes.py @@ -164,6 +164,7 @@ class WStructType(WType): fields: immutabledict[str, WType] = attrs.field(converter=immutabledict) scalar_type: None = attrs.field(default=None, init=False) source_location: SourceLocation | None = attrs.field(eq=False) + desc: str | None = None @fields.validator def _fields_validator(self, _: object, fields: immutabledict[str, WType]) -> None: @@ -201,6 +202,7 @@ class WTuple(WType): immutable: bool = attrs.field(default=True, init=False) name: str = attrs.field(kw_only=True) names: tuple[str, ...] | None = attrs.field(default=None) + desc: str | None = None def __eq__(self, other: object) -> bool: # this custom equality check ensures that @@ -470,6 +472,7 @@ class ARC4Struct(ARC4Type): source_location: SourceLocation | None = attrs.field(default=None, eq=False) arc4_name: str = attrs.field(init=False, eq=False) decode_type: WType | None = None + desc: str | None = None @immutable.default def _immutable(self) -> bool: diff --git a/src/puya/compile.py b/src/puya/compile.py index 773d181b0f..38bc31ef79 100644 --- a/src/puya/compile.py +++ b/src/puya/compile.py @@ -9,6 +9,7 @@ from puya import log from puya.arc32 import create_arc32_json +from puya.arc56 import create_arc56_json from puya.artifact_sorter import ArtifactCompilationSorter from puya.awst.nodes import AWST from puya.awst.validation.main import validate_awst @@ -169,6 +170,7 @@ def get_program_bytecode( class _CompiledProgram(CompiledProgram): teal: TealProgram teal_src: str + template_variables: Mapping[str, int | bytes | None] debug_info: DebugInfo | None = None bytecode: bytes | None = None @@ -207,6 +209,7 @@ def _dummy_program() -> _CompiledProgram: subroutines=[], ), teal_src="", + template_variables={}, ) @@ -265,6 +268,7 @@ def _compile_program(context: CompileContext, program: TealProgram) -> _Compiled teal_src=emit_teal(context, program), bytecode=assembled.bytecode if context.options.output_bytecode else None, debug_info=assembled.debug_info, + template_variables=assembled.template_variables, ) @@ -279,7 +283,6 @@ def _write_artifacts( if out_dir is None: continue teal_file_stem = artifact.metadata.name - arc32_file_stem = f"{teal_file_stem}.arc32.json" artifact_base_path = out_dir / teal_file_stem match artifact: case CompiledLogicSig(program=program): @@ -290,15 +293,27 @@ def _write_artifacts( ".clear": clear, } if contract.metadata.is_arc4: - app_spec_json = create_arc32_json( - approval.teal_src, - clear.teal_src, - contract.metadata, - ) if context.options.output_arc32: - arc32_path = out_dir / arc32_file_stem - logger.info(f"Writing {make_path_relative_to_cwd(arc32_path)}") - arc32_path.write_text(app_spec_json) + app_spec_json = create_arc32_json( + approval.teal_src, + clear.teal_src, + contract.metadata, + ) + _write_output( + artifact_base_path, + {".arc32.json": app_spec_json.encode("utf8")}, + ) + if context.options.output_arc56: + app_spec_json = create_arc56_json( + metadata=contract.metadata, + approval_program=approval, + clear_program=clear, + template_prefix=context.options.template_vars_prefix, + ) + _write_output( + artifact_base_path, + {".arc56.json": app_spec_json.encode("utf8")}, + ) case _: typing.assert_never(artifact) if context.options.output_teal: diff --git a/src/puya/ir/_puya_lib.awst.json b/src/puya/ir/_puya_lib.awst.json index c8dfc103f8..3f82220aca 100644 --- a/src/puya/ir/_puya_lib.awst.json +++ b/src/puya/ir/_puya_lib.awst.json @@ -1308,6 +1308,7 @@ "source_location": null, "name": "tuple", "names": null, + "desc": null, "_type": "WTuple" }, "body": { @@ -2274,6 +2275,7 @@ }, "name": "tuple", "names": null, + "desc": null, "_type": "WTuple" }, "_type": "TupleExpression" @@ -2362,6 +2364,7 @@ "source_location": null, "name": "tuple", "names": null, + "desc": null, "_type": "WTuple" }, "body": { @@ -3099,6 +3102,7 @@ }, "name": "tuple", "names": null, + "desc": null, "_type": "WTuple" }, "_type": "TupleExpression" @@ -3169,6 +3173,7 @@ "source_location": null, "name": "tuple", "names": null, + "desc": null, "_type": "WTuple" }, "body": { @@ -4256,6 +4261,7 @@ }, "name": "tuple", "names": null, + "desc": null, "_type": "WTuple" }, "_type": "TupleExpression" @@ -4326,6 +4332,7 @@ "source_location": null, "name": "tuple", "names": null, + "desc": null, "_type": "WTuple" }, "body": { @@ -5668,6 +5675,7 @@ }, "name": "tuple", "names": null, + "desc": null, "_type": "WTuple" }, "_type": "TupleExpression" diff --git a/src/puya/ir/arc4_router.py b/src/puya/ir/arc4_router.py index 25981a53af..7fd5bdc4c6 100644 --- a/src/puya/ir/arc4_router.py +++ b/src/puya/ir/arc4_router.py @@ -1,6 +1,8 @@ import typing from collections.abc import Iterable, Mapping, Sequence +from immutabledict import immutabledict + from puya import log from puya.avm_type import AVMType from puya.awst import ( @@ -346,7 +348,7 @@ def _map_abi_args( if isinstance(a, wtypes.ARC4Type): arc4_type = a else: - converted = _maybe_avm_to_arc4_equivalent_type(a) + converted = maybe_avm_to_arc4_equivalent_type(a) if converted is not None: arc4_type = converted elif _reference_type_array(a) is not None: @@ -421,7 +423,7 @@ def route_abi_methods( case wtypes.ARC4Type(): call_and_maybe_log = log_arc4_result(abi_loc, method_result) case _: - converted_return_type = _maybe_avm_to_arc4_equivalent_type(method.return_type) + converted_return_type = maybe_avm_to_arc4_equivalent_type(method.return_type) if converted_return_type is None: raise CodeError( f"{method.return_type} is not a valid ABI return type", @@ -568,7 +570,7 @@ def extract_arc4_methods( *, global_state: Mapping[str, ContractState], local_state: Mapping[str, ContractState], -) -> list[ARC4Method]: +) -> dict[awst_nodes.ContractMethod, ARC4Method]: abi_methods = {} bare_methods = {} known_sources: dict[str, ContractState | awst_nodes.ContractMethod] = { @@ -587,68 +589,61 @@ def extract_arc4_methods( _validate_default_args(abi_methods.keys(), known_sources) - arc4_method_metadata = list[ARC4Method]() + arc4_method_metadata = dict[awst_nodes.ContractMethod, ARC4Method]() for m, bare_method_config in bare_methods.items(): - arc4_method_metadata.append( - ARC4BareMethod( - desc=m.documentation.description, - config=bare_method_config, - ) + arc4_method_metadata[m] = ARC4BareMethod( + desc=m.documentation.description, + config=bare_method_config, ) for m, abi_method_config in abi_methods.items(): - arc4_method_metadata.append( - ARC4ABIMethod( - name=m.member_name, - desc=m.documentation.description, - args=[ - ARC4MethodArg( - name=a.name, - type_=_wtype_to_arc4(a.wtype), - desc=m.documentation.args.get(a.name), - ) - for a in m.args - ], - returns=ARC4Returns( - desc=m.documentation.returns, - type_=_wtype_to_arc4(m.return_type), - ), - config=abi_method_config, - ) + arc4_method_metadata[m] = ARC4ABIMethod( + name=m.member_name, + desc=m.documentation.description, + args=[ + ARC4MethodArg( + name=a.name, + type_=_wtype_to_arc4(a.wtype), + struct=_get_arc4_struct_name(a.wtype), + desc=m.documentation.args.get(a.name), + ) + for a in m.args + ], + returns=ARC4Returns( + desc=m.documentation.returns, + type_=_wtype_to_arc4(m.return_type), + struct=_get_arc4_struct_name(m.return_type), + ), + events=[], + config=abi_method_config, ) + return arc4_method_metadata +def _get_arc4_struct_name(wtype: wtypes.WType) -> str | None: + return ( + wtype.name + if isinstance(wtype, wtypes.ARC4Struct | wtypes.WTuple) and wtype.fields + else None + ) + + def create_abi_router( contract: awst_nodes.ContractFragment, - arc4_methods_with_configs: dict[awst_nodes.ContractMethod, ARC4MethodConfig], + arc4_methods_with_configs: dict[awst_nodes.ContractMethod, ARC4Method], ) -> awst_nodes.ContractMethod: router_location = contract.source_location abi_methods = {} bare_methods = {} - arc4_method_metadata = list[ARC4Method]() - for m, arc4_config in arc4_methods_with_configs.items(): - doc = m.documentation + for m, arc4_method in arc4_methods_with_configs.items(): + arc4_config = arc4_method.config assert arc4_config is m.arc4_method_config if isinstance(arc4_config, ARC4BareMethodConfig): bare_methods[m] = arc4_config - metadata: ARC4Method = ARC4BareMethod(desc=doc.description, config=arc4_config) elif isinstance(arc4_config, ARC4ABIMethodConfig): abi_methods[m] = arc4_config - metadata = ARC4ABIMethod( - name=m.member_name, - desc=doc.description, - args=[ - ARC4MethodArg( - name=a.name, type_=_wtype_to_arc4(a.wtype), desc=doc.args.get(a.name) - ) - for a in m.args - ], - returns=ARC4Returns(desc=doc.returns, type_=_wtype_to_arc4(m.return_type)), - config=arc4_config, - ) else: typing.assert_never(arc4_config) - arc4_method_metadata.append(metadata) abi_routing = route_abi_methods(router_location, abi_methods) bare_routing = route_bare_methods(router_location, bare_methods) @@ -694,7 +689,7 @@ def _wtype_to_arc4(wtype: wtypes.WType, loc: SourceLocation | None = None) -> st return wtype.name case wtypes.WGroupTransaction(transaction_type=transaction_type): return transaction_type.name if transaction_type else "txn" - converted = _maybe_avm_to_arc4_equivalent_type(wtype) + converted = maybe_avm_to_arc4_equivalent_type(wtype) if converted is None: raise CodeError(f"not an ARC4 type or native equivalent: {wtype}", loc) return _wtype_to_arc4(converted, loc) @@ -711,7 +706,7 @@ def _reference_type_array(wtype: wtypes.WType) -> str | None: return None -def _maybe_avm_to_arc4_equivalent_type(wtype: wtypes.WType) -> wtypes.ARC4Type | None: +def maybe_avm_to_arc4_equivalent_type(wtype: wtypes.WType) -> wtypes.ARC4Type | None: match wtype: case wtypes.bool_wtype: return wtypes.arc4_bool_wtype @@ -725,16 +720,23 @@ def _maybe_avm_to_arc4_equivalent_type(wtype: wtypes.WType) -> wtypes.ARC4Type | ) case wtypes.string_wtype: return wtypes.arc4_string_alias - case wtypes.WTuple(types=tuple_item_types): + case wtypes.WTuple(types=tuple_item_types) as wtuple: arc4_item_types = [] for t in tuple_item_types: if isinstance(t, wtypes.ARC4Type): arc4_item_types.append(t) else: - converted = _maybe_avm_to_arc4_equivalent_type(t) + converted = maybe_avm_to_arc4_equivalent_type(t) if converted is None: return None arc4_item_types.append(converted) - return wtypes.ARC4Tuple(types=arc4_item_types, source_location=None) + if wtuple.fields: + return wtypes.ARC4Struct( + name=wtuple.name, + desc=wtuple.desc, + fields=immutabledict(zip(wtuple.fields, arc4_item_types, strict=True)), + ) + else: + return wtypes.ARC4Tuple(types=arc4_item_types, source_location=None) case _: return None diff --git a/src/puya/ir/builder/_utils.py b/src/puya/ir/builder/_utils.py index 413522fb39..5a6709d072 100644 --- a/src/puya/ir/builder/_utils.py +++ b/src/puya/ir/builder/_utils.py @@ -179,3 +179,213 @@ def extract_const_int(expr: awst_nodes.Expression | int | None) -> int | None: f"Expected either constant or None for index, got {type(expr).__name__}", expr.source_location, ) + + +@attrs.frozen +class OpFactory: + context: IRFunctionBuildContext + source_location: SourceLocation | None + + def assign(self, value: ValueProvider, temp_desc: str) -> Register: + register = assign_temp( + self.context, value, temp_description=temp_desc, source_location=self.source_location + ) + return register + + def assign_multiple(self, **values: ValueProvider) -> Sequence[Register]: + return [self.assign(value, desc) for desc, value in values.items()] + + def add(self, a: Value, b: Value | int, temp_desc: str) -> Register: + result = assign_intrinsic_op( + self.context, + target=temp_desc, + op=AVMOp.add, + args=[a, b], + source_location=self.source_location, + ) + return result + + def sub(self, a: Value, b: Value | int, temp_desc: str) -> Register: + result = assign_intrinsic_op( + self.context, + target=temp_desc, + op=AVMOp.sub, + args=[a, b], + source_location=self.source_location, + ) + return result + + def mul(self, a: Value, b: Value | int, temp_desc: str) -> Register: + result = assign_intrinsic_op( + self.context, + target=temp_desc, + op=AVMOp.mul, + args=[a, b], + source_location=self.source_location, + ) + return result + + def len(self, value: Value, temp_desc: str) -> Register: + result = assign_intrinsic_op( + self.context, + target=temp_desc, + op=AVMOp.len_, + args=[value], + source_location=self.source_location, + ) + return result + + def eq(self, a: Value, b: Value, temp_desc: str) -> Register: + result = assign_intrinsic_op( + self.context, + target=temp_desc, + op=AVMOp.eq, + args=[a, b], + source_location=self.source_location, + ) + return result + + def select(self, false: Value, true: Value, condition: Value, temp_desc: str) -> Register: + result = assign_intrinsic_op( + self.context, + target=temp_desc, + op=AVMOp.select, + args=[false, true, condition], + return_type=true.ir_type, + source_location=self.source_location, + ) + return result + + def extract_uint16(self, a: Value, b: Value | int, temp_desc: str) -> Register: + result = assign_intrinsic_op( + self.context, + target=temp_desc, + op=AVMOp.extract_uint16, + args=[a, b], + source_location=self.source_location, + ) + return result + + def itob(self, value: Value | int, temp_desc: str) -> Register: + itob = assign_intrinsic_op( + self.context, + target=temp_desc, + op=AVMOp.itob, + args=[value], + source_location=self.source_location, + ) + return itob + + def as_u16_bytes(self, a: Value | int, temp_desc: str) -> Register: + as_bytes = self.itob(a, "as_bytes") + result = assign_intrinsic_op( + self.context, + target=temp_desc, + op=AVMOp.extract, + immediates=[6, 2], + args=[as_bytes], + source_location=self.source_location, + ) + return result + + def concat(self, a: Value | bytes, b: Value | bytes, temp_desc: str) -> Register: + result = assign_intrinsic_op( + self.context, + target=temp_desc, + op=AVMOp.concat, + args=[a, b], + source_location=self.source_location, + ) + return result + + def constant(self, value: int | bytes) -> Value: + if isinstance(value, int): + return UInt64Constant(value=value, source_location=self.source_location) + else: + return BytesConstant( + value=value, encoding=AVMBytesEncoding.base16, source_location=self.source_location + ) + + def set_bit(self, *, value: Value, index: int, bit: Value | int, temp_desc: str) -> Register: + result = assign_intrinsic_op( + self.context, + target=temp_desc, + op=AVMOp.setbit, + args=[value, index, bit], + return_type=value.ir_type, + source_location=self.source_location, + ) + return result + + def get_bit(self, value: Value, index: Value | int, temp_desc: str) -> Register: + result = assign_intrinsic_op( + self.context, + target=temp_desc, + op=AVMOp.getbit, + args=[value, index], + source_location=self.source_location, + ) + return result + + def extract_to_end(self, value: Value, start: int, temp_desc: str) -> Register: + if start > 255: + raise InternalError( + "Cannot use extract with a length of 0 if start > 255", self.source_location + ) + result = assign_intrinsic_op( + self.context, + target=temp_desc, + op=AVMOp.extract, + immediates=[start, 0], + args=[value], + source_location=self.source_location, + ) + return result + + def substring3( + self, + value: Value | bytes, + start: Value | int, + end_ex: Value | int, + temp_desc: str, + ) -> Register: + result = assign_intrinsic_op( + self.context, + target=temp_desc, + op=AVMOp.substring3, + args=[value, start, end_ex], + source_location=self.source_location, + ) + return result + + def replace( + self, + value: Value | bytes, + index: Value | int, + replacement: Value | bytes, + temp_desc: str, + ) -> Register: + result = assign_intrinsic_op( + self.context, + target=temp_desc, + source_location=self.source_location, + op=AVMOp.replace3, + args=[value, index, replacement], + ) + return result + + def extract3( + self, + value: Value | bytes, + index: Value | int, + length: Value | int, + temp_desc: str, + ) -> Register: + result = assign_intrinsic_op( + self.context, + target=temp_desc, + op=AVMOp.extract3, + args=[value, index, length], + source_location=self.source_location, + ) + return result diff --git a/src/puya/ir/builder/arc4.py b/src/puya/ir/builder/arc4.py index ecaf74e0fa..e37dc30e58 100644 --- a/src/puya/ir/builder/arc4.py +++ b/src/puya/ir/builder/arc4.py @@ -11,6 +11,7 @@ from puya.errors import CodeError, InternalError from puya.ir.avm_ops import AVMOp from puya.ir.builder._utils import ( + OpFactory, assert_value, assign, assign_intrinsic_op, @@ -22,7 +23,6 @@ from puya.ir.builder.assignment import handle_assignment from puya.ir.context import IRFunctionBuildContext from puya.ir.models import ( - BytesConstant, Intrinsic, Register, UInt64Constant, @@ -30,7 +30,7 @@ ValueProvider, ValueTuple, ) -from puya.ir.types_ import AVMBytesEncoding, IRType, get_wtype_arity +from puya.ir.types_ import IRType, get_wtype_arity from puya.ir.utils import format_tuple_index from puya.parse import SourceLocation, sequential_source_locations_merge from puya.utils import bits_to_bytes, round_bits_to_nearest_bytes @@ -95,6 +95,10 @@ def _decode_arc4_value( return _visit_arc4_tuple_decode( context, arc4_tuple, value, target_wtype=target_wtype, source_location=loc ) + case wtypes.ARC4Struct() as arc4_tuple: + return _visit_arc4_tuple_decode( + context, arc4_tuple, value, target_wtype=target_wtype, source_location=loc + ) case _: raise InternalError( f"Unsupported wtype for ARC4Decode: {arc4_wtype}", @@ -148,11 +152,22 @@ def _encode_expr( context, elements, value_wtype.types, arc4_item_types, loc ) return _visit_arc4_tuple_encode(context, arc4_items, arc4_item_types, loc) + case wtypes.ARC4Struct(types=arc4_item_types): + assert isinstance( + value_wtype, wtypes.WTuple + ), f"expected WTuple argument, got {value_wtype.name}" + elements = context.visitor.materialise_value_provider( + value_provider, description="elements_to_encode" + ) + arc4_items = _encode_arc4_tuple_items( + context, elements, value_wtype.types, arc4_item_types, loc + ) + return _visit_arc4_tuple_encode(context, arc4_items, arc4_item_types, loc) case wtypes.ARC4DynamicArray(element_type=wtypes.ARC4UIntN(n=8)): (value,) = context.visitor.materialise_value_provider( value_provider, description="to_encode" ) - factory = _OpFactory(context, loc) + factory = OpFactory(context, loc) length = factory.len(value, "length") length_uint16 = factory.as_u16_bytes(length, "length_uint16") return factory.concat(length_uint16, value, "encoded_value") @@ -215,7 +230,7 @@ def encode_arc4_array(context: IRFunctionBuildContext, expr: awst_nodes.NewArray else b"" ) - factory = _OpFactory(context, expr.source_location) + factory = OpFactory(context, expr.source_location) elements = [context.visitor.visit_and_materialise_single(value) for value in expr.values] element_type = expr.wtype.element_type @@ -252,7 +267,7 @@ def arc4_array_index( source_location: SourceLocation, assert_bounds: bool = True, ) -> ValueProvider: - factory = _OpFactory(context, source_location) + factory = OpFactory(context, source_location) array_length_vp = _get_arc4_array_length(array_wtype, array, source_location) array_head_and_tail_vp = _get_arc4_array_head_and_tail(array_wtype, array, source_location) array_head_and_tail = factory.assign(array_head_and_tail_vp, "array_head_and_tail") @@ -450,7 +465,7 @@ def concat_values( right_expr: awst_nodes.Expression, source_location: SourceLocation, ) -> Value: - factory = _OpFactory(context, source_location) + factory = OpFactory(context, source_location) # check left is a valid ARC4 array to concat with left_wtype = left_expr.wtype if not isinstance(left_wtype, wtypes.ARC4DynamicArray): @@ -594,14 +609,14 @@ def pop_arc4_array( def _encode_arc4_bool( context: IRFunctionBuildContext, bit: Value, source_location: SourceLocation ) -> Value: - factory = _OpFactory(context, source_location) + factory = OpFactory(context, source_location) value = factory.constant(0x00.to_bytes(1, "big")) return factory.set_bit(value=value, index=0, bit=bit, temp_desc="encoded_bool") def _visit_arc4_tuple_decode( context: IRFunctionBuildContext, - wtype: wtypes.ARC4Tuple, + wtype: wtypes.ARC4Tuple | wtypes.ARC4Struct, value: Value, target_wtype: wtypes.WType, source_location: SourceLocation, @@ -663,7 +678,7 @@ def _read_dynamic_item_using_length_from_arc4_container( index: Value, source_location: SourceLocation, ) -> ValueProvider: - factory = _OpFactory(context, source_location) + factory = OpFactory(context, source_location) item_offset_offset = factory.mul(index, 2, "item_offset_offset") item_start_offset = factory.extract_uint16( array_head_and_tail, item_offset_offset, "item_offset" @@ -686,7 +701,7 @@ def _read_dynamic_item_using_end_offset_from_arc4_container( index: Value, source_location: SourceLocation, ) -> ValueProvider: - factory = _OpFactory(context, source_location) + factory = OpFactory(context, source_location) item_offset_offset = factory.mul(index, 2, "item_offset_offset") item_start_offset = factory.extract_uint16( array_head_and_tail, item_offset_offset, "item_offset" @@ -736,7 +751,7 @@ def _visit_arc4_tuple_encode( expr_loc: SourceLocation, ) -> ValueProvider: header_size = _determine_arc4_tuple_head_size(tuple_items, round_end_result=True) - factory = _OpFactory(context, expr_loc) + factory = OpFactory(context, expr_loc) current_tail_offset = factory.assign(factory.constant(header_size // 8), "current_tail_offset") encoded_tuple_buffer = factory.assign(factory.constant(b""), "encoded_tuple_buffer") @@ -808,7 +823,7 @@ def _arc4_replace_tuple_item( value: ValueProvider, source_location: SourceLocation, ) -> Value: - factory = _OpFactory(context, source_location) + factory = OpFactory(context, source_location) base = context.visitor.visit_and_materialise_single(base_expr) value = factory.assign(value, "assigned_value") element_type = wtype.types[index_int] @@ -1007,7 +1022,7 @@ def _get_arc4_array_tail_data_and_item_count( For native tuples will return the tuple items packed into the equivalent static array of tail data and item count """ - factory = _OpFactory(context, source_location) + factory = OpFactory(context, source_location) match expr: case awst_nodes.Expression( wtype=wtypes.ARC4DynamicArray() | wtypes.ARC4StaticArray() as arr_wtype @@ -1233,7 +1248,7 @@ def _concat_dynamic_array_fixed_size( source_location: SourceLocation, byte_size: int, ) -> Value: - factory = _OpFactory(context, source_location) + factory = OpFactory(context, source_location) def array_data(expr: awst_nodes.Expression) -> Value: match expr.wtype: @@ -1278,7 +1293,7 @@ def _arc4_items_as_arc4_tuple( items: Sequence[Value], source_location: SourceLocation, ) -> Value: - factory = _OpFactory(context, source_location) + factory = OpFactory(context, source_location) result = factory.constant(b"") if is_arc4_dynamic_size(item_wtype): tail_offset: Value = UInt64Constant(value=len(items) * 2, source_location=source_location) @@ -1383,7 +1398,7 @@ def _get_arc4_array_tail( # no header for static sized elements return array_head_and_tail - factory = _OpFactory(context, source_location) + factory = OpFactory(context, source_location) # special case to use extract with immediate length of 0 where possible # TODO: have an IR pseudo op, extract_to_end that handles this for non constant values? if isinstance(array_length, UInt64Constant) and array_length.value <= 127: @@ -1393,216 +1408,6 @@ def _get_arc4_array_tail( return factory.substring3(array_head_and_tail, start_of_tail, total_length, "data") -@attrs.frozen -class _OpFactory: - context: IRFunctionBuildContext - source_location: SourceLocation | None - - def assign(self, value: ValueProvider, temp_desc: str) -> Register: - register = assign_temp( - self.context, value, temp_description=temp_desc, source_location=self.source_location - ) - return register - - def assign_multiple(self, **values: ValueProvider) -> Sequence[Register]: - return [self.assign(value, desc) for desc, value in values.items()] - - def add(self, a: Value, b: Value | int, temp_desc: str) -> Register: - result = assign_intrinsic_op( - self.context, - target=temp_desc, - op=AVMOp.add, - args=[a, b], - source_location=self.source_location, - ) - return result - - def sub(self, a: Value, b: Value | int, temp_desc: str) -> Register: - result = assign_intrinsic_op( - self.context, - target=temp_desc, - op=AVMOp.sub, - args=[a, b], - source_location=self.source_location, - ) - return result - - def mul(self, a: Value, b: Value | int, temp_desc: str) -> Register: - result = assign_intrinsic_op( - self.context, - target=temp_desc, - op=AVMOp.mul, - args=[a, b], - source_location=self.source_location, - ) - return result - - def len(self, value: Value, temp_desc: str) -> Register: - result = assign_intrinsic_op( - self.context, - target=temp_desc, - op=AVMOp.len_, - args=[value], - source_location=self.source_location, - ) - return result - - def eq(self, a: Value, b: Value, temp_desc: str) -> Register: - result = assign_intrinsic_op( - self.context, - target=temp_desc, - op=AVMOp.eq, - args=[a, b], - source_location=self.source_location, - ) - return result - - def select(self, false: Value, true: Value, condition: Value, temp_desc: str) -> Register: - result = assign_intrinsic_op( - self.context, - target=temp_desc, - op=AVMOp.select, - args=[false, true, condition], - return_type=true.ir_type, - source_location=self.source_location, - ) - return result - - def extract_uint16(self, a: Value, b: Value | int, temp_desc: str) -> Register: - result = assign_intrinsic_op( - self.context, - target=temp_desc, - op=AVMOp.extract_uint16, - args=[a, b], - source_location=self.source_location, - ) - return result - - def itob(self, value: Value | int, temp_desc: str) -> Register: - itob = assign_intrinsic_op( - self.context, - target=temp_desc, - op=AVMOp.itob, - args=[value], - source_location=self.source_location, - ) - return itob - - def as_u16_bytes(self, a: Value | int, temp_desc: str) -> Register: - as_bytes = self.itob(a, "as_bytes") - result = assign_intrinsic_op( - self.context, - target=temp_desc, - op=AVMOp.extract, - immediates=[6, 2], - args=[as_bytes], - source_location=self.source_location, - ) - return result - - def concat(self, a: Value | bytes, b: Value | bytes, temp_desc: str) -> Register: - result = assign_intrinsic_op( - self.context, - target=temp_desc, - op=AVMOp.concat, - args=[a, b], - source_location=self.source_location, - ) - return result - - def constant(self, value: int | bytes) -> Value: - if isinstance(value, int): - return UInt64Constant(value=value, source_location=self.source_location) - else: - return BytesConstant( - value=value, encoding=AVMBytesEncoding.base16, source_location=self.source_location - ) - - def set_bit(self, *, value: Value, index: int, bit: Value | int, temp_desc: str) -> Register: - result = assign_intrinsic_op( - self.context, - target=temp_desc, - op=AVMOp.setbit, - args=[value, index, bit], - return_type=value.ir_type, - source_location=self.source_location, - ) - return result - - def get_bit(self, value: Value, index: Value | int, temp_desc: str) -> Register: - result = assign_intrinsic_op( - self.context, - target=temp_desc, - op=AVMOp.getbit, - args=[value, index], - source_location=self.source_location, - ) - return result - - def extract_to_end(self, value: Value, start: int, temp_desc: str) -> Register: - if start > 255: - raise InternalError( - "Cannot use extract with a length of 0 if start > 255", self.source_location - ) - result = assign_intrinsic_op( - self.context, - target=temp_desc, - op=AVMOp.extract, - immediates=[start, 0], - args=[value], - source_location=self.source_location, - ) - return result - - def substring3( - self, - value: Value | bytes, - start: Value | int, - end_ex: Value | int, - temp_desc: str, - ) -> Register: - result = assign_intrinsic_op( - self.context, - target=temp_desc, - op=AVMOp.substring3, - args=[value, start, end_ex], - source_location=self.source_location, - ) - return result - - def replace( - self, - value: Value | bytes, - index: Value | int, - replacement: Value | bytes, - temp_desc: str, - ) -> Register: - result = assign_intrinsic_op( - self.context, - target=temp_desc, - source_location=self.source_location, - op=AVMOp.replace3, - args=[value, index, replacement], - ) - return result - - def extract3( - self, - value: Value | bytes, - index: Value | int, - length: Value | int, - temp_desc: str, - ) -> Register: - result = assign_intrinsic_op( - self.context, - target=temp_desc, - op=AVMOp.extract3, - args=[value, index, length], - source_location=self.source_location, - ) - return result - - def is_arc4_dynamic_size(wtype: wtypes.ARC4Type) -> bool: match wtype: case wtypes.ARC4DynamicArray(): diff --git a/src/puya/ir/builder/main.py b/src/puya/ir/builder/main.py index f8741f4917..2bf1ce6ee3 100644 --- a/src/puya/ir/builder/main.py +++ b/src/puya/ir/builder/main.py @@ -17,6 +17,7 @@ from puya.ir.builder import arc4, flow_control, storage from puya.ir.builder._tuple_util import get_tuple_item_values from puya.ir.builder._utils import ( + OpFactory, assert_value, assign, assign_intrinsic_op, @@ -1103,6 +1104,21 @@ def visit_arc4_router(self, expr: awst_nodes.ARC4Router) -> TExpression: source_location=expr.source_location, ) + def visit_emit(self, expr: awst_nodes.Emit) -> TExpression: + factory = OpFactory(self.context, expr.source_location) + value = self.context.visitor.visit_and_materialise_single(expr.value) + prefix = MethodConstant(value=expr.signature, source_location=expr.source_location) + event = factory.concat(prefix, value, "event") + + self.context.block_builder.add( + Intrinsic( + op=AVMOp("log"), + args=[event], + source_location=expr.source_location, + ) + ) + return None + def visit_range(self, node: awst_nodes.Range) -> TExpression: raise CodeError("unexpected range location", node.source_location) diff --git a/src/puya/ir/main.py b/src/puya/ir/main.py index 6e7e22b1d6..e0b50d9d80 100644 --- a/src/puya/ir/main.py +++ b/src/puya/ir/main.py @@ -2,7 +2,7 @@ import itertools import typing from collections import Counter, defaultdict -from collections.abc import Collection, Iterable, Iterator, Mapping +from collections.abc import Collection, Iterable, Iterator, Mapping, Sequence from pathlib import Path import attrs @@ -20,7 +20,7 @@ from puya.context import CompileContext from puya.errors import CodeError, InternalError from puya.ir import arc4_router -from puya.ir.arc4_router import extract_arc4_methods +from puya.ir.arc4_router import extract_arc4_methods, maybe_avm_to_arc4_equivalent_type from puya.ir.builder.main import FunctionIRBuilder from puya.ir.context import IRBuildContext from puya.ir.destructure.main import destructure_ssa @@ -33,15 +33,18 @@ from puya.ir.utils import format_tuple_index from puya.ir.validation.main import validate_module_artifact from puya.models import ( + ARC4ABIMethod, ARC4Method, ARC4MethodConfig, + ARC4Struct, + ARC4StructField, ContractMetaData, ContractState, LogicSignatureMetaData, StateTotals, ) from puya.parse import SourceLocation -from puya.utils import StableSet, attrs_extend, set_remove +from puya.utils import StableSet, attrs_extend, set_remove, unique logger = log.get_logger(__name__) @@ -243,6 +246,26 @@ def _build_ir(ctx: IRBuildContext, contract: awst_nodes.ContractFragment) -> Con approval_subs_srefs.add(folded.init) init_sub_srefs = SubroutineCollector.collect(ctx, start=folded.init, callees=callees) approval_subs_srefs |= init_sub_srefs + function_emits = EventCollector.collect(ctx, unique((*approval_subs_srefs, *clear_subs_srefs))) + + # collect emitted events by method, and include any referenced structs + structs = list(folded.structs) + arc4_methods = [] + for method, arc4_method in arc4_method_data.items(): + if isinstance(arc4_method, ARC4ABIMethod): + method_structs = function_emits[method] + # extend structs with any arc4 struct types that are part of an event + structs.extend( + t + for method_struct in method_structs + for t in method_struct.fields.values() + if isinstance(t, wtypes.ARC4Struct) + ) + arc4_method = attrs.evolve( + arc4_method, events=list(map(_wtype_to_struct, method_structs)) + ) + arc4_methods.append(arc4_method) + # construct unique Subroutine objects for each function # that was referenced through either entry point for func in itertools.chain(approval_subs_srefs, clear_subs_srefs): @@ -285,10 +308,15 @@ def _build_ir(ctx: IRBuildContext, contract: awst_nodes.ContractFragment) -> Con description=contract.docstring, name=contract.name, ref=contract.id, - arc4_methods=folded.arc4_methods, + arc4_methods=arc4_methods, global_state=immutabledict(folded.global_state), local_state=immutabledict(folded.local_state), + boxes=immutabledict(folded.boxes), state_totals=folded.build_state_totals(location=contract.source_location), + structs=immutabledict(_wtypes_to_structs(structs)), + template_variable_types=immutabledict( + TemplateVariableTypeCollector.collect(ctx.subroutines) + ), ), ) return result @@ -438,7 +466,9 @@ class FoldedContract: clear_program: awst_nodes.ContractMethod | None = None global_state: dict[str, ContractState] = attrs.field(factory=dict) local_state: dict[str, ContractState] = attrs.field(factory=dict) + boxes: dict[str, ContractState] = attrs.field(factory=dict) arc4_methods: list[ARC4Method] = attrs.field(factory=list) + structs: list[wtypes.ARC4Struct | wtypes.WTuple] = attrs.field(factory=list) declared_totals: awst_nodes.StateTotals | None def build_state_totals(self, *, location: SourceLocation) -> StateTotals: @@ -499,7 +529,7 @@ def _gather_arc4_methods( def _fold_state_and_special_methods( ctx: IRBuildContext, contract: awst_nodes.ContractFragment -) -> tuple[FoldedContract, dict[awst_nodes.ContractMethod, ARC4MethodConfig]]: +) -> tuple[FoldedContract, dict[awst_nodes.ContractMethod, ARC4Method]]: bases = [ctx.resolve_contract_reference(cref) for cref in contract.bases] if contract.state_totals is None: base_with_defined = next((b for b in bases if b.state_totals is not None), None) @@ -516,6 +546,7 @@ def _fold_state_and_special_methods( approval_program=contract.approval_program, clear_program=contract.clear_program, ) + struct_types = list[wtypes.ARC4Struct | wtypes.WTuple]() for c in [contract, *bases]: if result.init is None: # noqa: SIM102 if c.init and c.init.inheritable: @@ -527,51 +558,127 @@ def _fold_state_and_special_methods( if c.clear_program and c.clear_program.inheritable: result.clear_program = c.clear_program for state in c.app_state.values(): - storage_type = wtypes.persistable_stack_type( - state.storage_wtype, state.source_location - ) - key_type = None - if state.key_wtype is not None: - key_type = wtypes.persistable_stack_type(state.key_wtype, state.source_location) + state_mapping: dict[str, ContractState] match state.kind: case awst_nodes.AppStorageKind.app_global: - if key_type is not None: - raise InternalError( - f"maps of {state.kind} are not supported yet", state.source_location - ) - translated = ContractState( - name=state.member_name, - source_location=state.source_location, - key=state.key.value, # TODO: pass encoding? - storage_type=storage_type, - description=state.description, - ) - result.global_state[translated.name] = translated + state_mapping = result.global_state case awst_nodes.AppStorageKind.account_local: - if key_type is not None: - raise InternalError( - f"maps of {state.kind} are not supported yet", state.source_location - ) - translated = ContractState( - name=state.member_name, - source_location=state.source_location, - key=state.key.value, # TODO: pass encoding? - storage_type=storage_type, - description=state.description, - ) - result.local_state[translated.name] = translated + state_mapping = result.local_state case awst_nodes.AppStorageKind.box: - pass # TODO: forward these on + state_mapping = result.boxes case _: typing.assert_never(state.kind) + if state.key_wtype and _is_arc4_struct(state.key_wtype): + struct_types.append(state.key_wtype) + if _is_arc4_struct(state.storage_wtype): + struct_types.append(state.storage_wtype) + state_mapping[state.member_name] = _get_contract_state(state) + arc4_method_refs = _gather_arc4_methods(ctx, contract) + for arc4_method in arc4_method_refs: + for wtype in (arc4_method.return_type, *(arg.wtype for arg in arc4_method.args)): + if _is_arc4_struct(wtype): + struct_types.append(wtype) + if arc4_method_refs: - result.arc4_methods = extract_arc4_methods( + methods = extract_arc4_methods( arc4_method_refs, local_state=result.local_state, global_state=result.global_state, ) - return result, arc4_method_refs + result.arc4_methods = list(methods.values()) + else: + methods = {} + result.structs = struct_types + return result, methods + + +def _is_arc4_struct(wtype: wtypes.WType) -> typing.TypeGuard[wtypes.ARC4Struct | wtypes.WTuple]: + return isinstance(wtype, wtypes.ARC4Struct | wtypes.WTuple) and bool(wtype.fields) + + +def _wtypes_to_structs( + structs: Sequence[wtypes.ARC4Struct | wtypes.WTuple], +) -> dict[str, ARC4Struct]: + """ + Produce a unique mapping of struct names to ARC4Struct definitions. + Will recursively include any structs referenced in fields + """ + structs = list(structs) + struct_results = dict[wtypes.ARC4Struct | wtypes.WTuple, ARC4Struct]() + while structs: + struct = structs.pop() + if struct in struct_results: + continue + structs.extend( + wtype + for wtype in struct.fields.values() + if isinstance(wtype, wtypes.ARC4Struct) and wtype not in struct_results + ) + struct_results[struct] = _wtype_to_struct(struct) + return { + wtype.name: struct_results[wtype] for wtype in sorted(struct_results, key=lambda s: s.name) + } + + +def _wtype_to_struct(struct: wtypes.ARC4Struct | wtypes.WTuple) -> ARC4Struct: + fields = [] + for field_name, field_wtype in struct.fields.items(): + if not isinstance(field_wtype, wtypes.ARC4Type): + maybe_arc4_field_wtype = maybe_avm_to_arc4_equivalent_type(field_wtype) + if maybe_arc4_field_wtype is None: + raise InternalError("expected ARC4 type") + field_wtype = maybe_arc4_field_wtype + fields.append( + ARC4StructField( + name=field_name, + type=field_wtype.arc4_name, + struct=field_wtype.name if _is_arc4_struct(field_wtype) else None, + ) + ) + return ARC4Struct( + fullname=struct.name, + desc=struct.desc, + fields=fields, + ) + + +def _get_contract_state(state: awst_nodes.AppStorageDefinition) -> ContractState: + storage_type = wtypes.persistable_stack_type(state.storage_wtype, state.source_location) + if state.key_wtype is not None: + arc56_key_type = _get_arc56_type(state.key_wtype, state.source_location) + is_map = True + else: + arc56_key_type = ( + "AVMString" if state.key.encoding == awst_nodes.BytesEncoding.utf8 else "AVMBytes" + ) + is_map = False + arc56_value_type = _get_arc56_type(state.storage_wtype, state.source_location) + return ContractState( + name=state.member_name, + source_location=state.source_location, + key_or_prefix=state.key.value, + arc56_key_type=arc56_key_type, + arc56_value_type=arc56_value_type, + storage_type=storage_type, + description=state.description, + is_map=is_map, + ) + + +def _get_arc56_type(wtype: wtypes.WType, loc: SourceLocation) -> str: + if isinstance(wtype, wtypes.ARC4Struct): + return wtype.name + if isinstance(wtype, wtypes.ARC4Type): + return wtype.arc4_name + if wtype == wtypes.string_wtype: + return "AVMString" + storage_type = wtypes.persistable_stack_type(wtype, loc) + match storage_type: + case AVMType.uint64: + return "AVMUint64" + case AVMType.bytes: + return "AVMBytes" class SubroutineCollector(FunctionTraverser): @@ -609,3 +716,79 @@ def _enter_func(self, func: awst_nodes.Function) -> Iterator[None]: yield finally: self._func_stack.pop() + + +@attrs.frozen +class EventCollector(FunctionTraverser): + context: IRBuildContext + emits: dict[awst_nodes.Function, StableSet[wtypes.ARC4Struct]] = attrs.field(factory=dict) + _func_stack: list[awst_nodes.Function] = attrs.field(factory=list) + + @classmethod + def collect( + cls, context: IRBuildContext, all_funcs: Iterable[awst_nodes.Function] + ) -> Mapping[awst_nodes.Function, StableSet[wtypes.ARC4Struct]]: + collector = cls(context) + for func in all_funcs: + collector.process_func(func) + return collector.emits + + def process_func(self, func: awst_nodes.Function) -> None: + if func in self.emits: + return + self.emits[func] = StableSet[wtypes.ARC4Struct]() + with self._enter_func(func): + func.body.accept(self) + + @contextlib.contextmanager + def _enter_func(self, func: awst_nodes.Function) -> Iterator[None]: + self._func_stack.append(func) + try: + yield + finally: + self._func_stack.pop() + + @property + def current_func(self) -> awst_nodes.Function: + return self._func_stack[-1] + + def visit_emit(self, emit: awst_nodes.Emit) -> None: + assert isinstance(emit.value.wtype, wtypes.ARC4Struct) + self.emits[self.current_func].add(emit.value.wtype) + + def visit_subroutine_call_expression(self, expr: awst_nodes.SubroutineCallExpression) -> None: + target = self.context.resolve_function_reference( + expr.target, + expr.source_location, + caller=self.current_func, + ) + self.process_func(target) + self.emits[self.current_func] |= self.emits[target] + + +class TemplateVariableTypeCollector(FunctionTraverser): + def __init__(self) -> None: + self.vars = dict[str, awst_nodes.TemplateVar]() + + @classmethod + def collect(cls, functions: Iterable[awst_nodes.Function]) -> dict[str, str]: + collector = cls() + for function in functions: + function.body.accept(collector) + return { + name: _get_arc56_type(var.wtype, var.source_location) + for name, var in collector.vars.items() + } + + def visit_template_var(self, var: awst_nodes.TemplateVar) -> None: + try: + existing = self.vars[var.name] + except KeyError: + self.vars[var.name] = var + else: + if existing.wtype != var.wtype: + logger.error( + "inconsistent types specified for template var", + location=var.source_location, + ) + logger.info("other template var", location=existing.source_location) diff --git a/src/puya/models.py b/src/puya/models.py index 77797b9a34..27d86f4c4a 100644 --- a/src/puya/models.py +++ b/src/puya/models.py @@ -45,14 +45,24 @@ class ARC4CreateOption(enum.Enum): disallow = enum.auto() -def _freeze_list_of_lists(elements: Sequence[Sequence[str]]) -> Sequence[tuple[str, str]]: - return tuple((e1, e2) for (e1, e2) in elements) - - @attrs.frozen -class ARC32StructDef: +class ARC4StructField: name: str - elements: Sequence[tuple[str, str]] = attrs.field(default=(), converter=_freeze_list_of_lists) + type: str + struct: str | None + + +@attrs.frozen(kw_only=True) +class ARC4Struct: + fullname: str + desc: str | None = None + fields: Sequence[ARC4StructField] = attrs.field( + default=(), converter=tuple[ARC4StructField, ...] + ) + + @property + def name(self) -> str: + return self.fullname.rsplit(".", maxsplit=1)[-1] @attrs.frozen(kw_only=True) @@ -60,7 +70,7 @@ class ARC4BareMethodConfig: source_location: SourceLocation | None allowed_completion_types: Sequence[OnCompletionAction] = attrs.field( default=(OnCompletionAction.NoOp,), - converter=tuple[OnCompletionAction], + converter=tuple[OnCompletionAction, ...], validator=attrs.validators.min_len(1), ) create: ARC4CreateOption = ARC4CreateOption.disallow @@ -79,19 +89,20 @@ class ARC4ABIMethodConfig: readonly: bool = False default_args: immutabledict[str, str] = immutabledict() """Mapping is from parameter -> source""" - structs: immutabledict[str, ARC32StructDef] = immutabledict() @attrs.frozen class ARC4MethodArg: name: str type_: str + struct: str | None desc: str | None = attrs.field(hash=False) @attrs.frozen class ARC4Returns: type_: str + struct: str | None desc: str | None = attrs.field(hash=False) @@ -101,8 +112,13 @@ class ARC4ABIMethod: desc: str | None = attrs.field(hash=False) args: Sequence[ARC4MethodArg] = attrs.field(converter=tuple[ARC4MethodArg, ...]) returns: ARC4Returns + events: Sequence[ARC4Struct] config: ARC4ABIMethodConfig + @property + def signature(self) -> str: + return f"{self.name}({','.join(a.type_ for a in self.args)}){self.returns.type_}" + @attrs.frozen class ARC4BareMethod: @@ -114,9 +130,14 @@ class ARC4BareMethod: class ContractState: name: str source_location: SourceLocation - key: bytes + key_or_prefix: bytes + """Key value as bytes, or prefix if it is a map""" + arc56_key_type: str + arc56_value_type: str storage_type: typing.Literal[AVMType.uint64, AVMType.bytes] description: str | None + is_map: bool + """State describes a map""" @attrs.frozen(kw_only=True) @@ -145,8 +166,12 @@ class ContractMetaData: description: str | None global_state: immutabledict[str, ContractState] local_state: immutabledict[str, ContractState] + boxes: immutabledict[str, ContractState] state_totals: StateTotals arc4_methods: Sequence[ARC4Method] + structs: immutabledict[str, ARC4Struct] + template_variable_types: immutabledict[str, str] + """Mapping of template variable names to their ARC-56 type""" @property def is_arc4(self) -> bool: @@ -174,6 +199,8 @@ class DebugEvent(typing.TypedDict, total=False): """Variable names on the stack AFTER the next op executes""" defined_out: Sequence[str] """Variable names that are defined AFTER the next op executes""" + error: str + """Error message if failure occurs at this op""" @attrs.frozen @@ -202,6 +229,10 @@ def bytecode(self) -> bytes | None: @abc.abstractmethod def debug_info(self) -> DebugInfo | None: ... + @property + @abc.abstractmethod + def template_variables(self) -> Mapping[str, int | bytes | None]: ... + class CompiledContract(abc.ABC): @property diff --git a/src/puya/options.py b/src/puya/options.py index 6c3ef62491..99719a55b0 100644 --- a/src/puya/options.py +++ b/src/puya/options.py @@ -18,6 +18,7 @@ class PuyaOptions: output_teal: bool = False output_source_map: bool = False output_arc32: bool = False + output_arc56: bool = False output_ssa_ir: bool = False output_optimization_ir: bool = False output_destructured_ir: bool = False diff --git a/src/puya/ussemble/assemble.py b/src/puya/ussemble/assemble.py index b43efb0bfc..f1ca0f3b48 100644 --- a/src/puya/ussemble/assemble.py +++ b/src/puya/ussemble/assemble.py @@ -90,6 +90,10 @@ def get_label_offset(label: models.Label) -> int: pc_ops, pc_events, ), + template_variables={ + var: value[0] if var in ctx.provided_template_variables else None + for var, value in ctx.template_variables.items() + }, ) @@ -108,6 +112,8 @@ def _add_op_debug_events( event["callsub"] = subroutine_ids[func_block] elif op.op_code == "retsub": event["retsub"] = True + elif op.op_code in ("assert", "err") and op.comment: + event["error"] = op.comment event["op"] = op.teal() for sm in op.stack_manipulations: diff --git a/src/puya/ussemble/context.py b/src/puya/ussemble/context.py index a25b89b626..48081046d5 100644 --- a/src/puya/ussemble/context.py +++ b/src/puya/ussemble/context.py @@ -1,3 +1,5 @@ +from collections.abc import Mapping + import attrs from puya.context import CompileContext @@ -6,5 +8,19 @@ @attrs.frozen(kw_only=True) class AssembleContext(CompileContext): - template_variables: dict[str, TemplateValue] = attrs.field(factory=dict) - offset_pc_from_constant_blocks: bool + mocked_template_variables: dict[str, TemplateValue] = attrs.field(factory=dict) + """Mocked template variables, used for generating debug info only""" + provided_template_variables: dict[str, TemplateValue] = attrs.field(factory=dict) + """Template variables provided via command line, or compilation""" + + @property + def template_variables(self) -> Mapping[str, TemplateValue]: + return { + **self.mocked_template_variables, + **self.provided_template_variables, + } + + @property + def offset_pc_from_constant_blocks(self) -> bool: + # only need to offset PC if there are any unspecified template variables + return bool(self.mocked_template_variables) diff --git a/src/puya/ussemble/main.py b/src/puya/ussemble/main.py index dc1f7e9f04..a24e48f83d 100644 --- a/src/puya/ussemble/main.py +++ b/src/puya/ussemble/main.py @@ -16,25 +16,25 @@ def assemble_program( *, debug_only: bool = False, ) -> models.AssembledProgram: + int_template_vars = _gather_template_variables(program, teal.IntBlock) + bytes_template_vars = _gather_template_variables(program, teal.BytesBlock) + program_template_vars = {*int_template_vars, *bytes_template_vars} if debug_only: # use dummy template values to produce a debug map - program_variables: Mapping[str, TemplateValue] = { - **{t: (0, None) for t in _gather_template_variables(program, teal.IntBlock)}, - **{t: (b"", None) for t in _gather_template_variables(program, teal.BytesBlock)}, - } - offset_pc = any(program_variables.keys() - template_variables.keys()) - template_variables = { - **program_variables, - **template_variables, + mocked_template_variables: Mapping[str, TemplateValue] = { + **{t: (0, None) for t in int_template_vars if t not in template_variables}, + **{t: (b"", None) for t in bytes_template_vars if t not in template_variables}, } else: - offset_pc = False + mocked_template_variables = {} assemble_ctx = attrs_extend( AssembleContext, ctx, - template_variables=template_variables, - offset_pc_from_constant_blocks=offset_pc, + provided_template_variables={ + t: v for t, v in template_variables.items() if t in program_template_vars + }, + mocked_template_variables=mocked_template_variables, ) return assemble_bytecode_and_debug_info(assemble_ctx, program) diff --git a/src/puya/ussemble/models.py b/src/puya/ussemble/models.py index 2566b6effe..cf8a25857f 100644 --- a/src/puya/ussemble/models.py +++ b/src/puya/ussemble/models.py @@ -1,4 +1,4 @@ -from collections.abc import Sequence +from collections.abc import Mapping, Sequence import attrs @@ -33,3 +33,5 @@ def op_spec(self) -> OpSpec: class AssembledProgram: bytecode: bytes debug_info: DebugInfo + template_variables: Mapping[str, int | bytes | None] + """Indicates template variable values used in compilation""" diff --git a/src/puyapy/__main__.py b/src/puyapy/__main__.py index 5e928c908b..ef5d1d244d 100644 --- a/src/puyapy/__main__.py +++ b/src/puyapy/__main__.py @@ -45,6 +45,12 @@ def main() -> None: default=True, help="Output {contract}.arc32.json ARC-32 app spec file", ) + parser.add_argument( + "--output-arc56", + action=argparse.BooleanOptionalAction, + default=False, + help="Output {contract}.arc56.json ARC-56 app spec file", + ) parser.add_argument( "--output-client", action=argparse.BooleanOptionalAction, diff --git a/src/puyapy/awst_build/arc32_client_gen.py b/src/puyapy/awst_build/arc32_client_gen.py index 3b1d6dcf41..dafc45bf97 100644 --- a/src/puyapy/awst_build/arc32_client_gen.py +++ b/src/puyapy/awst_build/arc32_client_gen.py @@ -1,7 +1,7 @@ import itertools import textwrap import typing -from collections.abc import Iterable, Sequence +from collections.abc import Iterable, Mapping, Sequence from pathlib import Path from puya import log @@ -10,7 +10,7 @@ ARC4CreateOption, ARC4Method, ARC4MethodArg, - ARC32StructDef, + ARC4Struct, OnCompletionAction, ) from puya.utils import make_path_relative_to_cwd, unique @@ -24,11 +24,13 @@ _INDENT = " " * 4 -def write_arc32_client(name: str, methods: Sequence[ARC4Method], out_dir: Path) -> None: +def write_arc32_client( + name: str, structs: Mapping[str, ARC4Struct], methods: Sequence[ARC4Method], out_dir: Path +) -> None: stub_path = out_dir / f"client_{name}.py" if _can_overwrite_auto_generated_file(stub_path): logger.info(f"writing {make_path_relative_to_cwd(stub_path)}") - stub_text = _create_arc32_stub(name, methods) + stub_text = _create_arc32_stub(name, structs, methods) stub_path.write_text(stub_text) else: logger.error( @@ -41,7 +43,9 @@ def _can_overwrite_auto_generated_file(path: Path) -> bool: return not path.exists() or path.read_text().startswith(_AUTO_GENERATED_COMMENT) -def _create_arc32_stub(name: str, methods: Sequence[ARC4Method]) -> str: +def _create_arc32_stub( + name: str, structs: Mapping[str, ARC4Struct], methods: Sequence[ARC4Method] +) -> str: abi_methods = [m for m in methods if isinstance(m, ARC4ABIMethod)] return "\n".join( ( @@ -52,31 +56,23 @@ def _create_arc32_stub(name: str, methods: Sequence[ARC4Method]) -> str: "", "import algopy", "", - *itertools.chain( - *( - _abi_struct_to_class(s) - for s in unique(s for m in abi_methods for s in m.config.structs.values()) - ) - ), + *itertools.chain(*(_abi_struct_to_class(s) for s in unique(structs.values()))), "", f"class {name}(algopy.arc4.ARC4Client, typing.Protocol):", *([_indent(["pass"]), ""] if not abi_methods else []), - *(_abi_method_to_signature(m) for m in abi_methods), + *(_abi_method_to_signature(structs, m) for m in abi_methods), ) ) -def _abi_struct_to_class(s: ARC32StructDef) -> Iterable[str]: +def _abi_struct_to_class(s: ARC4Struct) -> Iterable[str]: return ( f"class {s.name}(algopy.arc4.Struct):", - _indent( - f"{name}: {_arc4_type_to_algopy_cls(elem_type)}" for name, elem_type in s.elements - ), + _indent(f"{elem.name}: {_arc4_type_to_algopy_cls(elem.type)}" for elem in s.fields), ) -def _abi_method_to_signature(m: ARC4ABIMethod) -> str: - structs = dict(m.config.structs) +def _abi_method_to_signature(structs: Mapping[str, ARC4Struct], m: ARC4ABIMethod) -> str: try: output_struct = structs["output"] except KeyError: @@ -91,7 +87,7 @@ def _abi_method_to_signature(m: ARC4ABIMethod) -> str: _indent( ( "self,", - *(_abi_arg(arg, structs.get(arg.name)) for arg in m.args), + *(_abi_arg(arg, structs.get(arg.struct or "")) for arg in m.args), ) ), f") -> {return_type}: ...", @@ -100,7 +96,7 @@ def _abi_method_to_signature(m: ARC4ABIMethod) -> str: ) -def _abi_arg(arg: ARC4MethodArg, struct: ARC32StructDef | None) -> str: +def _abi_arg(arg: ARC4MethodArg, struct: ARC4Struct | None) -> str: python_type = struct.name if struct else _arc4_type_to_algopy_cls(arg.type_) return f"{arg.name}: {python_type}," diff --git a/src/puyapy/awst_build/arc4_utils.py b/src/puyapy/awst_build/arc4_utils.py index 7ff141a35e..41a0bf3616 100644 --- a/src/puyapy/awst_build/arc4_utils.py +++ b/src/puyapy/awst_build/arc4_utils.py @@ -15,7 +15,8 @@ ARC4ABIMethodConfig, ARC4BareMethodConfig, ARC4CreateOption, - ARC32StructDef, + ARC4Struct, + ARC4StructField, OnCompletionAction, TransactionType, ) @@ -254,13 +255,6 @@ def get_arc4_abimethod_data( case invalid_default_args_option: context.error(f"invalid default_args option: {invalid_default_args_option}", dec_loc) - # extract "structs" from signature - structs = dict[str, ARC32StructDef]() - for n, pt in func_types.items(): - mapped_type = pytype_to_arc4_pytype(pt, on_error=lambda t: t) - if _is_arc4_struct(mapped_type): - structs[n] = _pytype_to_struct_def(mapped_type) - config = ARC4ABIMethodConfig( source_location=dec_loc, allowed_completion_types=allowed_completion_types, @@ -268,7 +262,6 @@ def get_arc4_abimethod_data( name=name, readonly=readonly, default_args=immutabledict(default_args), - structs=immutabledict(structs), ) return ARC4ABIMethodData(config=config, signature=func_types) @@ -357,10 +350,17 @@ def visit_dict_expr(self, o: mypy.nodes.DictExpr) -> dict[object, object]: return {key.accept(self) if key else None: value.accept(self) for key, value in o.items} -def _pytype_to_struct_def(typ: pytypes.StructType) -> ARC32StructDef: - return ARC32StructDef( - name=typ.name.rsplit(".", maxsplit=1)[-1], - elements=[(n, pytype_to_arc4(t)) for n, t in typ.fields.items()], +def _pytype_to_struct_def(typ: pytypes.StructType) -> ARC4Struct: + return ARC4Struct( + fullname=typ.name, + fields=[ + ARC4StructField( + name=n, + type=pytype_to_arc4(t), + struct=t.name if pytypes.ARC4StructBaseType in t.mro else None, + ) + for n, t in typ.fields.items() + ], ) @@ -425,6 +425,7 @@ def pytype_to_arc4_pytype( case pytypes.NamedTupleType(): return pytypes.StructType( base=pytypes.ARC4StructBaseType, + desc=pytype.desc, name=pytype.name, fields={ name: pytype_to_arc4_pytype(t, on_error) for name, t in pytype.fields.items() diff --git a/src/puyapy/awst_build/eb/arc4/emit.py b/src/puyapy/awst_build/eb/arc4/emit.py index 82776e5226..ccbcdcb1e5 100644 --- a/src/puyapy/awst_build/eb/arc4/emit.py +++ b/src/puyapy/awst_build/eb/arc4/emit.py @@ -3,18 +3,17 @@ import mypy.nodes from puya import log -from puya.awst.nodes import MethodConstant +from puya.awst.nodes import Emit from puya.parse import SourceLocation -from puyapy.awst_build import intrinsic_factory, pytypes +from puyapy.awst_build import pytypes from puyapy.awst_build.arc4_utils import pytype_to_arc4 from puyapy.awst_build.eb import _expect as expect from puyapy.awst_build.eb._base import FunctionBuilder from puyapy.awst_build.eb.arc4._utils import get_arc4_signature -from puyapy.awst_build.eb.arc4.tuple import ARC4TupleGenericTypeBuilder +from puyapy.awst_build.eb.arc4.struct import ARC4StructTypeBuilder from puyapy.awst_build.eb.interface import InstanceBuilder, NodeBuilder from puyapy.awst_build.eb.none import NoneExpressionBuilder -from puyapy.awst_build.eb.tuple import TupleLiteralBuilder logger = log.get_logger(__name__) @@ -33,7 +32,6 @@ def call( case InstanceBuilder( pytype=pytypes.StructType() as struct_type ) as event_arg_eb if pytypes.ARC4StructBaseType in struct_type.mro: - event_name = struct_type.name.split(".")[-1] if rest: logger.error( "unexpected additional arguments", location=rest[0].source_location @@ -46,18 +44,28 @@ def call( location=first.source_location, ) arc4_args = signature.convert_args(rest) - event_name = signature.method_name - event_arg_eb = ARC4TupleGenericTypeBuilder(location).call( - args=[TupleLiteralBuilder(items=arc4_args, location=location)], - arg_names=[None], - arg_kinds=[mypy.nodes.ARG_POS], + # emit requires a struct type, so generate one based on args + struct_type = pytypes.StructType( + base=pytypes.ARC4StructBaseType, + name=signature.method_name, + desc=None, + fields={ + f"field{idx}": arg.pytype for idx, arg in enumerate(arc4_args, start=1) + }, + frozen=True, + source_location=location, + ) + event_arg_eb = ARC4StructTypeBuilder(struct_type, location).call( + args=arc4_args, + arg_names=[None] * len(arc4_args), + arg_kinds=[mypy.nodes.ARG_POS] * len(arc4_args), location=location, ) + event_name = struct_type.name.split(".")[-1] event_sig = f"{event_name}{pytype_to_arc4(event_arg_eb.pytype, location)}" - log_value = intrinsic_factory.concat( - MethodConstant(value=event_sig, source_location=location), - event_arg_eb.resolve(), - location, + emit = Emit( + signature=event_sig, + value=event_arg_eb.resolve(), + source_location=location, ) - log_expr = intrinsic_factory.log(log_value, location) - return NoneExpressionBuilder(log_expr) + return NoneExpressionBuilder(emit) diff --git a/src/puyapy/awst_build/module.py b/src/puyapy/awst_build/module.py index a021d7599e..90ab814bac 100644 --- a/src/puyapy/awst_build/module.py +++ b/src/puyapy/awst_build/module.py @@ -684,6 +684,7 @@ def _process_struct( struct_typ = pytypes.StructType( base=base, name=cdef.fullname, + desc=cdef.docstring, fields=fields, frozen=frozen, source_location=cls_loc, @@ -701,6 +702,7 @@ def _process_named_tuple( cls_loc = context.node_location(cdef) named_tuple_type = pytypes.NamedTupleType( name=cdef.fullname, + desc=cdef.docstring, fields=fields, source_location=cls_loc, ) diff --git a/src/puyapy/awst_build/pytypes.py b/src/puyapy/awst_build/pytypes.py index 43272c68b0..1aed06c3af 100644 --- a/src/puyapy/awst_build/pytypes.py +++ b/src/puyapy/awst_build/pytypes.py @@ -295,6 +295,7 @@ class NamedTupleType(TupleType): generic: None = attrs.field(default=None, init=False) bases: tuple[PyType, ...] = attrs.field(default=(NamedTupleBaseType,), init=False) mro: tuple[PyType, ...] = attrs.field(default=(NamedTupleBaseType,), init=False) + desc: str | None = None @items.default def _items(self) -> tuple[PyType, ...]: @@ -308,6 +309,7 @@ def wtype(self) -> wtypes.WTuple: types=(i.wtype for i in self.items), names=tuple(self.fields), source_location=self.source_location, + desc=self.desc, ) @@ -398,6 +400,7 @@ class StructType(PyType): wtype: wtypes.WType source_location: SourceLocation | None generic: None = None + desc: str | None = None @cached_property def names(self) -> tuple[str, ...]: @@ -412,6 +415,7 @@ def __init__( *, base: PyType, name: str, + desc: str | None, fields: Mapping[str, PyType], frozen: bool, source_location: SourceLocation | None, @@ -426,12 +430,17 @@ def __init__( else: raise InternalError(f"Unknown struct base type: {base}", source_location) wtype = wtype_cls( - fields=field_wtypes, name=name, immutable=frozen, source_location=source_location + fields=field_wtypes, + name=name, + desc=desc, + immutable=frozen, + source_location=source_location, ) self.__attrs_init__( bases=[base], mro=[base], name=name, + desc=desc, wtype=wtype, fields=fields, frozen=frozen, diff --git a/src/puyapy/client_gen.py b/src/puyapy/client_gen.py index b6f7f59412..41c77e270d 100644 --- a/src/puyapy/client_gen.py +++ b/src/puyapy/client_gen.py @@ -16,7 +16,8 @@ ARC4Method, ARC4MethodArg, ARC4Returns, - ARC32StructDef, + ARC4Struct, + ARC4StructField, OnCompletionAction, ) @@ -50,8 +51,8 @@ def output_stubs(paths: Sequence[Path]) -> None: try: app_spec_paths = resolve_app_specs(paths) for app_spec_path in app_spec_paths: - name, methods = parse_app_spec_methods(app_spec_path.read_text("utf8")) - write_arc32_client(name, methods, app_spec_path.parent) + name, structs, methods = parse_app_spec_methods(app_spec_path.read_text("utf8")) + write_arc32_client(name, structs, methods, app_spec_path.parent) except PuyaError as ex: logger.error(str(ex)) # noqa: TRY400 @@ -74,22 +75,39 @@ def resolve_app_specs(paths: Sequence[Path]) -> Sequence[Path]: return app_specs -def parse_app_spec_methods(app_spec_json: str) -> tuple[str, Sequence[ARC4Method]]: +def parse_app_spec_methods( + app_spec_json: str, +) -> tuple[str, dict[str, ARC4Struct], Sequence[ARC4Method]]: app_spec = json.loads(app_spec_json) contract = app_spec["contract"] hints = app_spec["hints"] contract_name = contract["name"] methods = list[ARC4Method]() arc4_methods = {m.signature: m for m in _parse_methods(contract["methods"])} + known_structs = dict[str, ARC4Struct]() for arc4_method in arc4_methods.values(): method_hints = hints[str(arc4_method.signature)] create_option, allowed_oca = _call_config(method_hints["call_config"]) + arg_to_struct = dict[str, str]() + for param, struct in _structs(method_hints.get("structs", {})): + for known_struct_name, known_struct in known_structs.items(): + if known_struct == struct: + arg_to_struct[param] = known_struct_name + break + else: + known_structs[struct.name] = struct + arg_to_struct[param] = struct.name methods.append( ARC4ABIMethod( name=arc4_method.python_name, desc=arc4_method.desc, - args=arc4_method.signature.args, - returns=arc4_method.signature.returns, + args=[ + attrs.evolve(a, struct=arg_to_struct.get(a.name)) + for a in arc4_method.signature.args + ], + returns=attrs.evolve( + arc4_method.signature.returns, struct=arg_to_struct.get("output") + ), config=ARC4ABIMethodConfig( source_location=None, name=arc4_method.signature.name, @@ -99,11 +117,11 @@ def parse_app_spec_methods(app_spec_json: str) -> tuple[str, Sequence[ARC4Method default_args=immutabledict( _default_args(method_hints.get("default_arguments", {}), arc4_methods) ), - structs=immutabledict(_structs(method_hints.get("structs", {}))), ), + events=[], # ARC-32 does not specify events ) ) - return contract_name, methods + return contract_name, known_structs, methods @attrs.frozen(kw_only=True) @@ -147,12 +165,14 @@ def _parse_signature(method: dict[str, typing.Any]) -> _MethodSignature: name=arg["name"], type_=arg["type"], desc=arg.get("desc"), + struct=arg.get("struct"), ) for arg in method["args"] ), returns=ARC4Returns( type_=returns["type"], desc=returns.get("desc"), + struct=returns.get("struct"), ), ) @@ -195,9 +215,15 @@ def _default_args( raise PuyaError(f"Unsupported source '{source}' for default argument: {param}") -def _structs(structs: dict[str, dict[str, typing.Any]]) -> Iterable[tuple[str, ARC32StructDef]]: +def _structs(structs: dict[str, dict[str, typing.Any]]) -> Iterable[tuple[str, ARC4Struct]]: for param, struct_config in structs.items(): - yield param, ARC32StructDef(name=struct_config["name"], elements=struct_config["elements"]) + yield param, ARC4Struct( + fullname=struct_config["name"], + fields=[ + ARC4StructField(name=f[0], type=f[1], struct=None) + for f in struct_config["elements"] + ], + ) if __name__ == "__main__": diff --git a/src/puyapy/compile.py b/src/puyapy/compile.py index d5b1e13428..5a623b0cda 100644 --- a/src/puyapy/compile.py +++ b/src/puyapy/compile.py @@ -100,8 +100,8 @@ def write_arc32_clients( # use round trip of ARC32 -> reparse to ensure consistency # of client output regardless if generating from ARC32 or # Puya ARC4Contract - name, methods = parse_app_spec_methods(app_spec_json) - write_arc32_client(name, methods, contract_out_dir) + name, structs, methods = parse_app_spec_methods(app_spec_json) + write_arc32_client(name, structs, methods, contract_out_dir) def parse_with_mypy(paths: Sequence[Path]) -> ParseResult: diff --git a/test_cases/abi_routing/out/CustomApproval.arc56.json b/test_cases/abi_routing/out/CustomApproval.arc56.json new file mode 100644 index 0000000000..7f1f1cc2f6 --- /dev/null +++ b/test_cases/abi_routing/out/CustomApproval.arc56.json @@ -0,0 +1,113 @@ +{ + "arcs": [ + 22, + 28 + ], + "name": "CustomApproval", + "structs": {}, + "methods": [ + { + "name": "add_one", + "args": [ + { + "type": "uint64", + "name": "x" + } + ], + "returns": { + "type": "uint64" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "events": [], + "templateVariables": {}, + "networks": {}, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 193 + ], + "errorMessage": "OnCompletion is NoOp" + }, + { + "pc": [ + 224 + ], + "errorMessage": "is creating" + }, + { + "pc": [ + 196 + ], + "errorMessage": "is not creating" + }, + { + "pc": [ + 250 + ], + "errorMessage": "nonsense assert just to generate an init method" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLmFiaV9yb3V0aW5nLmN1c3RvbV9hcHByb3ZhbC5DdXN0b21BcHByb3ZhbC5hcHByb3ZhbF9wcm9ncmFtOgogICAgaW50Y2Jsb2NrIDEgMAogICAgcHVzaGJ5dGVzICIiCiAgICB0eG4gQXBwbGljYXRpb25JRAogICAgYm56IG1haW5fZW50cnlwb2ludEAyCiAgICBjYWxsc3ViIF9faW5pdF9fCgptYWluX2VudHJ5cG9pbnRAMjoKICAgIC8vIGFiaV9yb3V0aW5nL2N1c3RvbV9hcHByb3ZhbC5weToxMwogICAgLy8gaWYgVHhuLm51bV9hcHBfYXJncyA9PSAyIGFuZCBUeG4uYXBwbGljYXRpb25fYXJncygxKSA9PSBvcC5pdG9iKDQyKToKICAgIHR4biBOdW1BcHBBcmdzCiAgICBwdXNoaW50IDIgL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hdGlvbklECiAgICAhCiAgICBhc3NlcnQgLy8gbm9uc2Vuc2UgYXNzZXJ0IGp1c3QgdG8gZ2VuZXJhdGUgYW4gaW5pdCBtZXRob2QKICAgIHJldHN1Ygo=", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLmFiaV9yb3V0aW5nLmN1c3RvbV9hcHByb3ZhbC5DdXN0b21BcHByb3ZhbC5jbGVhcl9zdGF0ZV9wcm9ncmFtOgogICAgcHVzaGludCAxIC8vIDEKICAgIHJldHVybgo=" + }, + "byteCode": { + "approval": "CiACAQCAADEYQAADiADlMRuBAhJBABk2GgGBKhYSQQAPgAzwn46J8J+OifCfjomwiAC6SUUCQABsgGl0aGlzIHdpbGwgbmV2ZXIgYmUgc2VlbiB1bmxlc3MgeW91J3JlIHJ1bm5pbmcgaW4gc2ltdWxhdGlvbiBtb2RlIGFueXdheSBzbyBJIGNhbiBzYXkgd2hhdGV2ZXIgSSB3YW50IGhlcmWwSUOKAAExG0EAKYAEA7XArzYaAI4BAAIjiTEZFEQxGEQ2GgEXiAAZFoAEFR98dUxQsCKJMRlAAAYxGBREIokjiYoBAYv/IgiJigABiP+0iYoAADEYFESJ", + "clear": "CoEBQw==" + }, + "compilerInfo": { + "compiler": "puya", + "compilerVersion": { + "major": 99, + "minor": 99, + "patch": 99 + } + } +} \ No newline at end of file diff --git a/test_cases/abi_routing/out/MinimumARC4.arc56.json b/test_cases/abi_routing/out/MinimumARC4.arc56.json new file mode 100644 index 0000000000..93a9cbb0e2 --- /dev/null +++ b/test_cases/abi_routing/out/MinimumARC4.arc56.json @@ -0,0 +1,79 @@ +{ + "arcs": [ + 22, + 28 + ], + "name": "MinimumARC4", + "structs": {}, + "methods": [], + "state": { + "schema": { + "global": { + "ints": 1, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": { + "gvalue": { + "keyType": "AVMString", + "valueType": "AVMUint64", + "key": "Z3ZhbHVl" + } + }, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "events": [], + "templateVariables": {}, + "networks": {}, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 29 + ], + "errorMessage": "is creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLmFiaV9yb3V0aW5nLm1pbmltYWwuTWluaW11bUFSQzQuYXBwcm92YWxfcHJvZ3JhbToKICAgIHR4biBBcHBsaWNhdGlvbklECiAgICBibnogbWFpbl9lbnRyeXBvaW50QDIKICAgIGNhbGxzdWIgX19pbml0X18KCm1haW5fZW50cnlwb2ludEAyOgogICAgY2FsbHN1YiBfX3B1eWFfYXJjNF9yb3V0ZXJfXwogICAgcmV0dXJuCgoKLy8gdGVzdF9jYXNlcy5hYmlfcm91dGluZy5taW5pbWFsLk1pbmltdW1BUkM0Ll9fcHV5YV9hcmM0X3JvdXRlcl9fKCkgLT4gdWludDY0OgpfX3B1eWFfYXJjNF9yb3V0ZXJfXzoKICAgIC8vIGFiaV9yb3V0aW5nL21pbmltYWwucHk6NAogICAgLy8gY2xhc3MgTWluaW11bUFSQzQoQVJDNENvbnRyYWN0KToKICAgIHByb3RvIDAgMQogICAgdHhuIE51bUFwcEFyZ3MKICAgIGJueiBfX3B1eWFfYXJjNF9yb3V0ZXJfX19hZnRlcl9pZl9lbHNlQDYKICAgIHR4biBPbkNvbXBsZXRpb24KICAgIGJueiBfX3B1eWFfYXJjNF9yb3V0ZXJfX19hZnRlcl9pZl9lbHNlQDYKICAgIHR4biBBcHBsaWNhdGlvbklECiAgICAhCiAgICBhc3NlcnQgLy8gaXMgY3JlYXRpbmcKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXRzdWIKCl9fcHV5YV9hcmM0X3JvdXRlcl9fX2FmdGVyX2lmX2Vsc2VANjoKICAgIC8vIGFiaV9yb3V0aW5nL21pbmltYWwucHk6NAogICAgLy8gY2xhc3MgTWluaW11bUFSQzQoQVJDNENvbnRyYWN0KToKICAgIHB1c2hpbnQgMCAvLyAwCiAgICByZXRzdWIKCgovLyB0ZXN0X2Nhc2VzLmFiaV9yb3V0aW5nLm1pbmltYWwuTWluaW11bUFSQzQuX19pbml0X18oKSAtPiB2b2lkOgpfX2luaXRfXzoKICAgIC8vIGFiaV9yb3V0aW5nL21pbmltYWwucHk6NQogICAgLy8gZGVmIF9faW5pdF9fKHNlbGYpIC0+IE5vbmU6CiAgICBwcm90byAwIDAKICAgIC8vIGFiaV9yb3V0aW5nL21pbmltYWwucHk6NgogICAgLy8gc2VsZi5ndmFsdWUgPSBVSW50NjQoNCkKICAgIHB1c2hieXRlcyAiZ3ZhbHVlIgogICAgcHVzaGludCA0IC8vIDQKICAgIGFwcF9nbG9iYWxfcHV0CiAgICByZXRzdWIK", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLmFiaV9yb3V0aW5nLm1pbmltYWwuTWluaW11bUFSQzQuY2xlYXJfc3RhdGVfcHJvZ3JhbToKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" + }, + "byteCode": { + "approval": "CjEYQAADiAAbiAABQ4oAATEbQAAMMRlAAAcxGBREgQGJgQCJigAAgAZndmFsdWWBBGeJ", + "clear": "CoEBQw==" + }, + "compilerInfo": { + "compiler": "puya", + "compilerVersion": { + "major": 99, + "minor": 99, + "patch": 99 + } + } +} \ No newline at end of file diff --git a/test_cases/abi_routing/out/Reference.arc56.json b/test_cases/abi_routing/out/Reference.arc56.json new file mode 100644 index 0000000000..5b71997bbe --- /dev/null +++ b/test_cases/abi_routing/out/Reference.arc56.json @@ -0,0 +1,798 @@ +{ + "arcs": [ + 22, + 28 + ], + "name": "Reference", + "structs": {}, + "methods": [ + { + "name": "noop_with_uint64", + "args": [ + { + "type": "uint64", + "name": "a" + } + ], + "returns": { + "type": "uint8" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "full_abi_config", + "args": [ + { + "type": "uint64", + "name": "a" + } + ], + "returns": { + "type": "uint8" + }, + "actions": { + "create": [ + "NoOp", + "OptIn", + "DeleteApplication" + ], + "call": [ + "NoOp", + "OptIn", + "CloseOut", + "UpdateApplication", + "DeleteApplication" + ] + }, + "readonly": true, + "events": [], + "recommendations": {} + }, + { + "name": "mixed_oca", + "args": [ + { + "type": "uint64", + "name": "a" + } + ], + "returns": { + "type": "uint8" + }, + "actions": { + "create": [], + "call": [ + "NoOp", + "CloseOut", + "DeleteApplication" + ] + }, + "readonly": true, + "events": [], + "recommendations": {} + }, + { + "name": "opt_into_asset", + "args": [ + { + "type": "asset", + "name": "asset" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "with_transactions", + "args": [ + { + "type": "asset", + "name": "asset" + }, + { + "type": "uint64", + "name": "an_int" + }, + { + "type": "pay", + "name": "pay" + }, + { + "type": "uint64", + "name": "another_int" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "compare_assets", + "args": [ + { + "type": "asset", + "name": "asset_a" + }, + { + "type": "asset", + "name": "asset_b" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "get_address", + "args": [], + "returns": { + "type": "address" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": true, + "events": [], + "recommendations": {} + }, + { + "name": "get_asset", + "args": [], + "returns": { + "type": "uint64" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": true, + "events": [], + "recommendations": {} + }, + { + "name": "get_app", + "args": [], + "returns": { + "type": "uint64" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": true, + "events": [], + "recommendations": {} + }, + { + "name": "get_a_int", + "args": [], + "returns": { + "type": "uint64" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": true, + "events": [], + "recommendations": {} + }, + { + "name": "method_with_default_args", + "args": [ + { + "type": "asset", + "name": "asset_from_storage", + "defaultValue": { + "source": "global", + "data": "YXNh", + "type": "AVMString" + } + }, + { + "type": "asset", + "name": "asset_from_function", + "defaultValue": { + "source": "method", + "data": "get_asset()uint64" + } + }, + { + "type": "account", + "name": "account_from_storage", + "defaultValue": { + "source": "global", + "data": "Y3JlYXRvcg==", + "type": "AVMString" + } + }, + { + "type": "account", + "name": "account_from_function", + "defaultValue": { + "source": "method", + "data": "get_address()address" + } + }, + { + "type": "application", + "name": "application_from_storage", + "defaultValue": { + "source": "global", + "data": "YXBw", + "type": "AVMString" + } + }, + { + "type": "application", + "name": "application_from_function", + "defaultValue": { + "source": "method", + "data": "get_app()uint64" + } + }, + { + "type": "byte[3]", + "name": "bytes_from_storage", + "defaultValue": { + "source": "global", + "data": "c29tZV9ieXRlcw==", + "type": "AVMString" + } + }, + { + "type": "uint64", + "name": "int_from_storage", + "defaultValue": { + "source": "global", + "data": "YW5faW50", + "type": "AVMString" + } + }, + { + "type": "uint64", + "name": "int_from_function", + "defaultValue": { + "source": "method", + "data": "get_a_int()uint64" + } + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "method_with_15_args", + "args": [ + { + "type": "uint64", + "name": "one" + }, + { + "type": "uint64", + "name": "two" + }, + { + "type": "uint64", + "name": "three" + }, + { + "type": "uint64", + "name": "four" + }, + { + "type": "uint64", + "name": "five" + }, + { + "type": "uint64", + "name": "six" + }, + { + "type": "uint64", + "name": "seven" + }, + { + "type": "uint64", + "name": "eight" + }, + { + "type": "uint64", + "name": "nine" + }, + { + "type": "uint64", + "name": "ten" + }, + { + "type": "uint64", + "name": "eleven" + }, + { + "type": "uint64", + "name": "twelve" + }, + { + "type": "uint64", + "name": "thirteen" + }, + { + "type": "uint64", + "name": "fourteen" + }, + { + "type": "byte[]", + "name": "fifteen" + } + ], + "returns": { + "type": "byte[]" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {}, + "desc": "Fifteen args should not encode the last argument as a tuple" + }, + { + "name": "method_with_more_than_15_args", + "args": [ + { + "type": "uint64", + "name": "a" + }, + { + "type": "uint64", + "name": "b" + }, + { + "type": "uint64", + "name": "c" + }, + { + "type": "uint64", + "name": "d" + }, + { + "type": "asset", + "name": "asset" + }, + { + "type": "uint64", + "name": "e" + }, + { + "type": "uint64", + "name": "f" + }, + { + "type": "pay", + "name": "pay" + }, + { + "type": "uint64", + "name": "g" + }, + { + "type": "uint64", + "name": "h" + }, + { + "type": "uint64", + "name": "i" + }, + { + "type": "uint64", + "name": "j" + }, + { + "type": "uint64", + "name": "k" + }, + { + "type": "uint64", + "name": "l" + }, + { + "type": "uint64", + "name": "m" + }, + { + "type": "uint64", + "name": "n" + }, + { + "type": "uint64", + "name": "o" + }, + { + "type": "uint64", + "name": "p" + }, + { + "type": "uint64", + "name": "q" + }, + { + "type": "uint64", + "name": "r" + }, + { + "type": "byte[]", + "name": "s" + }, + { + "type": "byte[]", + "name": "t" + }, + { + "type": "asset", + "name": "asset2" + }, + { + "type": "pay", + "name": "pay2" + }, + { + "type": "uint64", + "name": "u" + }, + { + "type": "uint64", + "name": "v" + } + ], + "returns": { + "type": "uint64" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {}, + "desc": "Application calls only support 16 args, and arc4 calls utilise the first arg for the method\nselector. Args beyond this number are packed into a tuple and placed in the 16th slot." + }, + { + "name": "hello_with_algopy_string", + "args": [ + { + "type": "string", + "name": "name" + } + ], + "returns": { + "type": "string" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "state": { + "schema": { + "global": { + "ints": 3, + "bytes": 2 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": { + "asa": { + "keyType": "AVMString", + "valueType": "AVMUint64", + "key": "YXNh" + }, + "an_int": { + "keyType": "AVMString", + "valueType": "AVMUint64", + "key": "YW5faW50" + }, + "some_bytes": { + "keyType": "AVMString", + "valueType": "byte[3]", + "key": "c29tZV9ieXRlcw==" + }, + "creator": { + "keyType": "AVMString", + "valueType": "AVMBytes", + "key": "Y3JlYXRvcg==" + }, + "app": { + "keyType": "AVMString", + "valueType": "AVMUint64", + "key": "YXBw" + } + }, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "DeleteApplication", + "NoOp", + "OptIn" + ], + "call": [] + }, + "events": [], + "templateVariables": {}, + "networks": {}, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 767 + ], + "errorMessage": "ASA already opted in" + }, + { + "pc": [ + 157, + 211, + 229, + 263, + 287, + 303, + 319, + 335, + 351, + 408, + 494, + 658 + ], + "errorMessage": "OnCompletion is NoOp" + }, + { + "pc": [ + 192 + ], + "errorMessage": "OnCompletion is one of NoOp, CloseOut, DeleteApplication" + }, + { + "pc": [ + 761 + ], + "errorMessage": "Only creator can opt in to ASA" + }, + { + "pc": [ + 830 + ], + "errorMessage": "asset a == b" + }, + { + "pc": [ + 765, + 796 + ], + "errorMessage": "check self.asa exists" + }, + { + "pc": [ + 1210 + ], + "errorMessage": "has method selector" + }, + { + "pc": [ + 800 + ], + "errorMessage": "is correct asset" + }, + { + "pc": [ + 806, + 820 + ], + "errorMessage": "is correct int" + }, + { + "pc": [ + 706 + ], + "errorMessage": "is creating" + }, + { + "pc": [ + 160, + 195, + 214, + 232, + 266, + 290, + 306, + 322, + 338, + 354, + 411, + 497, + 661 + ], + "errorMessage": "is not creating" + }, + { + "pc": [ + 814 + ], + "errorMessage": "is payment to app" + }, + { + "pc": [ + 251, + 532, + 633 + ], + "errorMessage": "transaction type is pay" + }, + { + "pc": [ + 910 + ], + "errorMessage": "wrong 0th byte from storage" + }, + { + "pc": [ + 920 + ], + "errorMessage": "wrong 1st byte from storage" + }, + { + "pc": [ + 930 + ], + "errorMessage": "wrong 2nd byte from storage" + }, + { + "pc": [ + 888 + ], + "errorMessage": "wrong account from function" + }, + { + "pc": [ + 882 + ], + "errorMessage": "wrong account from storage" + }, + { + "pc": [ + 900 + ], + "errorMessage": "wrong application from function" + }, + { + "pc": [ + 893 + ], + "errorMessage": "wrong application from storage" + }, + { + "pc": [ + 876 + ], + "errorMessage": "wrong asset from function" + }, + { + "pc": [ + 869 + ], + "errorMessage": "wrong asset from storage" + }, + { + "pc": [ + 943 + ], + "errorMessage": "wrong int from function" + }, + { + "pc": [ + 936 + ], + "errorMessage": "wrong int from storage" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLmFiaV9yb3V0aW5nLmNvbnRyYWN0LlJlZmVyZW5jZS5hcHByb3ZhbF9wcm9ncmFtOgogICAgaW50Y2Jsb2NrIDEgMCAyIDEyMwogICAgYnl0ZWNibG9jayAweDE1MWY3Yzc1ICJhc2EiIDB4MDAwMDAwMDAwMDAwMDFjOAogICAgdHhuIEFwcGxpY2F0aW9uSUQKICAgIGJueiBtYWluX2VudHJ5cG9pbnRAMgogICAgY2FsbHN1YiBfX2luaXRfXwoKbWFpbl9lbnRyeXBvaW50QDI6CiAgICBjYWxsc3ViIF9fcHV5YV9hcmM0X3JvdXRlcl9fCiAgICByZXR1cm4KCgovLyB0ZXN0X2Nhc2VzLmFiaV9y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AvLyAgICAgICAgICJOb09wIiwKICAgIC8vICAgICAgICAgIkNsb3NlT3V0IiwKICAgIC8vICAgICAgICAgIkRlbGV0ZUFwcGxpY2F0aW9uIiwKICAgIC8vICAgICBdLAogICAgLy8gICAgIGNyZWF0ZT0iZGlzYWxsb3ciLAogICAgLy8gICAgIHJlYWRvbmx5PVRydWUsCiAgICAvLyApCiAgICBpbnRjXzAgLy8gMQogICAgdHhuIE9uQ29tcGxldGlvbgogICAgc2hsCiAgICBwdXNoaW50IDM3IC8vIDM3CiAgICAmCiAgICBhc3NlcnQgLy8gT25Db21wbGV0aW9uIGlzIG9uZSBvZiBOb09wLCBDbG9zZU91dCwgRGVsZXRlQXBwbGljYXRpb24KICAgIHR4biBBcHBsaWNhdGlvbklECiAgICBhc3NlcnQgLy8gaXMgbm90IGNyZWF0aW5nCiAgICAvLyBhYmlfcm91dGluZy9jb250cmFjdC5weToyMgogICAgLy8gY2xhc3MgUmVmZXJlbmNlKEFSQzRDb250cmFjdCk6CiAgICB0eG5hIEFwcGxpY2F0aW9uQXJncyAxCiAgICAvLyBhYmlfcm91dGluZy9jb250cmFjdC5weTo1My02MQogICAgLy8gQGFyYzQuYWJpbWV0aG9kKAogICAgLy8gICAgIGFsbG93X2FjdGlvbnM9WwogICAgLy8gICAgICAgICAiTm9PcCIsCiAgICAvLyAgICAgICAgICJDbG9zZU91dCIsCiAgICAvLyAgICAgICAgICJEZWxldGVBcHBsaWNhdGlvbiIsCiAgICAvLyAgICAgXSwKICAgIC8vICAgICBjcmVhdGU9ImRpc2FsbG93IiwKICAgIC8vICAgICByZWFkb25seT1UcnVlLAogICAgLy8gKQogICAgY2FsbHN1YiBtaXhlZF9vY2EKICAgIGJ5dGVjXzAgLy8gMHgxNTFmN2M3NQogICAgc3dhcAogICAgY29uY2F0CiAgICBsb2cKICAgIGludGNfMCAvLyAxCiAgICByZXRzdWIKCl9fcHV5YV9hcmM0X3JvdXRlcl9fX29wdF9pbnRvX2Fzc2V0X3JvdXR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5dGVjXzAgLy8gMHgxNTFmN2M3NQogICAgc3dhcAogICAgY29uY2F0CiAgICBsb2cKICAgIGludGNfMCAvLyAxCiAgICByZXRzdWIKCl9fcHV5YV9hcmM0X3JvdXRlcl9fX2dldF9hbl9pbnRfcm91dGVAMTE6CiAgICAvLyBhYmlfcm91dGluZy9jb250cmFjdC5weToxMjUKICAgIC8vIEBhcmM0LmFiaW1ldGhvZChyZWFkb25seT1UcnVlLCBuYW1lPSJnZXRfYW5faW50IikKICAgIHR4biBPbkNvbXBsZXRpb24KICAgICEKICAgIGFzc2VydCAvLyBPbkNvbXBsZXRpb24gaXMgTm9PcAogICAgdHhuIEFwcGxpY2F0aW9uSUQKICAgIGFzc2VydCAvLyBpcyBub3QgY3JlYXRpbmcKICAgIGNhbGxzdWIgZ2V0X2FfaW50CiAgICBieXRlY18wIC8vIDB4MTUxZjdjNzUKICAgIHN3YXAKICAgIGNvbmNhdAogICAgbG9nCiAgICBpbnRjXzAgLy8gMQogICAgcmV0c3ViCgpfX3B1eWFfYXJjNF9yb3V0ZXJfX19tZXRob2Rfd2l0aF9kZWZhdWx0X2FyZ3Nfcm91dGVAMTI6CiAgICAvLyBhYmlfcm91dGluZy9jb250cmFjdC5weToxMjktMTQxCiAgICAvLyBAYXJjNC5hYmltZXRob2QoCiAgICAvLyAgICAgZGVmYXVsdF9hcmdzPXsKICAgIC8vICAgICAgICAgImFzc2V0X2Zyb21fc3RvcmFnZSI6ICJhc2EiLAogICAgLy8gICAgICAgICAiYXNzZXRfZnJvbV9mdW5jdGlvbiI6IGdldF9hc3NldCwKICAgIC8vICAgICAgICAgImFjY291bnRfZnJvbV9zdG9yYWdlIjogImNyZWF0b3IiLAogICAgLy8gICAgICAgICAiYWNjb3VudF9mcm9tX2Z1bmN0aW9uIjogImdldF9hZGRyZXNzIiwKICAgIC8vICAgICAgICAgImFwcGxpY2F0aW9uX2Zyb21fc3RvcmFnZSI6ICJhcHAiLAogICAgLy8gICAgICAgICAiYXBwbGljYX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gIC8vIGFiaV9yb3V0aW5nL2NvbnRyYWN0LnB5OjE4Ny0xOTAKICAgIC8vIG9uZQogICAgLy8gKyB0d28KICAgIC8vICsgdGhyZWUKICAgIC8vICsgZm91cgogICAgZnJhbWVfZGlnIC0xMgogICAgKwogICAgLy8gYWJpX3JvdXRpbmcvY29udHJhY3QucHk6MTg3LTE5MQogICAgLy8gb25lCiAgICAvLyArIHR3bwogICAgLy8gKyB0aHJlZQogICAgLy8gKyBmb3VyCiAgICAvLyArIGZpdmUKICAgIGZyYW1lX2RpZyAtMTEKICAgICsKICAgIC8vIGFiaV9yb3V0aW5nL2NvbnRyYWN0LnB5OjE4Ny0xOTIKICAgIC8vIG9uZQogICAgLy8gKyB0d28KICAgIC8vICsgdGhyZWUKICAgIC8vICsgZm91cgogICAgLy8gKyBmaXZlCiAgICAvLyArIHNpeAogICAgZnJhbWVfZGlnIC0xMAogICAgKwogICAgLy8gYWJpX3JvdXRpbmcvY29udHJhY3QucHk6MTg3LTE5MwogICAgLy8gb25lCiAgICAvLyArIHR3bwogICAgLy8gKyB0aHJlZQogICAgLy8gKyBmb3VyCiAgICAvLyArIGZpdmUKICAgIC8vICsgc2l4CiAgICAvLyArIHNldmVuCiAgICBmcmFtZV9kaWcgLTkKICAgICsKICAgIC8vIGFiaV9yb3V0aW5nL2NvbnRyYWN0LnB5OjE4Ny0xOTQKICAgIC8vIG9uZQogICAgLy8gKyB0d28KICAgIC8vICsgdGhyZWUKICAgIC8vICsgZm91cgogICAgLy8gKyBmaXZlCiAgICAvLyArIHNpeAogICAgLy8gKyBzZXZlbgogICAgLy8gKyBlaWdodAogICAgZnJhbWVfZGlnIC04CiAgICArCiAgICAvLyBhYmlfcm91dGluZy9jb250cmFjdC5weToxODctMTk1CiAgICAvLyBvbmUKICAgIC8vICsgdHdvCiAgICAvLyArIHRocmVlCiAgICAvLyArIGZvdXIKICAgIC8vICsgZml2ZQogICAgLy8gKyBzaXgKICAgIC8vICsgc2V2ZW4KICAgIC8vICsgZWlnaHQKICAgIC8vICsgbmluZQogICAgZnJhbWVfZGlnIC03CiAgICArCiAgICAvLyBhYmlfcm91dGluZy9jb250cmFjdC5weToxODctMTk2CiAgICAvLyBvbmUKICAgIC8vICsgdHdvCiAgICAvLyArIHRocmVlCiAgICAvLyArIGZvdXIKICAgIC8vICsgZml2ZQogICAgLy8gKyBzaXgKICAgIC8vICsgc2V2ZW4KICAgIC8vICsgZWlnaHQKICAgIC8vICsgbmluZQogICAgLy8gKyB0ZW4KICAgIGZyYW1lX2RpZyAtNgogICAgKwogICAgLy8gYWJpX3JvdXRpbmcvY29udHJhY3QucHk6MTg3LTE5NwogICAgLy8gb25lCiAgICAvLyArIHR3bwogICAgLy8gKyB0aHJlZQogICAgLy8gKyBmb3VyCiAgICAvLyArIGZpdmUKICAgIC8vICsgc2l4CiAgICAvLyArIHNldmVuCiAgICAvLyArIGVpZ2h0CiAgICAvLyArIG5pbmUKICAgIC8vICsgdGVuCiAgICAvLyArIGVsZXZlbgogICAgZnJhbWVfZGlnIC01CiAgICArCiAgICAvLyBhYmlfcm91dGluZy9jb250cmFjdC5weToxODctMTk4CiAgICAvLyBvbmUKICAgIC8vICsgdHdvCiAgICAvLyArIHRocmVlCiAgICAvLyArIGZvdXIKICAgIC8vICsgZml2ZQogICAgLy8gKyBzaXgKICAgIC8vICsgc2V2ZW4KICAgIC8vICsgZWlnaHQKICAgIC8vICsgbmluZQogICAgLy8gKyB0ZW4KICAgIC8vICsgZWxldmVuCiAgICAvLyArIHR3ZWx2ZQogICAgZnJhbWVfZGlnIC00CiAgICArCiAgICAvLyBhYmlfcm91dGluZy9jb250cmFjdC5weToxODctMTk5CiAgICAvLyBvbmUKICAgIC8vICsgdHdvCiAgICAvLyArIHRocmVlCiAgICAvLyArIGZvdXIKICAgIC8vICsgZml2ZQogICAgLy8gKyBzaXgKICAgIC8vICsgc2V2ZW4KICAgIC8vICsgZWlnaHQKICAgIC8vICsgbmluZQogICAgLy8gKyB0ZW4KICAgIC8vICsgZWxldmVuCiAgICAvLyArIHR3ZWx2ZQogICAgLy8gKyB0aGlydGVlbgogICAgZnJhbWVfZGlnIC0zCiAgICArCiAgICAvLyBhYmlfcm91dGluZy9jb250cmFjdC5weToxODctMjAwCiAgICAvLyBvbmUKICAgIC8vICsgdHdvCiAgICAvLyArIHRocmVlCiAgICAvLyArIGZvdXIKICAgIC8vICsgZml2ZQogICAgLy8gKyBzaXgKICAgIC8vICsgc2V2ZW4KICAgIC8vICsgZWlnaHQKICAgIC8vICsgbmluZQogICAgLy8gKyB0ZW4KICAgIC8vICsgZWxldmVuCiAgICAvLyArIHR3ZWx2ZQogICAgLy8gKyB0aGlydGVlbgogICAgLy8gKyBmb3VydGVlbgogICAgZnJhbWVfZGlnIC0yCiAgICArCiAgICAvLyBhYmlfcm91dGluZy9jb250cmFjdC5weToxODYtMjAxCiAgICAvLyBhc3NlcnQgKAogICAgLy8gICAgIG9uZQogICAgLy8gICAgICsgdHdvCiAgICAvLyAgICAgKyB0aHJlZQogICAgLy8gICAgICsgZm91cgogICAgLy8gICAgICsgZml2ZQogICAgLy8gICAgICsgc2l4CiAgICAvLyAgICAgKyBzZXZlbgogICAgLy8gICAgICsgZWlnaHQKICAgIC8vICAgICArIG5pbmUKICAgIC8vICAgICArIHRlbgogICAgLy8gICAgICsgZWxldmVuCiAgICAvLyAgICAgKyB0d2VsdmUKICAgIC8vICAgICArIHRoaXJ0ZWVuCiAgICAvLyAgICAgKyBmb3VydGVlbgogICAgLy8gKQogICAgYXNzZXJ0CiAgICAvLyBhYmlfcm91dGluZy9jb250cmFjdC5weToyMDIKICAgIC8vIHJldHVybiBmaWZ0ZWVuCiAgICBmcmFtZV9kaWcgLTEKICAgIHJldHN1YgoKCi8vIHRlc3RfY2FzZXMuYWJpX3JvdXRpbmcuY29udHJhY3QuUmVmZXJlbmNlLm1ldGhvZF93aXRoX21vcmVfdGhhbl8xNV9hcmdzKGE6IGJ5dGVzLCBiOiBieXRlcywgYzogYnl0ZXMsI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GgubmF0aXZlCiAgICAvLyArIGkubmF0aXZlCiAgICAvLyArIGoubmF0aXZlCiAgICAvLyArIGsubmF0aXZlCiAgICAvLyArIGwubmF0aXZlCiAgICAvLyArIG0ubmF0aXZlCiAgICAvLyArIG4ubmF0aXZlCiAgICAvLyArIG8ubmF0aXZlCiAgICAvLyArIHAKICAgIC8vICsgcS5uYXRpdmUKICAgIC8vICsgci5uYXRpdmUKICAgICsKICAgIC8vIGFiaV9yb3V0aW5nL2NvbnRyYWN0LnB5OjI2NgogICAgLy8gKyB1Lm5hdGl2ZQogICAgZnJhbWVfZGlnIC0yCiAgICBidG9pCiAgICAvLyBhYmlfcm91dGluZy9jb250cmFjdC5weToyNDgtMjY2CiAgICAvLyBhLm5hdGl2ZQogICAgLy8gKyBiLm5hdGl2ZQogICAgLy8gKyBjLm5hdGl2ZQogICAgLy8gKyBkCiAgICAvLyArIGUubmF0aXZlCiAgICAvLyArIGYubmF0aXZlCiAgICAvLyArIGcubmF0aXZlCiAgICAvLyArIGgubmF0aXZlCiAgICAvLyArIGkubmF0aXZlCiAgICAvLyArIGoubmF0aXZlCiAgICAvLyArIGsubmF0aXZlCiAgICAvLyArIGwubmF0aXZlCiAgICAvLyArIG0ubmF0aXZlCiAgICAvLyArIG4ubmF0aXZlCiAgICAvLyArIG8ubmF0aXZlCiAgICAvLyArIHAKICAgIC8vICsgcS5uYXRpdmUKICAgIC8vICsgci5uYXRpdmUKICAgIC8vICsgdS5uYXRpdmUKICAgICsKICAgIC8vIGFiaV9yb3V0aW5nL2NvbnRyYWN0LnB5OjI2NwogICAgLy8gKyB2Lm5hdGl2ZQogICAgZnJhbWVfZGlnIC0xCiAgICBidG9pCiAgICAvLyBhYmlfcm91dGluZy9jb250cmFjdC5weToyNDgtMjY3CiAgICAvLyBhLm5hdGl2ZQogICAgLy8gKyBiLm5hdGl2ZQogICAgLy8gKyBjLm5hdGl2ZQogICAgLy8gKyBkCiAgICAvLyArIGUubmF0aXZlCiAgICAvLyArIGYubmF0aXZlCiAgICAvLyArIGcubmF0aXZlCiAgICAvLyArIGgubmF0aXZlCiAgICAvLyArIGkubmF0aXZlCiAgICAvLyArIGoubmF0aXZlCiAgICAvLyArIGsubmF0aXZlCiAgICAvLyArIGwubmF0aXZlCiAgICAvLyArIG0ubmF0aXZlCiAgICAvLyArIG4ubmF0aXZlCiAgICAvLyArIG8ubmF0aXZlCiAgICAvLyArIHAKICAgIC8vICsgcS5uYXRpdmUKICAgIC8vICsgci5uYXRpdmUKICAgIC8vICsgdS5uYXRpdmUKICAgIC8vICsgdi5uYXRpdmUKICAgICsKICAgIC8vIGFiaV9yb3V0aW5nL2NvbnRyYWN0LnB5OjI0Ny0yNjgKICAgIC8vIHJldHVybiBhcmM0LlVJbnQ2NCgKICAgIC8vICAgICBhLm5hdGl2ZQogICAgLy8gICAgICsgYi5uYXRpdmUKICAgIC8vICAgICArIGMubmF0aXZlCiAgICAvLyAgICAgKyBkCiAgICAvLyAgICAgKyBlLm5hdGl2ZQogICAgLy8gICAgICsgZi5uYXRpdmUKICAgIC8vICAgICArIGcubmF0aXZlCiAgICAvLyAgICAgKyBoLm5hdGl2ZQogICAgLy8gICAgICsgaS5uYXRpdmUKICAgIC8vICAgICArIGoubmF0aXZlCiAgICAvLyAgICAgKyBrLm5hdGl2ZQogICAgLy8gICAgICsgbC5uYXRpdmUKICAgIC8vICAgICArIG0ubmF0aXZlCiAgICAvLyAgICAgKyBuLm5hdGl2ZQogICAgLy8gICAgICsgby5uYXRpdmUKICAgIC8vICAgICArIHAKICAgIC8vICAgICArIHEubmF0aXZlCiAgICAvLyAgICAgKyByLm5hdGl2ZQogICAgLy8gICAgICsgdS5uYXRpdmUKICAgIC8vICAgICArIHYubmF0aXZlCiAgICAvLyApCiAgICBpdG9iCiAgICByZXRzdWIKCgovLyB0ZXN0X2Nhc2VzLmFiaV9yb3V0aW5nLmNvbnRyYWN0LlJlZmVyZW5jZS5oZWxsb193aXRoX2FsZ29weV9zdHJpbmcobmFtZTogYnl0ZXMpIC0+IGJ5dGVzOgpoZWxsb193aXRoX2FsZ29weV9zdHJpbmc6CiAgICAvLyBhYmlfcm91dGluZy9jb250cmFjdC5weToyNzAtMjcxCiAgICAvLyBAYXJjNC5hYmltZXRob2QKICAgIC8vIGRlZiBoZWxsb193aXRoX2FsZ29weV9zdHJpbmcoc2VsZiwgbmFtZTogU3RyaW5nKSAtPiBTdHJpbmc6CiAgICBwcm90byAxIDEKICAgIC8vIGFiaV9yb3V0aW5nL2NvbnRyYWN0LnB5OjI3MgogICAgLy8gcmV0dXJuICJIZWxsbyAiICsgbmFtZSArICIhIgogICAgcHVzaGJ5dGVzICJIZWxsbyAiCiAgICBmcmFtZV9kaWcgLTEKICAgIGNvbmNhdAogICAgcHVzaGJ5dGVzICIhIgogICAgY29uY2F0CiAgICByZXRzdWIKCgovLyB0ZXN0X2Nhc2VzLmFiaV9yb3V0aW5nLmNvbnRyYWN0LlJlZmVyZW5jZS5iYXJlX2FiaV9jb25maWcoKSAtPiB2b2lkOgpiYXJlX2FiaV9jb25maWc6CiAgICAvLyBhYmlfcm91dGluZy9jb250cmFjdC5weTo2Ni03NgogICAgLy8gQGFyYzQuYmFyZW1ldGhvZCgKICAgIC8vICAgICBhbGxvd19hY3Rpb25zPVsKICAgIC8vICAgICAgICAgIk5vT3AiLAogICAgLy8gICAgICAgICAiT3B0SW4iLAogICAgLy8gICAgICAgICAiQ2xvc2VPdXQiLAogICAgLy8gICAgICAgICAiVXBkYXRlQXBwbGljYXRpb24iLAogICAgLy8gICAgICAgICAiRGVsZXRlQXBwbGljYXRpb24iLAogICAgLy8gICAgIF0sCiAgICAvLyAgICAgY3JlYXRlPSJyZXF1aXJlIiwKICAgIC8vICkKICAgIC8vIGRlZiBiYXJlX2FiaV9jb25maWcoc2VsZikgLT4gTm9uZToKICAgIHByb3RvIDAgMAogICAgLy8gYWJpX3JvdXRpbmcvY29udHJhY3QucHk6NzcKICAgIC8vIGxvZygiSGVsbG8gV29ybGQiKQogICA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2J5dGVzAwcICWeAB2NyZWF0b3IxAGeAA2FwcCVngAQYk5LFFUSJ", + "clear": "CoEBQw==" + }, + "compilerInfo": { + "compiler": "puya", + "compilerVersion": { + "major": 99, + "minor": 99, + "patch": 99 + } + } +} \ No newline at end of file diff --git a/test_cases/abi_routing/puya.log b/test_cases/abi_routing/puya.log index 65ab0ac701..3015ec1b2d 100644 --- a/test_cases/abi_routing/puya.log +++ b/test_cases/abi_routing/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['abi_routing'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['abi_routing'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing abi_routing/out/module.awst debug: Sealing block@0: // L12 @@ -3048,6 +3048,7 @@ debug: Replaced __init___block@0.ops[13]: 'v-load new_state_value%0#0' with 'l-l debug: Found 1 edge set/s for test_cases.abi_routing.contract.Reference.approval_program debug: Found 3 edge set/s for test_cases.abi_routing.contract.Reference.__puya_arc4_router__ info: Writing abi_routing/out/MinimumARC4.arc32.json +info: Writing abi_routing/out/MinimumARC4.arc56.json info: Writing abi_routing/out/MinimumARC4.approval.teal info: Writing abi_routing/out/MinimumARC4.clear.teal info: Writing abi_routing/out/MinimumARC4.approval.bin @@ -3055,6 +3056,7 @@ info: Writing abi_routing/out/MinimumARC4.clear.bin info: Writing abi_routing/out/MinimumARC4.approval.puya.map info: Writing abi_routing/out/MinimumARC4.clear.puya.map info: Writing abi_routing/out/CustomApproval.arc32.json +info: Writing abi_routing/out/CustomApproval.arc56.json info: Writing abi_routing/out/CustomApproval.approval.teal info: Writing abi_routing/out/CustomApproval.clear.teal info: Writing abi_routing/out/CustomApproval.approval.bin @@ -3062,6 +3064,7 @@ info: Writing abi_routing/out/CustomApproval.clear.bin info: Writing abi_routing/out/CustomApproval.approval.puya.map info: Writing abi_routing/out/CustomApproval.clear.puya.map info: Writing abi_routing/out/Reference.arc32.json +info: Writing abi_routing/out/Reference.arc56.json info: Writing abi_routing/out/Reference.approval.teal info: Writing abi_routing/out/Reference.clear.teal info: Writing abi_routing/out/Reference.approval.bin diff --git a/test_cases/application/puya.log b/test_cases/application/puya.log index d3db55845d..9d4be78da2 100644 --- a/test_cases/application/puya.log +++ b/test_cases/application/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['application'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['application'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing application/out/module.awst debug: Sealing block@0: // L12 diff --git a/test_cases/arc4_dynamic_arrays/out/DynamicArrayContract.arc56.json b/test_cases/arc4_dynamic_arrays/out/DynamicArrayContract.arc56.json new file mode 100644 index 0000000000..1aeef2382b --- /dev/null +++ b/test_cases/arc4_dynamic_arrays/out/DynamicArrayContract.arc56.json @@ -0,0 +1,210 @@ +{ + "arcs": [ + 22, + 28 + ], + "name": "DynamicArrayContract", + "structs": {}, + "methods": [ + { + "name": "test_static_elements", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "test_dynamic_elements", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "test_mixed_single_dynamic_elements", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "test_mixed_multiple_dynamic_elements", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "test_nested_struct_replacement", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "test_nested_tuple_modification", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "events": [], + "templateVariables": {}, + "networks": {}, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 215 + ], + "errorMessage": "Index access is out of bounds" + }, + { + "pc": [ + 91, + 103, + 115, + 127, + 139, + 151 + ], + "errorMessage": "OnCompletion is NoOp" + }, + { + "pc": [ + 168 + ], + "errorMessage": "is creating" + }, + { + "pc": [ + 94, + 106, + 118, + 130, + 142, + 154 + ], + "errorMessage": "is not creating" + }, + { + "pc": [ + 1189 + ], + "errorMessage": "struct1 does not match struct2" + }, + { + "pc": [ + 1521 + ], + "errorMessage": "tup1 does not match tup2" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLmFyYzRfZHluYW1pY19hcnJheXMuY29udHJhY3QuRHluYW1pY0FycmF5Q29udHJhY3QuYXBwcm92YWxfcHJvZ3JhbToKICAgIGludGNibG9jayAwIDEgMiA0CiAgICBieXRlY2Jsb2NrIDB4MDAwNCAweDAwMDIgMHgwMDFjIDB4IDB4MDAxMiAweDAwMWEKICAgIGNhbGxzdWIgX19wdXlhX2FyYzRfcm91dGVyX18KICAgIHJldHVybgoKCi8vIHRlc3RfY2FzZXMuYXJjNF9keW5hbWljX2FycmF5cy5jb250cmFjdC5EeW5hbWljQXJyYXlDb250cmFjdC5fX3B1eWFfYXJjNF9yb3V0ZXJfXygpIC0+IHVpbnQ2NDoKX19wdXlhX2FyYzRfcm91dGVyX186CiAgICAvLyBhcmM0X2R5bmFtaWNfYXJyYXlzL2NvbnRyYWN0LnB5OjM4CiAgICAvLyBjbGFzcyBEeW5hbWljQXJyYXlDb250cmFjdChBUkM0Q29udHJhY3QpOgogICAgcHJvdG8gMCAxCiAgICB0eG4gTnVtQXBwQXJncwogICAgYnogX19wdXlhX2FyYzRfcm91dGVyX19fYmFyZV9yb3V0aW5nQDEwCiAgICBwdXNoYnl0ZXNzIDB4NTU3MTU4MjcgMHg3MTNkZDZkYiAweDM3MTU4YWFjIDB4ODU3MGJlM2IgMHg1MWFhOGM0OSAweDI4M2ExODZmIC8vIG1ldGhvZCAidGVzdF9zdGF0aWNfZWxlbWVudHMoKXZvaWQiLCBtZXRob2QgInRlc3RfZHluYW1pY19lbGVtZW50cygpdm9pZCIsIG1ldGhvZCAidGVzdF9ta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GxhY2VfZHluYW1pY19lbGVtZW50CiAgICAvLyBhcmM0X2R5bmFtaWNfYXJyYXlzL2NvbnRyYWN0LnB5OjYzCiAgICAvLyBsb2coYXJyYXkpCiAgICBkdXAKICAgIGxvZwogICAgLy8gYXJjNF9keW5hbWljX2FycmF5cy9jb250cmFjdC5weTo2NAogICAgLy8gbG9nKGFycmF5WzBdKQogICAgZHVwCiAgICBleHRyYWN0IDIgMAogICAgZHVwCiAgICBpbnRjXzAgLy8gMAogICAgZXh0cmFjdF91aW50MTYKICAgIGRpZyAyCiAgICBpbnRjXzAgLy8gMAogICAgZXh0cmFjdF91aW50MTYKICAgIGR1cAogICAgaW50Y18xIC8vIDEKICAgIC0gLy8gb24gZXJyb3I6IEluZGV4IGFjY2VzcyBpcyBvdXQgb2YgYm91bmRzCiAgICBkaWcgMwogICAgbGVuCiAgICBkaWcgNAogICAgaW50Y18yIC8vIDIKICAgIGV4dHJhY3RfdWludDE2CiAgICBkdXAyCiAgICB1bmNvdmVyIDQKICAgIHNlbGVjdAogICAgZGlnIDUKICAgIHVuY292ZXIgNQogICAgdW5jb3ZlciAyCiAgICBzdWJzdHJpbmczCiAgICBsb2cKICAgIC8vIGFyYzRfZHluYW1pY19hcnJheXMvY29udHJhY3QucHk6NjUKICAgIC8vIGxvZyhhcnJheVsxXSkKICAgIGRpZyAyCiAgICBpbnRjXzIgLy8gMgogICAgLSAvLyBvbiBlcnJvcjogSW5kZXggYWNjZXNzIGlzIG91dCBvZiBib3VuZHMKICAgIGRpZyA0CiAgICBpbnRjXzMgLy8gNAogICAgZXh0cmFjdF91aW50MTYKICAgIGRpZyAzCiAgICBkaWcgMQogICAgdW5jb3ZlciAzCiAgICBzZWxlY3QKICAgIGRpZyA1CiAgICB1bmNvdmVyIDMKICAgIHVuY292ZXIgMgogICAgc3Vic3RyaW5nMwogICAgbG9nCiAgICAvLyBhcmM0X2R5bmFtaWNfYXJyYXlzL2NvbnRyYWN0LnB5OjY2CiAgICAvLyBsb2coYX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250cmFjdC5weTo3OAogICAgLy8gc3RydWN0MiA9IE1peGVkU2luZ2xlU3RydWN0KGdldF91aW50MigpLCBnZXRfc3RyaW5nMigpLCBnZXRfdWludDEoKSkKICAgIGNhbGxzdWIgZ2V0X3VpbnQyCiAgICBjYWxsc3ViIGdldF9zdHJpbmcyCiAgICBjYWxsc3ViIGdldF91aW50MQogICAgdW5jb3ZlciAyCiAgICBieXRlYyA0IC8vIDB4MDAxMgogICAgY29uY2F0CiAgICBzd2FwCiAgICBjb25jYXQKICAgIHN3YXAKICAgIGNvbmNhdAogICAgLy8gYXJjNF9keW5hbWljX2FycmF5cy9jb250cmFjdC5weTo4MAogICAgLy8gYXJyYXkuYXBwZW5kKHN0cnVjdDIuY29weSgpKQogICAgYnl0ZWNfMSAvLyAweDAwMDIKICAgIGRpZyAxCiAgICBjb25jYXQKICAgIGludGNfMCAvLyAwCiAgICBieXRlY18zIC8vIDB4CiAgICBpbnRjXzEgLy8gMQogICAgZGlnIDMKICAgIGNhbGxzdWIgZHluYW1pY19hcnJheV9jb25jYXRfZHluYW1pY19lbGVtZW50CiAgICAvLyBhcmM0X2R5bmFtaWNfYXJyYXlzL2NvbnRyYWN0LnB5OjgxCiAgICAvLyBhcnJheS5hcHBlbmQoc3RydWN0Mi5jb3B5KCkpCiAgICBkdXAKICAgIGludGNfMCAvLyAwCiAgICBleHRyYWN0X3VpbnQxNgogICAgc3dhcAogICAgZXh0cmFjdCAyIDAKICAgIGludGNfMSAvLyAxCiAgICB1bmNvdmVyIDMKICAgIGNhbGxzdWIgZHluYW1pY19hcnJheV9jb25jYXRfZHluYW1pY19lbGVtZW50CiAgICAvLyBhcmM0X2R5bmFtaWNfYXJyYXlzL2NvbnRyYWN0LnB5OjgyCiAgICAvLyBhcnJheVswXSA9IHN0cnVjdDEuY29weSgpICAjIHJlcGxhY2UKICAgIGRpZyAyCiAgICBpbnRjXzAgLy8gMAogICAgY2FsbHN1YiBkeW5hbWljX2FycmF5X3JlcGxhY2VfZHluYW1pY19lbGVtZW50CiAgICAvLyBhcmM0X2R5bmFtaWNfYXJyYXlzL2NvbnRyYWN0LnB5OjgzCiAgICAvLyBsb2coYXJyYXkpCiAgICBkdXAKICAgIGxvZwogICAgLy8gYXJjNF9keW5hbWljX2FycmF5cy9jb250cmFjdC5weTo4NAogICAgLy8gbG9nKGFycmF5WzBdKQogICAgZHVwCiAgICBleHRyYWN0IDIgMAogICAgZHVwCiAgICBpbnRjXzAgLy8gMAogICAgZXh0cmFjdF91aW50MTYKICAgIGRpZyAyCiAgICBpbnRjXzAgLy8gMAogICAgZXh0cmFjdF91aW50MTYKICAgIGR1cAogICAgaW50Y18xIC8vIDEKICAgIC0gLy8gb24gZXJyb3I6IEluZGV4IGFjY2VzcyBpcyBvdXQgb2YgYm91bmRzCiAgICBkaWcgMwogICAgbGVuCiAgICBkaWcgNAogICAgaW50Y18yIC8vIDIKICAgIGV4dHJhY3RfdWludDE2CiAgICBkdXAyCiAgICB1bmNvdmVyIDQKICAgIHNlbGVjdAogICAgZGlnIDUKICAgIHVuY292ZXIgNQogICAgdW5jb3ZlciAyCiAgICBzdWJzdHJpbmczCiAgICBsb2cKICAgIC8vIGFyYzRfZHluYW1pY19hcnJheXMvY29udHJhY3QucHk6ODUKICAgIC8vIGxvZyhhcnJheVsxXSkKICAgIHVuY292ZXIgMgogICAgaW50Y18yIC8vIDIKICAgIC0gLy8gb24gZXJyb3I6IEluZGV4IGFjY2VzcyBpcyBvdXQgb2YgYm91bmRzCiAgICBkaWcgMwogICAgaW50Y18zIC8vIDQKICAgIGV4dHJhY3RfdWludDE2CiAgICB1bmNvdmVyIDMKICAgIHN3YXAKICAgIHVuY292ZXIgMgogICAgc2VsZWN0CiAgICBzdWJzdHJpbmczCiAgICBsb2cKICAgIC8vIGFyYzRfZHluYW1pY19hcnJheXMvY29udHJhY3QucHk6ODcKICAgIC8vIGFzc2VydCBhcnJheS5wb3AoKSA9PSBzdHJ1Y3QyCiAgICBjYWxsc3ViIGR5bmF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CiAgICBzd2FwCiAgICB1bmNvdmVyIDQKICAgIGNvbmNhdAogICAgc3dhcAogICAgaXRvYgogICAgZXh0cmFjdCA2IDIKICAgIGNvbmNhdAogICAgc3dhcAogICAgY29uY2F0CiAgICB1bmNvdmVyIDIKICAgIGNvbmNhdAogICAgc3dhcAogICAgY29uY2F0CiAgICAvLyBhcmM0X2R5bmFtaWNfYXJyYXlzL2NvbnRyYWN0LnB5Ojk4CiAgICAvLyBhcnJheSA9IGFyYzQuRHluYW1pY0FycmF5KHN0cnVjdDEuY29weSgpLCBzdHJ1Y3QxLmNvcHkoKSkKICAgIGRpZyAxCiAgICBsZW4KICAgIGludGNfMyAvLyA0CiAgICArCiAgICBpdG9iCiAgICBleHRyYWN0IDYgMgogICAgYnl0ZWNfMCAvLyAweDAwMDQKICAgIHN3YXAKICAgIGNvbmNhdAogICAgZGlnIDIKICAgIGNvbmNhdAogICAgZGlnIDIKICAgIGNvbmNhdAogICAgYnl0ZWNfMSAvLyAweDAwMDIKICAgIHN3YXAKICAgIGNvbmNhdAogICAgLy8gYXJjNF9keW5hbWljX2FycmF5cy9jb250cmFjdC5weTo5OQogICAgLy8gYXJyYXlbMV0gPSBzdHJ1Y3QyLmNvcHkoKQogICAgZGlnIDEKICAgIGludGNfMSAvLyAxCiAgICBjYWxsc3ViIGR5bmFtaWNfYXJyYXlfcmVwbGFjZV9keW5hbWljX2VsZW1lbnQKICAgIC8vIGFyYzRfZHluYW1pY19hcnJheXMvY29udHJhY3QucHk6MTAwCiAgICAvLyBsb2coYXJyYXkpCiAgICBkdXAKICAgIGxvZwogICAgLy8gYXJjNF9keW5hbWljX2FycmF5cy9jb250cmFjdC5weToxMDEKICAgIC8vIGxvZyhhcnJheVswXSkKICAgIGR1cAogICAgZXh0cmFjdCAyIDAKICAgIGR1cAogICAgaW50Y18wIC8vIDAKICAgIGV4dHJhY3RfdWludDE2CiAgICBkaWcgMgogICAgaW50Y18wIC8vIDAKICAgIGV4dHJhY3RfdWludDE2Ci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heXMvY29udHJhY3QucHk6MTE1CiAgICAvLyBmaXZlID0gRHluYW1pY1N0cnVjdChnZXRfc3RyaW5nMSgpLCBnZXRfc3RyaW5nMigpKQogICAgY2FsbHN1YiBnZXRfc3RyaW5nMQogICAgY2FsbHN1YiBnZXRfc3RyaW5nMgogICAgZGlnIDEKICAgIGxlbgogICAgaW50Y18zIC8vIDQKICAgICsKICAgIGl0b2IKICAgIGV4dHJhY3QgNiAyCiAgICBieXRlY18wIC8vIDB4MDAwNAogICAgc3dhcAogICAgY29uY2F0CiAgICB1bmNvdmVyIDIKICAgIGNvbmNhdAogICAgc3dhcAogICAgY29uY2F0CiAgICAvLyBhcmM0X2R5bmFtaWNfYXJyYXlzL2NvbnRyYWN0LnB5OjExNi0xMjIKICAgIC8vIHN0cnVjdDEgPSBOZXN0ZWREeW5hbWljU3RydWN0KAogICAgLy8gICAgIG9uZT1vbmUuY29weSgpLAogICAgLy8gICAgIHR3bz10d28uY29weSgpLAogICAgLy8gICAgIHRocmVlPXRocmVlLmNvcHkoKSwKICAgIC8vICAgICBmb3VyPWZvdXIuY29weSgpLAogICAgLy8gICAgIGZpdmU9Zml2ZS5jb3B5KCksCiAgICAvLyApCiAgICB1bmNvdmVyIDQKICAgIGJ5dGVjIDUgLy8gMHgwMDFhCiAgICBjb25jYXQKICAgIGRpZyA0CiAgICBsZW4KICAgIHB1c2hpbnQgMjYgLy8gMjYKICAgIGRpZyAxCiAgICArCiAgICB1bmNvdmVyIDIKICAgIHVuY292ZXIgNQogICAgY29uY2F0CiAgICBkaWcgMQogICAgaXRvYgogICAgZXh0cmFjdCA2IDIKICAgIGRpZyAxCiAgICBzd2FwCiAgICBjb25jYXQKICAgIGRpZyA1CiAgICBsZW4KICAgIHVuY292ZXIgMwogICAgZGlnIDEKICAgICsKICAgIGl0b2IKICAgIGV4dHJhY3QgNiAyCiAgICB1bmNvdmVyIDIKICAgIHN3YXAKICAgIGNvbmNhdAogICAgZGlnIDYKICAgIGNvbmNhdAogICAgZGlnIDUKICAgIGNvbmNhdAogICAgZGlnIDQKICAgIGNvbmNhdAogICAgLy8gYXJjNF9keW5hbWljX2FycmF5cy9jb250cmFjdC5weToxMjUKICAgIC8vIHR3bz1EeW5hbWljU3RydWN0KGdldF9zdHJpbmcyKCksIGdldF9zdHJpbmcxKCkpLCAgIyB0aGlzIGlzIHRoZSBkaWZmZXJlbmNlIHdpdGggc3RydWN0MQogICAgY2FsbHN1YiBnZXRfc3RyaW5nMgogICAgY2FsbHN1YiBnZXRfc3RyaW5nMQogICAgZGlnIDEKICAgIGxlbgogICAgaW50Y18zIC8vIDQKICAgICsKICAgIGl0b2IKICAgIGV4dHJhY3QgNiAyCiAgICBieXRlY18wIC8vIDB4MDAwNAogICAgc3dhcAogICAgY29uY2F0CiAgICB1bmNvdmVyIDIKICAgIGNvbmNhdAogICAgc3dhcAogICAgY29uY2F0CiAgICAvLyBhcmM0X2R5bmFtaWNfYXJyYXlzL2NvbnRyYWN0LnB5OjEyMy0xMjkKICAgIC8vIHN0cnVjdDIgPSBOZXN0ZWREeW5hbWljU3RydWN0KAogICAgLy8gICAgIG9uZT1vbmUuY29weSgpLAogICAgLy8gICAgIHR3bz1EeW5hbWljU3RydWN0KGdldF9zdHJpbmcyKCksIGdldF9zdHJpbmcxKCkpLCAgIyB0aGlzIGlzIHRoZSBkaWZmZXJlbmNlIHdpdGggc3RydWN0MQogICAgLy8gICAgIHRocmVlPXRocmVlLmNvcHkoKSwKICAgIC8vICAgICBmb3VyPWZvdXIuY29weSgpLAogICAgLy8gICAgIGZpdmU9Zml2ZS5jb3B5KCksCiAgICAvLyApCiAgICBkdXAKICAgIGxlbgogICAgcHVzaGludCAyNiAvLyAyNgogICAgKwogICAgZHVwCiAgICBpdG9iCiAgICBleHRyYWN0IDYgMgogICAgdW5jb3ZlciA1CiAgICBzd2FwCiAgICBjb25jYXQKICAgIHN3YXAKICAgIHVuY292ZXIgNAogICAgKwogICAgaXRvYgogICAgZXh0cmFjdCA2IDIKICAgIGNvbmNhdAogICAgc3dhcAogICAgY29uY2F0CiAgICB1bmNvdmVyIDQKICAgIGNvbmNhdAogICAgdW5jb3ZlciAzCiAgICBjb25jYXQKICAgIC8vIGFyYzRfZHluYW1pY19hcnJheXMvY29udHJhY3QucHk6MTMxCiAgICAvLyBzdHJ1Y3QyLnR3byA9IHR3by5jb3B5KCkgICMgbm93IHN0cnVjdDIgc2hvdWxkIG1hdGNoIHN0cnVjdDEKICAgIGR1cAogICAgcHVzaGludCAxMCAvLyAxMAogICAgZXh0cmFjdF91aW50MTYKICAgIGRpZyAxCiAgICBpbnRjXzAgLy8gMAogICAgZGlnIDIKICAgIGV4dHJhY3QzCiAgICBkaWcgMgogICAgcHVzaGludCAyMiAvLyAyMgogICAgZXh0cmFjdF91aW50MTYKICAgIGRpZyAzCiAgICBsZW4KICAgIHVuY292ZXIgNAogICAgZGlnIDIKICAgIHVuY292ZXIgMgogICAgc3Vic3RyaW5nMwogICAgdW5jb3ZlciAyCiAgICB1bmNvdmVyIDYKICAgIGNvbmNhdAogICAgc3dhcAogICAgY29uY2F0CiAgICBzd2FwCiAgICB1bmNvdmVyIDIKICAgIC0KICAgIGRpZyAxCiAgICBwdXNoaW50IDIyIC8vIDIyCiAgICBleHRyYWN0X3VpbnQxNgogICAgZGlnIDQKICAgICsKICAgIGRpZyAxCiAgICAtCiAgICBpdG9iCiAgICBleHRyYWN0IDYgMgogICAgdW5jb3ZlciAyCiAgICBzd2FwCiAgICByZXBsYWNlMiAyMgogICAgZHVwCiAgICBwdXNoaW50IDI0IC8vIDI0CiAgICBleHRyYWN0X3VpbnQxNgogICAgdW5jb3ZlciA0CiAgICArCiAgICB1bmNvdmVyIDIKICAgIC0KICAgIGl0b2IKICAgIGV4dHJhY3QgNiAyCiAgICByZXBsYWNlMiAyNAogICAgLy8gYXJjNF9keW5hbWljX2FycmF5cy9jb250cmFjdC5weToxMzIKICAgIC8vIGFzc2VydCBzdHJ1Y3QxLmJ5dGVzID09IHN0cnVjdD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AogICAgLy8gICAgIGdldF91aW50MigpLAogICAgLy8gICAgIGdldF91MTZfYXJyMSgpICsgKGFyYzQuVUludDE2KDEyMyksKSwgICMgbm9xYTogUlVGMDA1CiAgICAvLyAgICAgZ2V0X3VpbnQxKCksCiAgICAvLyApCiAgICB1bmNvdmVyIDQKICAgIGJ5dGVjXzIgLy8gMHgwMDFjCiAgICBjb25jYXQKICAgIGRpZyA0CiAgICBsZW4KICAgIHB1c2hpbnQgMjggLy8gMjgKICAgICsKICAgIHN3YXAKICAgIHVuY292ZXIgNAogICAgY29uY2F0CiAgICBzd2FwCiAgICBpdG9iCiAgICBleHRyYWN0IDYgMgogICAgY29uY2F0CiAgICBzd2FwCiAgICBjb25jYXQKICAgIHVuY292ZXIgMgogICAgY29uY2F0CiAgICBzd2FwCiAgICBjb25jYXQKICAgIC8vIGFyYzRfZHluYW1pY19hcnJheXMvY29udHJhY3QucHk6MTQ5CiAgICAvLyBmaXZlID0gRHluYW1pY1N0cnVjdChnZXRfc3RyaW5nMSgpLCBnZXRfc3RyaW5nMigpKQogICAgY2FsbHN1YiBnZXRfc3RyaW5nMQogICAgY2FsbHN1YiBnZXRfc3RyaW5nMgogICAgZGlnIDEKICAgIGxlbgogICAgaW50Y18zIC8vIDQKICAgICsKICAgIGl0b2IKICAgIGV4dHJhY3QgNiAyCiAgICBieXRlY18wIC8vIDB4MDAwNAogICAgc3dhcAogICAgY29uY2F0CiAgICB1bmNvdmVyIDIKICAgIGNvbmNhdAogICAgc3dhcAogICAgY29uY2F0CiAgICAvLyBhcmM0X2R5bmFtaWNfYXJyYXlzL2NvbnRyYWN0LnB5OjE1MC0xNTgKICAgIC8vIHR1cDEgPSBhcmM0LlR1cGxlKAogICAgLy8gICAgICgKICAgIC8vICAgICAgICAgb25lLmNvcHkoKSwKICAgIC8vICAgICAgICAgdHdvLmNvcHkoKSwKICAgIC8vICAgICAgICAgdGhyZWUuY29weSgpLAogICAgLy8gICAgICAgICBmb3VyMS5jb3B5KCksCiAgICAvLyAgICAgICAgIGZpdmUuY29weSgpLAogICAgLy8gICAgICkKICAgIC8vICkKICAgIHVuY292ZXIgNQogICAgYnl0ZWMgNSAvLyAweDAwMWEKICAgIGNvbmNhdAogICAgZGlnIDUKICAgIGxlbgogICAgcHVzaGludCAyNiAvLyAyNgogICAgKwogICAgc3dhcAogICAgdW5jb3ZlciA1CiAgICBjb25jYXQKICAgIGRpZyAxCiAgICBpdG9iCiAgICBleHRyYWN0IDYgMgogICAgY29uY2F0CiAgICBkaWcgNAogICAgbGVuCiAgICBkaWcgMgogICAgKwogICAgaXRvYgogICAgZXh0cmFjdCA2IDIKICAgIGRpZyAxCiAgICBzd2FwCiAgICBjb25jYXQKICAgIGRpZyA2CiAgICBjb25jYXQKICAgIHVuY292ZXIgNQogICAgY29uY2F0CiAgICBkaWcgMwogICAgY29uY2F0CiAgICAvLyBhcmM0X2R5bmFtaWNfYXJyYXlzL2NvbnRyYWN0LnB5OjE1OS0xNjcKICAgIC8vIHR1cDIgPSBhcmM0LlR1cGxlKAogICAgLy8gICAgICgKICAgIC8vICAgICAgICAgb25lLmNvcHkoKSwKICAgIC8vICAgICAgICAgdHdvLmNvcHkoKSwKICAgIC8vICAgICAgICAgdGhyZWUuY29weSgpLAogICAgLy8gICAgICAgICBmb3VyMi5jb3B5KCksCiAgICAvLyAgICAgICAgIGZpdmUuY29weSgpLAogICAgLy8gICAgICkKICAgIC8vICkKICAgIGRpZyA0CiAgICBsZW4KICAgIHVuY292ZXIgMwogICAgKwogICAgaXRvYgogICAgZXh0cmFjdCA2IDIKICAgIHVuY292ZXIgMgogICAgc3dhcAogICAgY29uY2F0CiAgICB1bmNvdmVyIDQKICAgIGNvbmNhdAogICAgdW5jb3ZlciAzCiAgICBjb25jYXQKICAgIHVuY292ZXIgMgogICAgY29uY2F0CiAgICAvLyBhcmM0X2R5bmFtaWNfYXJyYXlzL2NvbnRyYWN0LnB5OjE2OQogICAgLy8gdHVwMlszXS5kLnBvcCgpCiAgICBkdXAKICAgIHB1c2hpbnQgMjIgLy8gMjIKICAgIGV4dHJhY3RfdWludDE2CiAgICBkaWcgMQogICAgcHVzaGludCAyNCAvLyAyNAogICAgZXh0cmFjdF91aW50MTYKICAgIGRpZyAyCiAgICBkaWcgMgogICAgZGlnIDIKICAgIHN1YnN0cmluZzMKICAgIGR1cAogICAgcHVzaGludCAxOCAvLyAxOAogICAgZXh0cmFjdF91aW50MTYKICAgIGRpZyAxCiAgICBsZW4KICAgIGRpZyAyCiAgICBkaWcgMgogICAgdW5jb3ZlciAyCiAgICBzdWJzdHJpbmczCiAgICBpbnRjXzIgLy8gMgogICAgY2FsbHN1YiBkeW5hbWljX2FycmF5X3BvcF9maXhlZF9zaXplCiAgICBidXJ5IDEKICAgIHVuY292ZXIgMgogICAgaW50Y18wIC8vIDAKICAgIHVuY292ZXIgMwogICAgZXh0cmFjdDMKICAgIHN3YXAKICAgIGNvbmNhdAogICAgZGlnIDMKICAgIGludGNfMCAvLyAwCiAgICBkaWcgNAogICAgZXh0cmFjdDMKICAgIGRpZyA0CiAgICBsZW4KICAgIHVuY292ZXIgNQogICAgZGlnIDQKICAgIHVuY292ZXIgMgogICAgc3Vic3RyaW5nMwogICAgc3dhcAogICAgZGlnIDIKICAgIGNvbmNhdAogICAgc3dhcAogICAgY29uY2F0CiAgICB1bmNvdmVyIDIKICAgIHVuY292ZXIgMwogICAgLQogICAgdW5jb3ZlciAyCiAgICBsZW4KICAgIGRpZyAyCiAgICBwdXNoaW50IDI0IC8vIDI0CiAgICBleHRyYWN0X3VpbnQxNgogICAgKwogICAgc3dhcAogICAgLQogICAgaXRvYgogICAgZXh0cmFjdCA2IDIKICAgIHJlcGxhY2UyIDI0CiAgICAvLyBhcmM0X2R5bmFtaWNfYXJyYXlzL2NvbnRyYWN0LnB5OjE3MAogICAgLy8gYXNzZXJ0IHR1cDEuYnl0ZXMgPT0gdHVwMi5ieXRlcywgInR1cDEgZG9lcyBub3QgbWF0Y2ggdHVwMiIKICAgID09CiA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SwKBGFkITAkWVwYCXBgSRImKAgKL/iJZIwkWVwYAi/5MXABJFYv/CUqL/1hPAiJPA1KJigECi/8iWSMJSSQLSYv/VwIASU4CSU8CWUlPAkkVTE4CUisiiwaLAQxBABuLAosGSU4CWSQJFlcGAosFTFCMBSQIjAZC/92LABZXBgKLBVCLASQIiwJMiwNSUIsEjACMAYmKBAErSYv+JAuL/CQLIosEiwMMQQAci/2LBElOAlmLAggWVwYCiwFMUIwBJAiMBEL/3Iv9FYwAIowEiwSLAgxBAByL/4sESU4CWYsACBZXBgKLAUxQjAEkCIwEQv/ci/yL/ggWVwYCiwFQi/2LA4sAUlCL/xWL/4sCTwJSUIwAiYoDAYv9UQACSReL/VcCAIv+i/9PA4gAAlCJigQBi/4kC4v8TFmL/iMIJAtJTgKL/ExZi/wVi/+L/gkjCUsBTwNPAk1JSwMJTgOL/RVOA4v8Ik8EUov9UIv8TwJPA1JQi/8kC4sAiwQMQQAgiwNJiwBJTgNZiwIIiwEJFlcGAksCTF2MAyQIjABC/9iLA4wAiQ==", + "clear": "CoEBQw==" + }, + "compilerInfo": { + "compiler": "puya", + "compilerVersion": { + "major": 99, + "minor": 99, + "patch": 99 + } + } +} \ No newline at end of file diff --git a/test_cases/arc4_dynamic_arrays/puya.log b/test_cases/arc4_dynamic_arrays/puya.log index 68b508114e..fa7f5a35e9 100644 --- a/test_cases/arc4_dynamic_arrays/puya.log +++ b/test_cases/arc4_dynamic_arrays/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['arc4_dynamic_arrays'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['arc4_dynamic_arrays'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv arc4_dynamic_arrays/contract.py:169:9 warning: expression result is ignored info: writing arc4_dynamic_arrays/out/module.awst @@ -4818,6 +4818,7 @@ debug: _puya_lib.arc4.dynamic_array_concat_dynamic_element f-stack on first stor debug: _puya_lib.arc4.static_array_replace_dynamic_element f-stack entry: [] debug: _puya_lib.arc4.static_array_replace_dynamic_element f-stack on first store: ['head_offset#0', 'original_item_length#0', 'new_item_length#0', 'new_head_and_tail#0', 'tmp%7#0'] info: Writing arc4_dynamic_arrays/out/DynamicArrayContract.arc32.json +info: Writing arc4_dynamic_arrays/out/DynamicArrayContract.arc56.json info: Writing arc4_dynamic_arrays/out/DynamicArrayContract.approval.teal info: Writing arc4_dynamic_arrays/out/DynamicArrayContract.clear.teal info: Writing arc4_dynamic_arrays/out/DynamicArrayContract.approval.bin diff --git a/test_cases/arc4_numeric_comparisons/puya.log b/test_cases/arc4_numeric_comparisons/puya.log index 77073d908b..b6b991dcbd 100644 --- a/test_cases/arc4_numeric_comparisons/puya.log +++ b/test_cases/arc4_numeric_comparisons/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['arc4_numeric_comparisons'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['arc4_numeric_comparisons'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing arc4_numeric_comparisons/out/module.awst debug: Sealing block@0: // L12 diff --git a/test_cases/arc4_types/out/Arc4DynamicStringArrayContract.arc56.json b/test_cases/arc4_types/out/Arc4DynamicStringArrayContract.arc56.json new file mode 100644 index 0000000000..9e06f605f5 --- /dev/null +++ b/test_cases/arc4_types/out/Arc4DynamicStringArrayContract.arc56.json @@ -0,0 +1,120 @@ +{ + "arcs": [ + 22, + 28 + ], + "name": "Arc4DynamicStringArrayContract", + "structs": {}, + "methods": [ + { + "name": "xyz", + "args": [], + "returns": { + "type": "string[]" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "xyz_raw", + "args": [], + "returns": { + "type": "string[]" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "events": [], + "templateVariables": {}, + "networks": {}, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 68, + 84 + ], + "errorMessage": "OnCompletion is NoOp" + }, + { + "pc": [ + 105 + ], + "errorMessage": "is creating" + }, + { + "pc": [ + 71, + 87 + ], + "errorMessage": "is not creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLmFyYzRfdHlwZXMuZHluYW1pY19zdHJpbmdfYXJyYXkuQXJjN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6X3JhdyhzZWxmKSAtPiBhcmM0LkR5bmFtaWNBcnJheVthcmM0LlN0cmluZ106CiAgICBwcm90byAwIDEKICAgIC8vIGFyYzRfdHlwZXMvZHluYW1pY19zdHJpbmdfYXJyYXkucHk6MTUtMTkKICAgIC8vIHJhdyA9IGFyYzQuRHluYW1pY0FycmF5KAogICAgLy8gICAgIGFyYzQuRHluYW1pY0FycmF5KGFyYzQuQnl0ZSg4OCkpLAogICAgLy8gICAgIGFyYzQuRHluYW1pY0FycmF5KGFyYzQuQnl0ZSg4OSkpLAogICAgLy8gICAgIGFyYzQuRHluYW1pY0FycmF5KGFyYzQuQnl0ZSg5MCkpLAogICAgLy8gKQogICAgYnl0ZWNfMSAvLyAweDAwMDMwMDA2MDAwOTAwMGMwMDAxNTgwMDAxNTkwMDAxNWEKICAgIC8vIGFyYzRfdHlwZXMvZHluYW1pY19zdHJpbmdfYXJyYXkucHk6MjAKICAgIC8vIHJldHVybiBhcmM0LkR5bmFtaWNBcnJheVthcmM0LlN0cmluZ10uZnJvbV9ieXRlcyhyYXcuYnl0ZXMpCiAgICByZXRzdWIK", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLmFyYzRfdHlwZXMuZHluYW1pY19zdHJpbmdfYXJyYXkuQXJjNER5bmFtaWNTdHJpbmdBcnJheUNvbnRyYWN0LmNsZWFyX3N0YXRlX3Byb2dyYW06CiAgICBwdXNoaW50IDEgLy8gMQogICAgcmV0dXJuCg==" + }, + "byteCode": { + "approval": "CiACAQAmAgQVH3x1EQADAAYACQAMAAFYAAFZAAFaiAABQ4oAATEbQQA3ggIEaxDlJwSU3bHCNhoAjgIAAgASI4kxGRREMRhEiAAjKExQsCKJMRkURDEYRIgAGChMULAiiTEZQAAGMRgURCKJI4mKAAEpiYoAASmJ", + "clear": "CoEBQw==" + }, + "compilerInfo": { + "compiler": "puya", + "compilerVersion": { + "major": 99, + "minor": 99, + "patch": 99 + } + } +} \ No newline at end of file diff --git a/test_cases/arc4_types/puya.log b/test_cases/arc4_types/puya.log index 9e6fe670ec..c26e0ec44f 100644 --- a/test_cases/arc4_types/puya.log +++ b/test_cases/arc4_types/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['arc4_types'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['arc4_types'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv arc4_types/mutable_params.py:63:9 warning: expression result is ignored arc4_types/mutable_params.py:79:9 warning: expression result is ignored @@ -19094,6 +19094,7 @@ info: Writing arc4_types/out/Arc4MutableParamsContract.clear.bin info: Writing arc4_types/out/Arc4MutableParamsContract.approval.puya.map info: Writing arc4_types/out/Arc4MutableParamsContract.clear.puya.map info: Writing arc4_types/out/Arc4DynamicStringArrayContract.arc32.json +info: Writing arc4_types/out/Arc4DynamicStringArrayContract.arc56.json info: Writing arc4_types/out/Arc4DynamicStringArrayContract.approval.teal info: Writing arc4_types/out/Arc4DynamicStringArrayContract.clear.teal info: Writing arc4_types/out/Arc4DynamicStringArrayContract.approval.bin diff --git a/test_cases/arc_56/contract.py b/test_cases/arc_56/contract.py new file mode 100644 index 0000000000..5c7d7557cb --- /dev/null +++ b/test_cases/arc_56/contract.py @@ -0,0 +1,120 @@ +from algopy import ( + ARC4Contract, + Box, + BoxMap, + BoxRef, + GlobalState, + LocalState, + String, + TemplateVar, + UInt64, + arc4, + subroutine, +) + + +class SharedStruct(arc4.Struct): + """This struct is shared""" + + foo: arc4.DynamicBytes + bar: arc4.UInt8 + + +class EventOnly(arc4.Struct): + """This struct is only used in an event""" + + x: arc4.UInt64 + y: arc4.UInt64 + + +class TopLevelStruct(arc4.Struct): + a: arc4.UInt64 + b: arc4.String + shared: SharedStruct + + +class StateStruct(arc4.Struct): + a: arc4.UInt64 + b: arc4.String + + +class Contract(ARC4Contract): + + def __init__(self) -> None: + self.g_struct = GlobalState(StateStruct) + self.g_uint64 = GlobalState(UInt64, key=b"gu") + self.g_address = GlobalState(arc4.Address, key=b"ga") + + self.l_struct = LocalState(StateStruct) + self.l_uint64 = LocalState(UInt64, key=b"lu") + self.l_address = LocalState(arc4.Address, key=b"la") + + self.b_struct = Box(StateStruct) + self.b_uint64 = Box(UInt64, key=b"bu") + self.b_address = Box(arc4.Address, key=b"ba") + + self.box_map_struct = BoxMap(StateStruct, SharedStruct) + self.box_map_uint64 = BoxMap(UInt64, SharedStruct, key_prefix=b"bmu") + self.box_map_address = BoxMap(arc4.Address, SharedStruct, key_prefix=b"bma") + + self.box_ref = BoxRef() + self.box_ref2 = BoxRef(key=b"br") + + @arc4.baremethod(create="allow", allow_actions=["NoOp", "OptIn"]) + def bare_create(self) -> None: + pass + + @arc4.abimethod(create="allow", allow_actions=["NoOp", "OptIn"]) + def create(self) -> None: + pass + + @arc4.baremethod(create="require", allow_actions=["DeleteApplication"]) + def transient(self) -> None: + pass + + @arc4.abimethod() + def struct_arg(self, arg: TopLevelStruct, shared: SharedStruct) -> UInt64: + assert arg.shared == shared, "this might error" + return UInt64(42) + + @arc4.abimethod(readonly=True) + def struct_return(self, arg: TopLevelStruct) -> SharedStruct: + assert arg.shared == echo(arg.shared), "this won't error" + return arg.shared + + @arc4.abimethod(name="emits_error", readonly=True) + def errors(self, arg: TopLevelStruct) -> None: + assert arg.a.bytes == arc4.UInt8(0).bytes, "this will error" + + @arc4.abimethod() + def emitter(self) -> None: + arc4.emit(SharedStruct(foo=arc4.DynamicBytes(b"hello1"), bar=arc4.UInt8(42))) + + arc4.emit( + "Anonymous", + String("hello"), + SharedStruct(foo=arc4.DynamicBytes(b"hello2"), bar=arc4.UInt8(42)), + ) + + @arc4.abimethod() + def conditional_emit(self, should_emit: bool) -> None: + if should_emit: + arc4.emit( + "Anonymous2", + EventOnly(arc4.UInt64(42), arc4.UInt64(43)), + SharedStruct(foo=arc4.DynamicBytes(b"hello3"), bar=arc4.UInt8(42)), + ) + + @arc4.abimethod() + def template_value(self) -> tuple[SharedStruct, UInt64, String, arc4.UInt8]: + return ( + TemplateVar[SharedStruct]("STRUCT"), + TemplateVar[UInt64]("AVM_UINT64"), + TemplateVar[String]("AVM_STRING"), + TemplateVar[arc4.UInt8]("ARC4_UINT8"), + ) + + +@subroutine +def echo(s: SharedStruct) -> SharedStruct: + return s diff --git a/test_cases/arc_56/out/Contract.approval.mir b/test_cases/arc_56/out/Contract.approval.mir new file mode 100644 index 0000000000..bf7fb7366c --- /dev/null +++ b/test_cases/arc_56/out/Contract.approval.mir @@ -0,0 +1,403 @@ +// Op Stack (out) +// test_cases.arc_56.contract.Contract.approval_program() -> uint64: +main_block@0: + callsub __puya_arc4_router__ tmp%0#0 + return + + +// test_cases.arc_56.contract.Contract.__puya_arc4_router__() -> uint64: +__puya_arc4_router__: + // arc_56/contract.py:41 + // class Contract(ARC4Contract): + proto 0 1 + +__puya_arc4_router___block@0: + // arc_56/contract.py:41 + // class Contract(ARC4Contract): + txn NumAppArgs tmp%0#0 + bz __puya_arc4_router___bare_routing@11 + // Implicit fall through to __puya_arc4_router___abi_routing@1 + +__puya_arc4_router___abi_routing@1: + // arc_56/contract.py:41 + // class Contract(ARC4Contract): + txna ApplicationArgs 0 tmp%2#0 + method create()void tmp%2#0,Method(create()void) + method struct_arg((uint64,string,(byte[],uint8)),(byte[],uint8))uint64 tmp%2#0,Method(create()void),Method(struct_arg((uint64,string,(byte[],uint8)),(byte[],uint8))uint64) + method struct_return((uint64,string,(byte[],uint8)))(byte[],uint8) tmp%2#0,Method(create()void),Method(struct_arg((uint64,string,(byte[],uint8)),(byte[],uint8))uint64),Method(struct_return((uint64,string,(byte[],uint8)))(byte[],uint8)) + method emits_error((uint64,string,(byte[],uint8)))void tmp%2#0,Method(create()void),Method(struct_arg((uint64,string,(byte[],uint8)),(byte[],uint8))uint64),Method(struct_return((uint64,string,(byte[],uint8)))(byte[],uint8)),Method(emits_error((uint64,string,(byte[],uint8)))void) + method emitter()void tmp%2#0,Method(create()void),Method(struct_arg((uint64,string,(byte[],uint8)),(byte[],uint8))uint64),Method(struct_return((uint64,string,(byte[],uint8)))(byte[],uint8)),Method(emits_error((uint64,string,(byte[],uint8)))void),Method(emitter()void) + method conditional_emit(bool)void tmp%2#0,Method(create()void),Method(struct_arg((uint64,string,(byte[],uint8)),(byte[],uint8))uint64),Method(struct_return((uint64,string,(byte[],uint8)))(byte[],uint8)),Method(emits_error((uint64,string,(byte[],uint8)))void),Method(emitter()void),Method(conditional_emit(bool)void) + method template_value()((byte[],uint8),uint64,string,uint8) tmp%2#0,Method(create()void),Method(struct_arg((uint64,string,(byte[],uint8)),(byte[],uint8))uint64),Method(struct_return((uint64,string,(byte[],uint8)))(byte[],uint8)),Method(emits_error((uint64,string,(byte[],uint8)))void),Method(emitter()void),Method(conditional_emit(bool)void),Method(template_value()((byte[],uint8),uint64,string,uint8)) + l-load tmp%2#0 7 Method(create()void),Method(struct_arg((uint64,string,(byte[],uint8)),(byte[],uint8))uint64),Method(struct_return((uint64,string,(byte[],uint8)))(byte[],uint8)),Method(emits_error((uint64,string,(byte[],uint8)))void),Method(emitter()void),Method(conditional_emit(bool)void),Method(template_value()((byte[],uint8),uint64,string,uint8)),tmp%2#0 + match __puya_arc4_router___create_route@2 __puya_arc4_router___struct_arg_route@3 __puya_arc4_router___struct_return_route@4 __puya_arc4_router___emits_error_route@5 __puya_arc4_router___emitter_route@6 __puya_arc4_router___conditional_emit_route@7 __puya_arc4_router___template_value_route@8 + int 0 0 + retsub 0 + +__puya_arc4_router___create_route@2: + // arc_56/contract.py:67 + // @arc4.abimethod(create="allow", allow_actions=["NoOp", "OptIn"]) + txn OnCompletion tmp%3#0 + int 1 tmp%3#0,1 + l-load tmp%3#0 1 1,tmp%3#0 + shl tmp%4#0 + int 3 tmp%4#0,3 + & tmp%5#0 + assert // OnCompletion is one of NoOp, OptIn + int 1 1 + retsub 1 + +__puya_arc4_router___struct_arg_route@3: + // arc_56/contract.py:75 + // @arc4.abimethod() + txn OnCompletion tmp%6#0 + ! tmp%7#0 + assert // OnCompletion is NoOp + txn ApplicationID tmp%8#0 + assert // is not creating + // arc_56/contract.py:41 + // class Contract(ARC4Contract): + txna ApplicationArgs 1 tmp%10#0 + txna ApplicationArgs 2 tmp%10#0,tmp%11#0 + // arc_56/contract.py:75 + // @arc4.abimethod() + l-load tmp%10#0 1 tmp%11#0,tmp%10#0 + l-load tmp%11#0 1 tmp%10#0,tmp%11#0 + callsub struct_arg to_encode%0#0 + itob val_as_bytes%0#0 + byte 0x151f7c75 val_as_bytes%0#0,0x151f7c75 + l-load val_as_bytes%0#0 1 0x151f7c75,val_as_bytes%0#0 + concat tmp%12#0 + log + int 1 1 + retsub 1 + +__puya_arc4_router___struct_return_route@4: + // arc_56/contract.py:80 + // @arc4.abimethod(readonly=True) + txn OnCompletion tmp%13#0 + ! tmp%14#0 + assert // OnCompletion is NoOp + txn ApplicationID tmp%15#0 + assert // is not creating + // arc_56/contract.py:41 + // class Contract(ARC4Contract): + txna ApplicationArgs 1 tmp%17#0 + // arc_56/contract.py:80 + // @arc4.abimethod(readonly=True) + callsub struct_return tmp%18#0 + byte 0x151f7c75 tmp%18#0,0x151f7c75 + l-load tmp%18#0 1 0x151f7c75,tmp%18#0 + concat tmp%19#0 + log + int 1 1 + retsub 1 + +__puya_arc4_router___emits_error_route@5: + // arc_56/contract.py:85 + // @arc4.abimethod(name="emits_error", readonly=True) + txn OnCompletion tmp%20#0 + ! tmp%21#0 + assert // OnCompletion is NoOp + txn ApplicationID tmp%22#0 + assert // is not creating + // arc_56/contract.py:41 + // class Contract(ARC4Contract): + txna ApplicationArgs 1 tmp%24#0 + // arc_56/contract.py:85 + // @arc4.abimethod(name="emits_error", readonly=True) + callsub errors + int 1 1 + retsub 1 + +__puya_arc4_router___emitter_route@6: + // arc_56/contract.py:89 + // @arc4.abimethod() + txn OnCompletion tmp%25#0 + ! tmp%26#0 + assert // OnCompletion is NoOp + txn ApplicationID tmp%27#0 + assert // is not creating + callsub emitter + int 1 1 + retsub 1 + +__puya_arc4_router___conditional_emit_route@7: + // arc_56/contract.py:99 + // @arc4.abimethod() + txn OnCompletion tmp%29#0 + ! tmp%30#0 + assert // OnCompletion is NoOp + txn ApplicationID tmp%31#0 + assert // is not creating + // arc_56/contract.py:41 + // class Contract(ARC4Contract): + txna ApplicationArgs 1 tmp%33#0 + int 0 tmp%33#0,0 + getbit tmp%34#0 + // arc_56/contract.py:99 + // @arc4.abimethod() + callsub conditional_emit + int 1 1 + retsub 1 + +__puya_arc4_router___template_value_route@8: + // arc_56/contract.py:108 + // @arc4.abimethod() + txn OnCompletion tmp%35#0 + ! tmp%36#0 + assert // OnCompletion is NoOp + txn ApplicationID tmp%37#0 + assert // is not creating + callsub template_value elements_to_encode%0#0,elements_to_encode%1#0,elements_to_encode%2#0,elements_to_encode%3#0 + l-load elements_to_encode%1#0 2 elements_to_encode%0#0,elements_to_encode%2#0,elements_to_encode%3#0,elements_to_encode%1#0 + itob elements_to_encode%0#0,elements_to_encode%2#0,elements_to_encode%3#0,val_as_bytes%1#0 + l-load-copy elements_to_encode%2#0 2 elements_to_encode%0#0,elements_to_encode%2#0,elements_to_encode%3#0,val_as_bytes%1#0,elements_to_encode%2#0 (copy) + len elements_to_encode%0#0,elements_to_encode%2#0,elements_to_encode%3#0,val_as_bytes%1#0,length%0#0 + itob elements_to_encode%0#0,elements_to_encode%2#0,elements_to_encode%3#0,val_as_bytes%1#0,as_bytes%0#0 + extract 6 2 elements_to_encode%0#0,elements_to_encode%2#0,elements_to_encode%3#0,val_as_bytes%1#0,length_uint16%0#0 + l-load elements_to_encode%2#0 3 elements_to_encode%0#0,elements_to_encode%3#0,val_as_bytes%1#0,length_uint16%0#0,elements_to_encode%2#0 + concat elements_to_encode%0#0,elements_to_encode%3#0,val_as_bytes%1#0,encoded_value%0#0 + l-load-copy elements_to_encode%0#0 3 elements_to_encode%0#0,elements_to_encode%3#0,val_as_bytes%1#0,encoded_value%0#0,elements_to_encode%0#0 (copy) + len elements_to_encode%0#0,elements_to_encode%3#0,val_as_bytes%1#0,encoded_value%0#0,data_length%0#0 + int 13 elements_to_encode%0#0,elements_to_encode%3#0,val_as_bytes%1#0,encoded_value%0#0,data_length%0#0,13 + l-load data_length%0#0 1 elements_to_encode%0#0,elements_to_encode%3#0,val_as_bytes%1#0,encoded_value%0#0,13,data_length%0#0 + + elements_to_encode%0#0,elements_to_encode%3#0,val_as_bytes%1#0,encoded_value%0#0,current_tail_offset%1#0 + byte 0x000d elements_to_encode%0#0,elements_to_encode%3#0,val_as_bytes%1#0,encoded_value%0#0,current_tail_offset%1#0,0x000d + l-load val_as_bytes%1#0 3 elements_to_encode%0#0,elements_to_encode%3#0,encoded_value%0#0,current_tail_offset%1#0,0x000d,val_as_bytes%1#0 + concat elements_to_encode%0#0,elements_to_encode%3#0,encoded_value%0#0,current_tail_offset%1#0,encoded_tuple_buffer%2#0 + l-load current_tail_offset%1#0 1 elements_to_encode%0#0,elements_to_encode%3#0,encoded_value%0#0,encoded_tuple_buffer%2#0,current_tail_offset%1#0 + itob elements_to_encode%0#0,elements_to_encode%3#0,encoded_value%0#0,encoded_tuple_buffer%2#0,as_bytes%2#0 + extract 6 2 elements_to_encode%0#0,elements_to_encode%3#0,encoded_value%0#0,encoded_tuple_buffer%2#0,offset_as_uint16%1#0 + l-load encoded_tuple_buffer%2#0 1 elements_to_encode%0#0,elements_to_encode%3#0,encoded_value%0#0,offset_as_uint16%1#0,encoded_tuple_buffer%2#0 + l-load offset_as_uint16%1#0 1 elements_to_encode%0#0,elements_to_encode%3#0,encoded_value%0#0,encoded_tuple_buffer%2#0,offset_as_uint16%1#0 + concat elements_to_encode%0#0,elements_to_encode%3#0,encoded_value%0#0,encoded_tuple_buffer%3#0 + l-load elements_to_encode%3#0 2 elements_to_encode%0#0,encoded_value%0#0,encoded_tuple_buffer%3#0,elements_to_encode%3#0 + concat elements_to_encode%0#0,encoded_value%0#0,encoded_tuple_buffer%4#0 + l-load elements_to_encode%0#0 2 encoded_value%0#0,encoded_tuple_buffer%4#0,elements_to_encode%0#0 + concat encoded_value%0#0,encoded_tuple_buffer%5#0 + l-load encoded_value%0#0 1 encoded_tuple_buffer%5#0,encoded_value%0#0 + concat encoded_tuple_buffer%6#0 + byte 0x151f7c75 encoded_tuple_buffer%6#0,0x151f7c75 + l-load encoded_tuple_buffer%6#0 1 0x151f7c75,encoded_tuple_buffer%6#0 + concat tmp%39#0 + log + int 1 1 + retsub 1 + +__puya_arc4_router___bare_routing@11: + // arc_56/contract.py:41 + // class Contract(ARC4Contract): + txn OnCompletion tmp%40#0 + switch __puya_arc4_router___bare_create@12 __puya_arc4_router___bare_create@12 __puya_arc4_router___after_if_else@16 __puya_arc4_router___after_if_else@16 __puya_arc4_router___after_if_else@16 __puya_arc4_router___transient@13 + int 0 0 + retsub 0 + +__puya_arc4_router___bare_create@12: + // arc_56/contract.py:63-64 + // @arc4.baremethod(create="allow", allow_actions=["NoOp", "OptIn"]) + // def bare_create(self) -> None: + int 1 1 + retsub 1 + +__puya_arc4_router___transient@13: + // arc_56/contract.py:71 + // @arc4.baremethod(create="require", allow_actions=["DeleteApplication"]) + txn ApplicationID tmp%41#0 + ! tmp%42#0 + assert // is creating + // arc_56/contract.py:71-72 + // @arc4.baremethod(create="require", allow_actions=["DeleteApplication"]) + // def transient(self) -> None: + int 1 1 + retsub 1 + +__puya_arc4_router___after_if_else@16: + // arc_56/contract.py:41 + // class Contract(ARC4Contract): + int 0 0 + retsub 0 + + +// test_cases.arc_56.contract.Contract.struct_arg(arg: bytes, shared: bytes) -> uint64: +struct_arg: (𝕡) arg#0,shared#0 | + // arc_56/contract.py:75-76 + // @arc4.abimethod() + // def struct_arg(self, arg: TopLevelStruct, shared: SharedStruct) -> UInt64: + proto 2 1 (𝕡) arg#0,shared#0 | + +struct_arg_block@0: (𝕡) arg#0,shared#0 | + // arc_56/contract.py:77 + // assert arg.shared == shared, "this might error" + p-load arg#0 (𝕡) arg#0,shared#0 | arg#0 (copy) + int 10 (𝕡) arg#0,shared#0 | arg#0 (copy),10 + extract_uint16 (𝕡) arg#0,shared#0 | item_start_offset%0#0 + p-load arg#0 (𝕡) arg#0,shared#0 | item_start_offset%0#0,arg#0 (copy) + len (𝕡) arg#0,shared#0 | item_start_offset%0#0,item_end_offset%0#0 + p-load arg#0 (𝕡) arg#0,shared#0 | item_start_offset%0#0,item_end_offset%0#0,arg#0 (copy) + l-load item_start_offset%0#0 2 (𝕡) arg#0,shared#0 | item_end_offset%0#0,arg#0 (copy),item_start_offset%0#0 + l-load item_end_offset%0#0 2 (𝕡) arg#0,shared#0 | arg#0 (copy),item_start_offset%0#0,item_end_offset%0#0 + substring3 (𝕡) arg#0,shared#0 | tmp%0#0 + p-load shared#0 (𝕡) arg#0,shared#0 | tmp%0#0,shared#0 (copy) + == (𝕡) arg#0,shared#0 | tmp%1#0 + assert // this might error (𝕡) arg#0,shared#0 | + // arc_56/contract.py:78 + // return UInt64(42) + int 42 (𝕡) arg#0,shared#0 | 42 + retsub 42 + + +// test_cases.arc_56.contract.Contract.struct_return(arg: bytes) -> bytes: +struct_return: (𝕡) arg#0 | + // arc_56/contract.py:80-81 + // @arc4.abimethod(readonly=True) + // def struct_return(self, arg: TopLevelStruct) -> SharedStruct: + proto 1 1 (𝕡) arg#0 | + +struct_return_block@0: (𝕡) arg#0 | + // arc_56/contract.py:82 + // assert arg.shared == echo(arg.shared), "this won't error" + p-load arg#0 (𝕡) arg#0 | arg#0 (copy) + int 10 (𝕡) arg#0 | arg#0 (copy),10 + extract_uint16 (𝕡) arg#0 | item_start_offset%0#0 + p-load arg#0 (𝕡) arg#0 | item_start_offset%0#0,arg#0 (copy) + len (𝕡) arg#0 | item_start_offset%0#0,item_end_offset%0#0 + p-load arg#0 (𝕡) arg#0 | item_start_offset%0#0,item_end_offset%0#0,arg#0 (copy) + l-load item_start_offset%0#0 2 (𝕡) arg#0 | item_end_offset%0#0,arg#0 (copy),item_start_offset%0#0 + l-load item_end_offset%0#0 2 (𝕡) arg#0 | arg#0 (copy),item_start_offset%0#0,item_end_offset%0#0 + substring3 (𝕡) arg#0 | tmp%0#0 + l-load-copy tmp%0#0 0 (𝕡) arg#0 | tmp%0#0,tmp%0#0 (copy) + callsub echo (𝕡) arg#0 | tmp%0#0,echo%0#0,echo%1#0 + pop 1 (𝕡) arg#0 | tmp%0#0,echo%0#0 + l-store echo%0#0 0 (𝕡) arg#0 | tmp%0#0,echo%0#0 + l-load-copy tmp%0#0 1 (𝕡) arg#0 | tmp%0#0,echo%0#0,tmp%0#0 (copy) + l-load echo%0#0 1 (𝕡) arg#0 | tmp%0#0,tmp%0#0 (copy),echo%0#0 + == (𝕡) arg#0 | tmp%0#0,tmp%2#0 + assert // this won't error (𝕡) arg#0 | tmp%0#0 + // arc_56/contract.py:83 + // return arg.shared + l-load tmp%0#0 0 (𝕡) arg#0 | tmp%0#0 + retsub tmp%0#0 + + +// test_cases.arc_56.contract.echo(s: bytes) -> bytes, bytes: +echo: (𝕡) s#0 | + // arc_56/contract.py:118-119 + // @subroutine + // def echo(s: SharedStruct) -> SharedStruct: + proto 1 2 (𝕡) s#0 | + +echo_block@0: (𝕡) s#0 | + // arc_56/contract.py:120 + // return s + p-load s#0 (𝕡) s#0 | s#0 (copy) + p-load s#0 (𝕡) s#0 | s#0 (copy),s#0 (copy) + retsub s#0 (copy),s#0 (copy) + + +// test_cases.arc_56.contract.Contract.errors(arg: bytes) -> void: +errors: (𝕡) arg#0 | + // arc_56/contract.py:85-86 + // @arc4.abimethod(name="emits_error", readonly=True) + // def errors(self, arg: TopLevelStruct) -> None: + proto 1 0 (𝕡) arg#0 | + +errors_block@0: (𝕡) arg#0 | + // arc_56/contract.py:87 + // assert arg.a.bytes == arc4.UInt8(0).bytes, "this will error" + p-load arg#0 (𝕡) arg#0 | arg#0 (copy) + extract 0 8 // on error: Index access is out of bounds (𝕡) arg#0 | tmp%0#0 + byte 0x00 (𝕡) arg#0 | tmp%0#0,0x00 + == (𝕡) arg#0 | tmp%1#0 + assert // this will error (𝕡) arg#0 | + retsub + + +// test_cases.arc_56.contract.Contract.emitter() -> void: +emitter: + // arc_56/contract.py:89-90 + // @arc4.abimethod() + // def emitter(self) -> None: + proto 0 0 + +emitter_block@0: + // arc_56/contract.py:91 + // arc4.emit(SharedStruct(foo=arc4.DynamicBytes(b"hello1"), bar=arc4.UInt8(42))) + method SharedStruct(byte[],uint8) Method(SharedStruct(byte[],uint8)) + byte 0x00032a000668656c6c6f31 Method(SharedStruct(byte[],uint8)),0x00032a000668656c6c6f31 + concat event%0#0 + log + // arc_56/contract.py:93-97 + // arc4.emit( + // "Anonymous", + // String("hello"), + // SharedStruct(foo=arc4.DynamicBytes(b"hello2"), bar=arc4.UInt8(42)), + // ) + method Anonymous(string,(byte[],uint8)) Method(Anonymous(string,(byte[],uint8))) + byte 0x0004000b000568656c6c6f00032a000668656c6c6f32 Method(Anonymous(string,(byte[],uint8))),0x0004000b000568656c6c6f00032a000668656c6c6f32 + concat event%1#0 + log + retsub + + +// test_cases.arc_56.contract.Contract.conditional_emit(should_emit: uint64) -> void: +conditional_emit: (𝕡) should_emit#0 | + // arc_56/contract.py:99-100 + // @arc4.abimethod() + // def conditional_emit(self, should_emit: bool) -> None: + proto 1 0 (𝕡) should_emit#0 | + +conditional_emit_block@0: (𝕡) should_emit#0 | + // arc_56/contract.py:101 + // if should_emit: + p-load should_emit#0 (𝕡) should_emit#0 | should_emit#0 (copy) + bz conditional_emit_after_if_else@2 (𝕡) should_emit#0 | + // Implicit fall through to conditional_emit_if_body@1 (𝕡) should_emit#0 | + +conditional_emit_if_body@1: (𝕡) should_emit#0 | + // arc_56/contract.py:102-106 + // arc4.emit( + // "Anonymous2", + // EventOnly(arc4.UInt64(42), arc4.UInt64(43)), + // SharedStruct(foo=arc4.DynamicBytes(b"hello3"), bar=arc4.UInt8(42)), + // ) + method Anonymous2((uint64,uint64),(byte[],uint8)) (𝕡) should_emit#0 | Method(Anonymous2((uint64,uint64),(byte[],uint8))) + byte 0x000000000000002a000000000000002b001200032a000668656c6c6f33 (𝕡) should_emit#0 | Method(Anonymous2((uint64,uint64),(byte[],uint8))),0x000000000000002a000000000000002b001200032a000668656c6c6f33 + concat (𝕡) should_emit#0 | event%0#0 + log (𝕡) should_emit#0 | + // Implicit fall through to conditional_emit_after_if_else@2 (𝕡) should_emit#0 | + +conditional_emit_after_if_else@2: (𝕡) should_emit#0 | + retsub + + +// test_cases.arc_56.contract.Contract.template_value() -> bytes, uint64, bytes, bytes: +template_value: + // arc_56/contract.py:108-109 + // @arc4.abimethod() + // def template_value(self) -> tuple[SharedStruct, UInt64, String, arc4.UInt8]: + proto 0 4 + +template_value_block@0: + // arc_56/contract.py:111 + // TemplateVar[SharedStruct]("STRUCT"), + byte TMPL_STRUCT TMPL_STRUCT + // arc_56/contract.py:112 + // TemplateVar[UInt64]("AVM_UINT64"), + int TMPL_AVM_UINT64 TMPL_STRUCT,TMPL_AVM_UINT64 + // arc_56/contract.py:113 + // TemplateVar[String]("AVM_STRING"), + byte TMPL_AVM_STRING TMPL_STRUCT,TMPL_AVM_UINT64,TMPL_AVM_STRING + // arc_56/contract.py:114 + // TemplateVar[arc4.UInt8]("ARC4_UINT8"), + byte TMPL_ARC4_UINT8 TMPL_STRUCT,TMPL_AVM_UINT64,TMPL_AVM_STRING,TMPL_ARC4_UINT8 + // arc_56/contract.py:110-115 + // return ( + // TemplateVar[SharedStruct]("STRUCT"), + // TemplateVar[UInt64]("AVM_UINT64"), + // TemplateVar[String]("AVM_STRING"), + // TemplateVar[arc4.UInt8]("ARC4_UINT8"), + // ) + retsub TMPL_STRUCT,TMPL_AVM_UINT64,TMPL_AVM_STRING,TMPL_ARC4_UINT8 + + diff --git a/test_cases/arc_56/out/Contract.approval.teal b/test_cases/arc_56/out/Contract.approval.teal new file mode 100644 index 0000000000..ea3b256792 --- /dev/null +++ b/test_cases/arc_56/out/Contract.approval.teal @@ -0,0 +1,355 @@ +#pragma version 10 + +test_cases.arc_56.contract.Contract.approval_program: + intcblock 1 0 10 TMPL_AVM_UINT64 + bytecblock 0x151f7c75 TMPL_STRUCT TMPL_AVM_STRING TMPL_ARC4_UINT8 + callsub __puya_arc4_router__ + return + + +// test_cases.arc_56.contract.Contract.__puya_arc4_router__() -> uint64: +__puya_arc4_router__: + // arc_56/contract.py:41 + // class Contract(ARC4Contract): + proto 0 1 + txn NumAppArgs + bz __puya_arc4_router___bare_routing@11 + pushbytess 0x4c5c61ba 0x97e8e4a7 0x76c4de11 0xc1ca7709 0x6de762c2 0x59fc5282 0x9d9eecb0 // method "create()void", method "struct_arg((uint64,string,(byte[],uint8)),(byte[],uint8))uint64", method "struct_return((uint64,string,(byte[],uint8)))(byte[],uint8)", method "emits_error((uint64,string,(byte[],uint8)))void", method "emitter()void", method "conditional_emit(bool)void", method "template_value()((byte[],uint8),uint64,string,uint8)" + txna ApplicationArgs 0 + match __puya_arc4_router___create_route@2 __puya_arc4_router___struct_arg_route@3 __puya_arc4_router___struct_return_route@4 __puya_arc4_router___emits_error_route@5 __puya_arc4_router___emitter_route@6 __puya_arc4_router___conditional_emit_route@7 __puya_arc4_router___template_value_route@8 + intc_1 // 0 + retsub + +__puya_arc4_router___create_route@2: + // arc_56/contract.py:67 + // @arc4.abimethod(create="allow", allow_actions=["NoOp", "OptIn"]) + intc_0 // 1 + txn OnCompletion + shl + pushint 3 // 3 + & + assert // OnCompletion is one of NoOp, OptIn + intc_0 // 1 + retsub + +__puya_arc4_router___struct_arg_route@3: + // arc_56/contract.py:75 + // @arc4.abimethod() + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + // arc_56/contract.py:41 + // class Contract(ARC4Contract): + txna ApplicationArgs 1 + txna ApplicationArgs 2 + // arc_56/contract.py:75 + // @arc4.abimethod() + callsub struct_arg + itob + bytec_0 // 0x151f7c75 + swap + concat + log + intc_0 // 1 + retsub + +__puya_arc4_router___struct_return_route@4: + // arc_56/contract.py:80 + // @arc4.abimethod(readonly=True) + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + // arc_56/contract.py:41 + // class Contract(ARC4Contract): + txna ApplicationArgs 1 + // arc_56/contract.py:80 + // @arc4.abimethod(readonly=True) + callsub struct_return + bytec_0 // 0x151f7c75 + swap + concat + log + intc_0 // 1 + retsub + +__puya_arc4_router___emits_error_route@5: + // arc_56/contract.py:85 + // @arc4.abimethod(name="emits_error", readonly=True) + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + // arc_56/contract.py:41 + // class Contract(ARC4Contract): + txna ApplicationArgs 1 + // arc_56/contract.py:85 + // @arc4.abimethod(name="emits_error", readonly=True) + callsub errors + intc_0 // 1 + retsub + +__puya_arc4_router___emitter_route@6: + // arc_56/contract.py:89 + // @arc4.abimethod() + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + callsub emitter + intc_0 // 1 + retsub + +__puya_arc4_router___conditional_emit_route@7: + // arc_56/contract.py:99 + // @arc4.abimethod() + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + // arc_56/contract.py:41 + // class Contract(ARC4Contract): + txna ApplicationArgs 1 + intc_1 // 0 + getbit + // arc_56/contract.py:99 + // @arc4.abimethod() + callsub conditional_emit + intc_0 // 1 + retsub + +__puya_arc4_router___template_value_route@8: + // arc_56/contract.py:108 + // @arc4.abimethod() + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + callsub template_value + uncover 2 + itob + dig 2 + len + itob + extract 6 2 + uncover 3 + concat + dig 3 + len + pushint 13 // 13 + + + pushbytes 0x000d + uncover 3 + concat + swap + itob + extract 6 2 + concat + uncover 2 + concat + uncover 2 + concat + swap + concat + bytec_0 // 0x151f7c75 + swap + concat + log + intc_0 // 1 + retsub + +__puya_arc4_router___bare_routing@11: + // arc_56/contract.py:41 + // class Contract(ARC4Contract): + txn OnCompletion + switch __puya_arc4_router___bare_create@12 __puya_arc4_router___bare_create@12 __puya_arc4_router___after_if_else@16 __puya_arc4_router___after_if_else@16 __puya_arc4_router___after_if_else@16 __puya_arc4_router___transient@13 + intc_1 // 0 + retsub + +__puya_arc4_router___bare_create@12: + // arc_56/contract.py:63-64 + // @arc4.baremethod(create="allow", allow_actions=["NoOp", "OptIn"]) + // def bare_create(self) -> None: + intc_0 // 1 + retsub + +__puya_arc4_router___transient@13: + // arc_56/contract.py:71 + // @arc4.baremethod(create="require", allow_actions=["DeleteApplication"]) + txn ApplicationID + ! + assert // is creating + // arc_56/contract.py:71-72 + // @arc4.baremethod(create="require", allow_actions=["DeleteApplication"]) + // def transient(self) -> None: + intc_0 // 1 + retsub + +__puya_arc4_router___after_if_else@16: + // arc_56/contract.py:41 + // class Contract(ARC4Contract): + intc_1 // 0 + retsub + + +// test_cases.arc_56.contract.Contract.struct_arg(arg: bytes, shared: bytes) -> uint64: +struct_arg: + // arc_56/contract.py:75-76 + // @arc4.abimethod() + // def struct_arg(self, arg: TopLevelStruct, shared: SharedStruct) -> UInt64: + proto 2 1 + // arc_56/contract.py:77 + // assert arg.shared == shared, "this might error" + frame_dig -2 + intc_2 // 10 + extract_uint16 + frame_dig -2 + len + frame_dig -2 + cover 2 + substring3 + frame_dig -1 + == + assert // this might error + // arc_56/contract.py:78 + // return UInt64(42) + pushint 42 // 42 + retsub + + +// test_cases.arc_56.contract.Contract.struct_return(arg: bytes) -> bytes: +struct_return: + // arc_56/contract.py:80-81 + // @arc4.abimethod(readonly=True) + // def struct_return(self, arg: TopLevelStruct) -> SharedStruct: + proto 1 1 + // arc_56/contract.py:82 + // assert arg.shared == echo(arg.shared), "this won't error" + frame_dig -1 + intc_2 // 10 + extract_uint16 + frame_dig -1 + len + frame_dig -1 + cover 2 + substring3 + dup + callsub echo + pop + dig 1 + == + assert // this won't error + // arc_56/contract.py:83 + // return arg.shared + retsub + + +// test_cases.arc_56.contract.echo(s: bytes) -> bytes, bytes: +echo: + // arc_56/contract.py:118-119 + // @subroutine + // def echo(s: SharedStruct) -> SharedStruct: + proto 1 2 + // arc_56/contract.py:120 + // return s + frame_dig -1 + dup + retsub + + +// test_cases.arc_56.contract.Contract.errors(arg: bytes) -> void: +errors: + // arc_56/contract.py:85-86 + // @arc4.abimethod(name="emits_error", readonly=True) + // def errors(self, arg: TopLevelStruct) -> None: + proto 1 0 + // arc_56/contract.py:87 + // assert arg.a.bytes == arc4.UInt8(0).bytes, "this will error" + frame_dig -1 + extract 0 8 // on error: Index access is out of bounds + pushbytes 0x00 + == + assert // this will error + retsub + + +// test_cases.arc_56.contract.Contract.emitter() -> void: +emitter: + // arc_56/contract.py:89-90 + // @arc4.abimethod() + // def emitter(self) -> None: + proto 0 0 + // arc_56/contract.py:91 + // arc4.emit(SharedStruct(foo=arc4.DynamicBytes(b"hello1"), bar=arc4.UInt8(42))) + pushbytess 0xd93f374e 0x00032a000668656c6c6f31 // method "SharedStruct(byte[],uint8)", 0x00032a000668656c6c6f31 + concat + log + // arc_56/contract.py:93-97 + // arc4.emit( + // "Anonymous", + // String("hello"), + // SharedStruct(foo=arc4.DynamicBytes(b"hello2"), bar=arc4.UInt8(42)), + // ) + pushbytess 0x1e72af4e 0x0004000b000568656c6c6f00032a000668656c6c6f32 // method "Anonymous(string,(byte[],uint8))", 0x0004000b000568656c6c6f00032a000668656c6c6f32 + concat + log + retsub + + +// test_cases.arc_56.contract.Contract.conditional_emit(should_emit: uint64) -> void: +conditional_emit: + // arc_56/contract.py:99-100 + // @arc4.abimethod() + // def conditional_emit(self, should_emit: bool) -> None: + proto 1 0 + // arc_56/contract.py:101 + // if should_emit: + frame_dig -1 + bz conditional_emit_after_if_else@2 + // arc_56/contract.py:102-106 + // arc4.emit( + // "Anonymous2", + // EventOnly(arc4.UInt64(42), arc4.UInt64(43)), + // SharedStruct(foo=arc4.DynamicBytes(b"hello3"), bar=arc4.UInt8(42)), + // ) + pushbytess 0x11c547ba 0x000000000000002a000000000000002b001200032a000668656c6c6f33 // method "Anonymous2((uint64,uint64),(byte[],uint8))", 0x000000000000002a000000000000002b001200032a000668656c6c6f33 + concat + log + +conditional_emit_after_if_else@2: + retsub + + +// test_cases.arc_56.contract.Contract.template_value() -> bytes, uint64, bytes, bytes: +template_value: + // arc_56/contract.py:108-109 + // @arc4.abimethod() + // def template_value(self) -> tuple[SharedStruct, UInt64, String, arc4.UInt8]: + proto 0 4 + // arc_56/contract.py:111 + // TemplateVar[SharedStruct]("STRUCT"), + bytec_1 // TMPL_STRUCT + // arc_56/contract.py:112 + // TemplateVar[UInt64]("AVM_UINT64"), + intc_3 // TMPL_AVM_UINT64 + // arc_56/contract.py:113 + // TemplateVar[String]("AVM_STRING"), + bytec_2 // TMPL_AVM_STRING + // arc_56/contract.py:114 + // TemplateVar[arc4.UInt8]("ARC4_UINT8"), + bytec_3 // TMPL_ARC4_UINT8 + // arc_56/contract.py:110-115 + // return ( + // TemplateVar[SharedStruct]("STRUCT"), + // TemplateVar[UInt64]("AVM_UINT64"), + // TemplateVar[String]("AVM_STRING"), + // TemplateVar[arc4.UInt8]("ARC4_UINT8"), + // ) + retsub diff --git a/test_cases/arc_56/out/Contract.arc32.json b/test_cases/arc_56/out/Contract.arc32.json new file mode 100644 index 0000000000..04bb139c0f --- /dev/null +++ b/test_cases/arc_56/out/Contract.arc32.json @@ -0,0 +1,266 @@ +{ + "hints": { + "create()void": { + "call_config": { + "no_op": "ALL", + "opt_in": "ALL" + } + }, + "struct_arg((uint64,string,(byte[],uint8)),(byte[],uint8))uint64": { + "call_config": { + "no_op": "CALL" + }, + "structs": { + "arg": { + "name": "TopLevelStruct", + "elements": [ + [ + "a", + "uint64" + ], + [ + "b", + "string" + ], + [ + "shared", + "(byte[],uint8)" + ] + ] + }, + "shared": { + "name": "SharedStruct", + "elements": [ + [ + "foo", + "byte[]" + ], + [ + "bar", + "uint8" + ] + ] + } + } + }, + "struct_return((uint64,string,(byte[],uint8)))(byte[],uint8)": { + "read_only": true, + "call_config": { + "no_op": "CALL" + }, + "structs": { + "arg": { + "name": "TopLevelStruct", + "elements": [ + [ + "a", + "uint64" + ], + [ + "b", + "string" + ], + [ + "shared", + "(byte[],uint8)" + ] + ] + }, + "output": { + "name": "SharedStruct", + "elements": [ + [ + "foo", + "byte[]" + ], + [ + "bar", + "uint8" + ] + ] + } + } + }, + "emits_error((uint64,string,(byte[],uint8)))void": { + "read_only": true, + "call_config": { + "no_op": "CALL" + }, + "structs": { + "arg": { + "name": "TopLevelStruct", + "elements": [ + [ + "a", + "uint64" + ], + [ + "b", + "string" + ], + [ + "shared", + "(byte[],uint8)" + ] + ] + } + } + }, + "emitter()void": { + "call_config": { + "no_op": "CALL" + } + }, + "conditional_emit(bool)void": { + "call_config": { + "no_op": "CALL" + } + }, + "template_value()((byte[],uint8),uint64,string,uint8)": { + "call_config": { + "no_op": "CALL" + } + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLmFyY181Ni5jb250cmFjdC5Db250cmFjdC5hcHByb3ZhbF9wcm9ncmFtOgogICAgaW50Y2Jsb2NrIDEgMCAxMCBUTVBMX0FWTV9VSU5UNjQKICAgIGJ5dGVjYmxvY2sgMHgxNTFmN2M3NSBUTVBMX1NUUlVDVCBUTVBMX0FWTV9TVFJJTkcgVE1QTF9BUkM0X1VJTlQ4CiAgICBjYWxsc3ViIF9fcHV5YV9hcmM0X3JvdXRlcl9fCiAgICByZXR1cm4KCgovLyB0ZXN0X2Nhc2VzLmFyY181Ni5jb250cmFjdC5Db250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slices": 2, + "num_uints": 1 + }, + "local": { + "num_byte_slices": 2, + "num_uints": 1 + } + }, + "schema": { + "global": { + "declared": { + "g_address": { + "type": "bytes", + "key": "ga" + }, + "g_struct": { + "type": "bytes", + "key": "g_struct" + }, + "g_uint64": { + "type": "uint64", + "key": "gu" + } + }, + "reserved": {} + }, + "local": { + "declared": { + "l_address": { + "type": "bytes", + "key": "la" + }, + "l_struct": { + "type": "bytes", + "key": "l_struct" + }, + "l_uint64": { + "type": "uint64", + "key": "lu" + } + }, + "reserved": {} + } + }, + "contract": { + "name": "Contract", + "methods": [ + { + "name": "create", + "args": [], + "readonly": false, + "returns": { + "type": "void" + } + }, + { + "name": "struct_arg", + "args": [ + { + "type": "(uint64,string,(byte[],uint8))", + "name": "arg" + }, + { + "type": "(byte[],uint8)", + "name": "shared" + } + ], + "readonly": false, + "returns": { + "type": "uint64" + } + }, + { + "name": "struct_return", + "args": [ + { + "type": "(uint64,string,(byte[],uint8))", + "name": "arg" + } + ], + "readonly": true, + "returns": { + "type": "(byte[],uint8)" + } + }, + { + "name": "emits_error", + "args": [ + { + "type": "(uint64,string,(byte[],uint8))", + "name": "arg" + } + ], + "readonly": true, + "returns": { + "type": "void" + } + }, + { + "name": "emitter", + "args": [], + "readonly": false, + "returns": { + "type": "void" + } + }, + { + "name": "conditional_emit", + "args": [ + { + "type": "bool", + "name": "should_emit" + } + ], + "readonly": false, + "returns": { + "type": "void" + } + }, + { + "name": "template_value", + "args": [], + "readonly": false, + "returns": { + "type": "((byte[],uint8),uint64,string,uint8)" + } + } + ], + "networks": {} + }, + "bare_call_config": { + "no_op": "ALL", + "opt_in": "ALL", + "delete_application": "CREATE" + } +} \ No newline at end of file diff --git a/test_cases/arc_56/out/Contract.arc56.json b/test_cases/arc_56/out/Contract.arc56.json new file mode 100644 index 0000000000..402a505a6b --- /dev/null +++ b/test_cases/arc_56/out/Contract.arc56.json @@ -0,0 +1,495 @@ +{ + "arcs": [ + 22, + 28 + ], + "name": "Contract", + "structs": { + "EventOnly": [ + { + "name": "x", + "type": "uint64" + }, + { + "name": "y", + "type": "uint64" + } + ], + "SharedStruct": [ + { + "name": "foo", + "type": "byte[]" + }, + { + "name": "bar", + "type": "uint8" + } + ], + "StateStruct": [ + { + "name": "a", + "type": "uint64" + }, + { + "name": "b", + "type": "string" + } + ], + "TopLevelStruct": [ + { + "name": "a", + "type": "uint64" + }, + { + "name": "b", + "type": "string" + }, + { + "name": "shared", + "type": "SharedStruct" + } + ] + }, + "methods": [ + { + "name": "create", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [ + "NoOp", + "OptIn" + ], + "call": [ + "NoOp", + "OptIn" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "struct_arg", + "args": [ + { + "type": "(uint64,string,(byte[],uint8))", + "struct": "TopLevelStruct", + "name": "arg" + }, + { + "type": "(byte[],uint8)", + "struct": "SharedStruct", + "name": "shared" + } + ], + "returns": { + "type": "uint64" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "struct_return", + "args": [ + { + "type": "(uint64,string,(byte[],uint8))", + "struct": "TopLevelStruct", + "name": "arg" + } + ], + "returns": { + "type": "(byte[],uint8)", + "struct": "SharedStruct" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": true, + "events": [], + "recommendations": {} + }, + { + "name": "errors", + "args": [ + { + "type": "(uint64,string,(byte[],uint8))", + "struct": "TopLevelStruct", + "name": "arg" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": true, + "events": [], + "recommendations": {} + }, + { + "name": "emitter", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [ + { + "name": "SharedStruct", + "args": [ + { + "type": "byte[]", + "name": "foo" + }, + { + "type": "uint8", + "name": "bar" + } + ], + "desc": "This struct is shared" + }, + { + "name": "Anonymous", + "args": [ + { + "type": "string", + "name": "field1" + }, + { + "type": "(byte[],uint8)", + "name": "field2", + "struct": "SharedStruct" + } + ] + } + ], + "recommendations": {} + }, + { + "name": "conditional_emit", + "args": [ + { + "type": "bool", + "name": "should_emit" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [ + { + "name": "Anonymous2", + "args": [ + { + "type": "(uint64,uint64)", + "name": "field1", + "struct": "EventOnly" + }, + { + "type": "(byte[],uint8)", + "name": "field2", + "struct": "SharedStruct" + } + ] + } + ], + "recommendations": {} + }, + { + "name": "template_value", + "args": [], + "returns": { + "type": "((byte[],uint8),uint64,string,uint8)" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "state": { + "schema": { + "global": { + "ints": 1, + "bytes": 2 + }, + "local": { + "ints": 1, + "bytes": 2 + } + }, + "keys": { + "global": { + "g_struct": { + "keyType": "AVMString", + "valueType": "StateStruct", + "key": "Z19zdHJ1Y3Q=" + }, + "g_uint64": { + "keyType": "AVMBytes", + "valueType": "AVMUint64", + "key": "Z3U=" + }, + "g_address": { + "keyType": "AVMBytes", + "valueType": "address", + "key": "Z2E=" + } + }, + "local": { + "l_struct": { + "keyType": "AVMString", + "valueType": "StateStruct", + "key": "bF9zdHJ1Y3Q=" + }, + "l_uint64": { + "keyType": "AVMBytes", + "valueType": "AVMUint64", + "key": "bHU=" + }, + "l_address": { + "keyType": "AVMBytes", + "valueType": "address", + "key": "bGE=" + } + }, + "box": { + "b_struct": { + "keyType": "AVMString", + "valueType": "StateStruct", + "key": "Yl9zdHJ1Y3Q=" + }, + "b_uint64": { + "keyType": "AVMBytes", + "valueType": "AVMUint64", + "key": "YnU=" + }, + "b_address": { + "keyType": "AVMBytes", + "valueType": "address", + "key": "YmE=" + }, + "box_ref": { + "keyType": "AVMString", + "valueType": "AVMBytes", + "key": "Ym94X3JlZg==" + }, + "box_ref2": { + "keyType": "AVMBytes", + "valueType": "AVMBytes", + "key": "YnI=" + } + } + }, + "maps": { + "global": {}, + "local": {}, + "box": { + "box_map_struct": { + "keyType": "StateStruct", + "valueType": "SharedStruct", + "prefix": "Ym94X21hcF9zdHJ1Y3Q=" + }, + "box_map_uint64": { + "keyType": "AVMUint64", + "valueType": "SharedStruct", + "prefix": "Ym11" + }, + "box_map_address": { + "keyType": "address", + "valueType": "SharedStruct", + "prefix": "Ym1h" + } + } + } + }, + "bareActions": { + "create": [ + "DeleteApplication", + "NoOp", + "OptIn" + ], + "call": [ + "NoOp", + "OptIn" + ] + }, + "events": [ + { + "name": "SharedStruct", + "args": [ + { + "type": "byte[]", + "name": "foo" + }, + { + "type": "uint8", + "name": "bar" + } + ], + "desc": "This struct is shared" + }, + { + "name": "Anonymous", + "args": [ + { + "type": "string", + "name": "field1" + }, + { + "type": "(byte[],uint8)", + "name": "field2", + "struct": "SharedStruct" + } + ] + }, + { + "name": "Anonymous2", + "args": [ + { + "type": "(uint64,uint64)", + "name": "field1", + "struct": "EventOnly" + }, + { + "type": "(byte[],uint8)", + "name": "field2", + "struct": "SharedStruct" + } + ] + } + ], + "templateVariables": { + "STRUCT": { + "type": "SharedStruct", + "value": "AAL/AAJIaQ==" + }, + "AVM_UINT64": { + "type": "AVMUint64", + "value": "AAAAAAAAAHs=" + }, + "AVM_STRING": { + "type": "AVMString", + "value": "SGVsbG8=" + }, + "ARC4_UINT8": { + "type": "uint8", + "value": "/w==" + } + }, + "networks": {}, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 113, + 136, + 155, + 170, + 182, + 199 + ], + "errorMessage": "OnCompletion is NoOp" + }, + { + "pc": [ + 107 + ], + "errorMessage": "OnCompletion is one of NoOp, OptIn" + }, + { + "pc": [ + 275 + ], + "errorMessage": "is creating" + }, + { + "pc": [ + 116, + 139, + 158, + 173, + 185, + 202 + ], + "errorMessage": "is not creating" + }, + { + "pc": [ + 298 + ], + "errorMessage": "this might error" + }, + { + "pc": [ + 346 + ], + "errorMessage": "this will error" + }, + { + "pc": [ + 325 + ], + "errorMessage": "this won't error" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLmFyY181Ni5jb250cmFjdC5Db250cmFjdC5hcHByb3ZhbF9wcm9ncmFtOgogICAgaW50Y2Jsb2NrIDEgMCAxMCBUTVBMX0FWTV9VSU5UNjQKICAgIGJ5dGVjYmxvY2sgMHgxNTFmN2M3NSBUTVBMX1NUUlVDVCBUTVBMX0FWTV9TVFJJTkcgVE1QTF9BUkM0X1VJTlQ4CiAgICBjYWxsc3ViIF9fcHV5YV9hcmM0X3JvdXRlcl9fCiAgICByZXR1cm4KCgovLyB0ZXN0X2Nhc2VzLmFyY181Ni5jb250cmFjdC5Db250cmFjdC5fX3B1eWFfYXJjNF9yb3V0ZXJfXygpIC0+IHVpbnQ2NDoKX19wdXlhX2FyYzRfcm91dGVyX186CiAgICAvLyBhcmNfNTYvY29udHJhY3QucHk6NDEKICAgIC8vIGNsYXNzIENvbnRyYWN0KEFSQzRDb250cmFjdCk6CiAgICBwcm90byAwIDEKICAgIHR4biBOdW1BcHBBcmdzCiAgICBieiBfX3B1eWFfYXJjNF9yb3V0ZXJfX19iYXJlX3JvdXRpbmdAMTEKICAgIHB1c2hieXRlc3MgMHg0YzVjNjFiYSAweDk3ZThlNGE3IDB4NzZjNGRlMTEgMHhjMWNhNzcwOSAweDZkZTc2MmMyIDB4NTlmYzUyODIgMHg5ZDllZWNiMCAvLyBtZXRob2QgImNyZWF0ZSgpdm9pZCIsIG1ldGhvZCAic3RydWN0X2FyZygodWludDY0LHN0cmluZywoYnl0ZVtdLHVpbnQ4KSksKGJ5dGVbXSx1aW50OCkpdWludDY0IiwgbWV0aG9kICJzdHJ1Y3RfcmV0dXJuKCh1aW50NjQsc3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AgIC8vIGFyY181Ni9jb250cmFjdC5weToxMTAtMTE1CiAgICAvLyByZXR1cm4gKAogICAgLy8gICAgIFRlbXBsYXRlVmFyW1NoYXJlZFN0cnVjdF0oIlNUUlVDVCIpLAogICAgLy8gICAgIFRlbXBsYXRlVmFyW1VJbnQ2NF0oIkFWTV9VSU5UNjQiKSwKICAgIC8vICAgICBUZW1wbGF0ZVZhcltTdHJpbmddKCJBVk1fU1RSSU5HIiksCiAgICAvLyAgICAgVGVtcGxhdGVWYXJbYXJjNC5VSW50OF0oIkFSQzRfVUlOVDgiKSwKICAgIC8vICkKICAgIHJldHN1Ygo=", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLmFyY181Ni5jb250cmFjdC5Db250cmFjdC5jbGVhcl9zdGF0ZV9wcm9ncmFtOgogICAgcHVzaGludCAxIC8vIDEKICAgIHJldHVybgo=" + }, + "byteCode": { + "approval": "CiAEAQAKeyYEBBUffHUHAAL/AAJIaQVIZWxsbwH/iAABQ4oAATEbQQDSggcETFxhugSX6OSnBHbE3hEEwcp3CQRt52LCBFn8UoIEnZ7ssDYaAI4HAAIADAAjADYARQBRAGIjiSIxGZCBAxpEIokxGRREMRhENhoBNhoCiACaFihMULAiiTEZFEQxGEQ2GgGIAJwoTFCwIokxGRREMRhENhoBiACpIokxGRREMRhEiACrIokxGRREMRhENhoBI1OIANMiiTEZFEQxGESIAPdPAhZLAhUWVwYCTwNQSwMVgQ0IgAIADU8DUEwWVwYCUE8CUE8CUExQKExQsCKJMRmNBgACAAIACgAKAAoABCOJIokxGBREIokjiYoCAYv+JFmL/hWL/k4CUov/EkSBKomKAQGL/yRZi/8Vi/9OAlJJiAAGSEsBEkSJigECi/9JiYoBAIv/VwAIgAEAEkSJigAAggIE2T83TgsAAyoABmhlbGxvMVCwggIEHnKvThYABAALAAVoZWxsbwADKgAGaGVsbG8yULCJigEAi/9BACeCAgQRxUe6HQAAAAAAAAAqAAAAAAAAACsAEgADKgAGaGVsbG8zULCJigAEKSUqK4k=", + "clear": "CoEBQw==" + }, + "compilerInfo": { + "compiler": "puya", + "compilerVersion": { + "major": 99, + "minor": 99, + "patch": 99 + } + } +} \ No newline at end of file diff --git a/test_cases/arc_56/out/Contract.clear.mir b/test_cases/arc_56/out/Contract.clear.mir new file mode 100644 index 0000000000..b72a9c6b48 --- /dev/null +++ b/test_cases/arc_56/out/Contract.clear.mir @@ -0,0 +1,7 @@ +// Op Stack (out) +// test_cases.arc_56.contract.Contract.clear_state_program() -> uint64: +main_block@0: + int 1 1 + return + + diff --git a/test_cases/arc_56/out/Contract.clear.teal b/test_cases/arc_56/out/Contract.clear.teal new file mode 100644 index 0000000000..883b1f693b --- /dev/null +++ b/test_cases/arc_56/out/Contract.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +test_cases.arc_56.contract.Contract.clear_state_program: + pushint 1 // 1 + return diff --git a/test_cases/arc_56/out/Contract.destructured.ir b/test_cases/arc_56/out/Contract.destructured.ir new file mode 100644 index 0000000000..4a3f07ca27 --- /dev/null +++ b/test_cases/arc_56/out/Contract.destructured.ir @@ -0,0 +1,164 @@ +contract test_cases.arc_56.contract.Contract: + program approval: + subroutine algopy.arc4.ARC4Contract.approval_program() -> bool: + block@0: // L1 + let tmp%0#0: bool = test_cases.arc_56.contract.Contract.__puya_arc4_router__() + return tmp%0#0 + + subroutine test_cases.arc_56.contract.Contract.__puya_arc4_router__() -> bool: + block@0: // L41 + let tmp%0#0: uint64 = (txn NumAppArgs) + goto tmp%0#0 ? block@1 : block@11 + block@1: // abi_routing_L41 + let tmp%2#0: bytes = (txna ApplicationArgs 0) + switch tmp%2#0 {method "create()void" => block@2, method "struct_arg((uint64,string,(byte[],uint8)),(byte[],uint8))uint64" => block@3, method "struct_return((uint64,string,(byte[],uint8)))(byte[],uint8)" => block@4, method "emits_error((uint64,string,(byte[],uint8)))void" => block@5, method "emitter()void" => block@6, method "conditional_emit(bool)void" => block@7, method "template_value()((byte[],uint8),uint64,string,uint8)" => block@8, * => return 0u} + block@2: // create_route_L67 + let tmp%3#0: uint64 = (txn OnCompletion) + let tmp%4#0: uint64 = (shl 1u tmp%3#0) + let tmp%5#0: uint64 = (& tmp%4#0 3u) + (assert tmp%5#0) // OnCompletion is one of NoOp, OptIn + return 1u + block@3: // struct_arg_route_L75 + let tmp%6#0: uint64 = (txn OnCompletion) + let tmp%7#0: bool = (! tmp%6#0) + (assert tmp%7#0) // OnCompletion is NoOp + let tmp%8#0: uint64 = (txn ApplicationID) + (assert tmp%8#0) // is not creating + let tmp%10#0: bytes = (txna ApplicationArgs 1) + let tmp%11#0: bytes = (txna ApplicationArgs 2) + let to_encode%0#0: uint64 = test_cases.arc_56.contract.Contract.struct_arg(tmp%10#0, tmp%11#0) + let val_as_bytes%0#0: bytes = (itob to_encode%0#0) + let tmp%12#0: bytes = (concat 0x151f7c75 val_as_bytes%0#0) + (log tmp%12#0) + return 1u + block@4: // struct_return_route_L80 + let tmp%13#0: uint64 = (txn OnCompletion) + let tmp%14#0: bool = (! tmp%13#0) + (assert tmp%14#0) // OnCompletion is NoOp + let tmp%15#0: uint64 = (txn ApplicationID) + (assert tmp%15#0) // is not creating + let tmp%17#0: bytes = (txna ApplicationArgs 1) + let tmp%18#0: bytes = test_cases.arc_56.contract.Contract.struct_return(tmp%17#0) + let tmp%19#0: bytes = (concat 0x151f7c75 tmp%18#0) + (log tmp%19#0) + return 1u + block@5: // emits_error_route_L85 + let tmp%20#0: uint64 = (txn OnCompletion) + let tmp%21#0: bool = (! tmp%20#0) + (assert tmp%21#0) // OnCompletion is NoOp + let tmp%22#0: uint64 = (txn ApplicationID) + (assert tmp%22#0) // is not creating + let tmp%24#0: bytes = (txna ApplicationArgs 1) + test_cases.arc_56.contract.Contract.errors(tmp%24#0) + return 1u + block@6: // emitter_route_L89 + let tmp%25#0: uint64 = (txn OnCompletion) + let tmp%26#0: bool = (! tmp%25#0) + (assert tmp%26#0) // OnCompletion is NoOp + let tmp%27#0: uint64 = (txn ApplicationID) + (assert tmp%27#0) // is not creating + test_cases.arc_56.contract.Contract.emitter() + return 1u + block@7: // conditional_emit_route_L99 + let tmp%29#0: uint64 = (txn OnCompletion) + let tmp%30#0: bool = (! tmp%29#0) + (assert tmp%30#0) // OnCompletion is NoOp + let tmp%31#0: uint64 = (txn ApplicationID) + (assert tmp%31#0) // is not creating + let tmp%33#0: bytes = (txna ApplicationArgs 1) + let tmp%34#0: bool = (getbit tmp%33#0 0u) + test_cases.arc_56.contract.Contract.conditional_emit(tmp%34#0) + return 1u + block@8: // template_value_route_L108 + let tmp%35#0: uint64 = (txn OnCompletion) + let tmp%36#0: bool = (! tmp%35#0) + (assert tmp%36#0) // OnCompletion is NoOp + let tmp%37#0: uint64 = (txn ApplicationID) + (assert tmp%37#0) // is not creating + let (elements_to_encode%0#0: bytes, elements_to_encode%1#0: uint64, elements_to_encode%2#0: bytes, elements_to_encode%3#0: bytes) = test_cases.arc_56.contract.Contract.template_value() + let val_as_bytes%1#0: bytes = (itob elements_to_encode%1#0) + let length%0#0: uint64 = (len elements_to_encode%2#0) + let as_bytes%0#0: bytes = (itob length%0#0) + let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) + let encoded_value%0#0: bytes = (concat length_uint16%0#0 elements_to_encode%2#0) + let data_length%0#0: uint64 = (len elements_to_encode%0#0) + let current_tail_offset%1#0: uint64 = (+ 13u data_length%0#0) + let encoded_tuple_buffer%2#0: bytes = (concat 0x000d val_as_bytes%1#0) + let as_bytes%2#0: bytes = (itob current_tail_offset%1#0) + let offset_as_uint16%1#0: bytes = ((extract 6 2) as_bytes%2#0) + let encoded_tuple_buffer%3#0: bytes = (concat encoded_tuple_buffer%2#0 offset_as_uint16%1#0) + let encoded_tuple_buffer%4#0: bytes = (concat encoded_tuple_buffer%3#0 elements_to_encode%3#0) + let encoded_tuple_buffer%5#0: bytes = (concat encoded_tuple_buffer%4#0 elements_to_encode%0#0) + let encoded_tuple_buffer%6#0: bytes = (concat encoded_tuple_buffer%5#0 encoded_value%0#0) + let tmp%39#0: bytes = (concat 0x151f7c75 encoded_tuple_buffer%6#0) + (log tmp%39#0) + return 1u + block@11: // bare_routing_L41 + let tmp%40#0: uint64 = (txn OnCompletion) + goto_nth [block@12, block@12, block@16, block@16, block@16, block@13][tmp%40#0] else return 0u + block@12: // bare_create_L63 + return 1u + block@13: // transient_L71 + let tmp%41#0: uint64 = (txn ApplicationID) + let tmp%42#0: bool = (! tmp%41#0) + (assert tmp%42#0) // is creating + return 1u + block@16: // after_if_else_L41 + return 0u + + subroutine test_cases.arc_56.contract.Contract.struct_arg(arg: bytes, shared: bytes) -> uint64: + block@0: // L75 + let item_start_offset%0#0: uint64 = (extract_uint16 arg#0 10u) + let item_end_offset%0#0: uint64 = (len arg#0) + let tmp%0#0: bytes = (substring3 arg#0 item_start_offset%0#0 item_end_offset%0#0) + let tmp%1#0: bool = (== tmp%0#0 shared#0) + (assert tmp%1#0) // this might error + return 42u + + subroutine test_cases.arc_56.contract.Contract.struct_return(arg: bytes) -> bytes: + block@0: // L80 + let item_start_offset%0#0: uint64 = (extract_uint16 arg#0 10u) + let item_end_offset%0#0: uint64 = (len arg#0) + let tmp%0#0: bytes = (substring3 arg#0 item_start_offset%0#0 item_end_offset%0#0) + let (echo%0#0: bytes, echo%1#0: bytes) = test_cases.arc_56.contract.echo(tmp%0#0) + let tmp%2#0: bool = (== tmp%0#0 echo%0#0) + (assert tmp%2#0) // this won't error + return tmp%0#0 + + subroutine test_cases.arc_56.contract.echo(s: bytes) -> : + block@0: // L118 + return s#0 s#0 + + subroutine test_cases.arc_56.contract.Contract.errors(arg: bytes) -> void: + block@0: // L85 + let tmp%0#0: bytes = ((extract 0 8) arg#0) // on error: Index access is out of bounds + let tmp%1#0: bool = (== tmp%0#0 0x00) + (assert tmp%1#0) // this will error + return + + subroutine test_cases.arc_56.contract.Contract.emitter() -> void: + block@0: // L89 + let event%0#0: bytes = (concat method "SharedStruct(byte[],uint8)" 0x00032a000668656c6c6f31) + (log event%0#0) + let event%1#0: bytes = (concat method "Anonymous(string,(byte[],uint8))" 0x0004000b000568656c6c6f00032a000668656c6c6f32) + (log event%1#0) + return + + subroutine test_cases.arc_56.contract.Contract.conditional_emit(should_emit: bool) -> void: + block@0: // L99 + goto should_emit#0 ? block@1 : block@2 + block@1: // if_body_L102 + let event%0#0: bytes = (concat method "Anonymous2((uint64,uint64),(byte[],uint8))" 0x000000000000002a000000000000002b001200032a000668656c6c6f33) + (log event%0#0) + goto block@2 + block@2: // after_if_else_L101 + return + + subroutine test_cases.arc_56.contract.Contract.template_value() -> : + block@0: // L108 + return TemplateVar[bytes](TMPL_STRUCT) TemplateVar[uint64](TMPL_AVM_UINT64) TemplateVar[bytes](TMPL_AVM_STRING) TemplateVar[bytes](TMPL_ARC4_UINT8) + + program clear-state: + subroutine algopy.arc4.ARC4Contract.clear_state_program() -> bool: + block@0: // L1 + return 1u \ No newline at end of file diff --git a/test_cases/arc_56/out/Contract.ssa.ir b/test_cases/arc_56/out/Contract.ssa.ir new file mode 100644 index 0000000000..9dfd9c91b0 --- /dev/null +++ b/test_cases/arc_56/out/Contract.ssa.ir @@ -0,0 +1,288 @@ +contract test_cases.arc_56.contract.Contract: + program approval: + subroutine algopy.arc4.ARC4Contract.approval_program() -> bool: + block@0: // L1 + let app_id%0#0: uint64 = (txn ApplicationID) + goto app_id%0#0 ? block@2 : block@1 + block@1: // on_create_L43 + test_cases.arc_56.contract.Contract.__init__() + goto block@2 + block@2: // entrypoint_L43 + let tmp%0#0: bool = test_cases.arc_56.contract.Contract.__puya_arc4_router__() + return tmp%0#0 + + subroutine test_cases.arc_56.contract.Contract.__puya_arc4_router__() -> bool: + block@0: // L41 + let tmp%0#0: uint64 = (txn NumAppArgs) + let tmp%1#0: bool = (!= tmp%0#0 0u) + goto tmp%1#0 ? block@1 : block@11 + block@1: // abi_routing_L41 + let tmp%2#0: bytes = (txna ApplicationArgs 0) + switch tmp%2#0 {method "create()void" => block@2, method "struct_arg((uint64,string,(byte[],uint8)),(byte[],uint8))uint64" => block@3, method "struct_return((uint64,string,(byte[],uint8)))(byte[],uint8)" => block@4, method "emits_error((uint64,string,(byte[],uint8)))void" => block@5, method "emitter()void" => block@6, method "conditional_emit(bool)void" => block@7, method "template_value()((byte[],uint8),uint64,string,uint8)" => block@8, * => block@9} + block@2: // create_route_L67 + let tmp%3#0: uint64 = (txn OnCompletion) + let tmp%4#0: uint64 = (shl 1u tmp%3#0) + let tmp%5#0: uint64 = (& tmp%4#0 3u) + (assert tmp%5#0) // OnCompletion is one of NoOp, OptIn + test_cases.arc_56.contract.Contract.create() + return 1u + block@3: // struct_arg_route_L75 + let tmp%6#0: uint64 = (txn OnCompletion) + let tmp%7#0: bool = (== tmp%6#0 NoOp) + (assert tmp%7#0) // OnCompletion is NoOp + let tmp%8#0: uint64 = (txn ApplicationID) + let tmp%9#0: bool = (!= tmp%8#0 0u) + (assert tmp%9#0) // is not creating + let tmp%10#0: bytes = (txna ApplicationArgs 1) + let tmp%11#0: bytes = (txna ApplicationArgs 2) + let to_encode%0#0: uint64 = test_cases.arc_56.contract.Contract.struct_arg(tmp%10#0, tmp%11#0) + let val_as_bytes%0#0: bytes = (itob to_encode%0#0) + let tmp%12#0: bytes = (concat 0x151f7c75 val_as_bytes%0#0) + (log tmp%12#0) + return 1u + block@4: // struct_return_route_L80 + let tmp%13#0: uint64 = (txn OnCompletion) + let tmp%14#0: bool = (== tmp%13#0 NoOp) + (assert tmp%14#0) // OnCompletion is NoOp + let tmp%15#0: uint64 = (txn ApplicationID) + let tmp%16#0: bool = (!= tmp%15#0 0u) + (assert tmp%16#0) // is not creating + let tmp%17#0: bytes = (txna ApplicationArgs 1) + let tmp%18#0: bytes = test_cases.arc_56.contract.Contract.struct_return(tmp%17#0) + let tmp%19#0: bytes = (concat 0x151f7c75 tmp%18#0) + (log tmp%19#0) + return 1u + block@5: // emits_error_route_L85 + let tmp%20#0: uint64 = (txn OnCompletion) + let tmp%21#0: bool = (== tmp%20#0 NoOp) + (assert tmp%21#0) // OnCompletion is NoOp + let tmp%22#0: uint64 = (txn ApplicationID) + let tmp%23#0: bool = (!= tmp%22#0 0u) + (assert tmp%23#0) // is not creating + let tmp%24#0: bytes = (txna ApplicationArgs 1) + test_cases.arc_56.contract.Contract.errors(tmp%24#0) + return 1u + block@6: // emitter_route_L89 + let tmp%25#0: uint64 = (txn OnCompletion) + let tmp%26#0: bool = (== tmp%25#0 NoOp) + (assert tmp%26#0) // OnCompletion is NoOp + let tmp%27#0: uint64 = (txn ApplicationID) + let tmp%28#0: bool = (!= tmp%27#0 0u) + (assert tmp%28#0) // is not creating + test_cases.arc_56.contract.Contract.emitter() + return 1u + block@7: // conditional_emit_route_L99 + let tmp%29#0: uint64 = (txn OnCompletion) + let tmp%30#0: bool = (== tmp%29#0 NoOp) + (assert tmp%30#0) // OnCompletion is NoOp + let tmp%31#0: uint64 = (txn ApplicationID) + let tmp%32#0: bool = (!= tmp%31#0 0u) + (assert tmp%32#0) // is not creating + let tmp%33#0: bytes = (txna ApplicationArgs 1) + let tmp%34#0: bool = (getbit tmp%33#0 0u) + test_cases.arc_56.contract.Contract.conditional_emit(tmp%34#0) + return 1u + block@8: // template_value_route_L108 + let tmp%35#0: uint64 = (txn OnCompletion) + let tmp%36#0: bool = (== tmp%35#0 NoOp) + (assert tmp%36#0) // OnCompletion is NoOp + let tmp%37#0: uint64 = (txn ApplicationID) + let tmp%38#0: bool = (!= tmp%37#0 0u) + (assert tmp%38#0) // is not creating + let (elements_to_encode%0#0: bytes, elements_to_encode%1#0: uint64, elements_to_encode%2#0: bytes, elements_to_encode%3#0: bytes) = test_cases.arc_56.contract.Contract.template_value() + let val_as_bytes%1#0: bytes = (itob elements_to_encode%1#0) + let length%0#0: uint64 = (len elements_to_encode%2#0) + let as_bytes%0#0: bytes = (itob length%0#0) + let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) + let encoded_value%0#0: bytes = (concat length_uint16%0#0 elements_to_encode%2#0) + let current_tail_offset%0#0: uint64 = 13u + let encoded_tuple_buffer%0#0: bytes = 0x + let as_bytes%1#0: bytes = (itob current_tail_offset%0#0) + let offset_as_uint16%0#0: bytes = ((extract 6 2) as_bytes%1#0) + let encoded_tuple_buffer%1#0: bytes = (concat encoded_tuple_buffer%0#0 offset_as_uint16%0#0) + let data_length%0#0: uint64 = (len elements_to_encode%0#0) + let current_tail_offset%1#0: uint64 = (+ current_tail_offset%0#0 data_length%0#0) + let encoded_tuple_buffer%2#0: bytes = (concat encoded_tuple_buffer%1#0 val_as_bytes%1#0) + let as_bytes%2#0: bytes = (itob current_tail_offset%1#0) + let offset_as_uint16%1#0: bytes = ((extract 6 2) as_bytes%2#0) + let encoded_tuple_buffer%3#0: bytes = (concat encoded_tuple_buffer%2#0 offset_as_uint16%1#0) + let data_length%1#0: uint64 = (len encoded_value%0#0) + let current_tail_offset%2#0: uint64 = (+ current_tail_offset%1#0 data_length%1#0) + let encoded_tuple_buffer%4#0: bytes = (concat encoded_tuple_buffer%3#0 elements_to_encode%3#0) + let encoded_tuple_buffer%5#0: bytes = (concat encoded_tuple_buffer%4#0 elements_to_encode%0#0) + let encoded_tuple_buffer%6#0: bytes = (concat encoded_tuple_buffer%5#0 encoded_value%0#0) + let tmp%39#0: bytes = (concat 0x151f7c75 encoded_tuple_buffer%6#0) + (log tmp%39#0) + return 1u + block@9: // switch_case_default_L41 + goto block@10 + block@10: // switch_case_next_L41 + goto block@16 + block@11: // bare_routing_L41 + let tmp%40#0: uint64 = (txn OnCompletion) + switch tmp%40#0 {0u => block@12, 1u => block@12, 5u => block@13, * => block@14} + block@12: // bare_create_L63 + test_cases.arc_56.contract.Contract.bare_create() + return 1u + block@13: // transient_L71 + let tmp%41#0: uint64 = (txn ApplicationID) + let tmp%42#0: bool = (== tmp%41#0 0u) + (assert tmp%42#0) // is creating + test_cases.arc_56.contract.Contract.transient() + return 1u + block@14: // switch_case_default_L41 + goto block@15 + block@15: // switch_case_next_L41 + goto block@16 + block@16: // after_if_else_L41 + return 0u + + subroutine test_cases.arc_56.contract.Contract.create() -> void: + block@0: // L67 + return + + subroutine test_cases.arc_56.contract.Contract.struct_arg(arg: bytes, shared: bytes) -> uint64: + block@0: // L75 + let item_start_offset%0#0: uint64 = (extract_uint16 arg#0 10u) + let item_end_offset%0#0: uint64 = (len arg#0) + let tmp%0#0: bytes = (substring3 arg#0 item_start_offset%0#0 item_end_offset%0#0) + let tmp%1#0: bool = (== tmp%0#0 shared#0) + (assert tmp%1#0) // this might error + return 42u + + subroutine test_cases.arc_56.contract.Contract.struct_return(arg: bytes) -> bytes: + block@0: // L80 + let item_start_offset%0#0: uint64 = (extract_uint16 arg#0 10u) + let item_end_offset%0#0: uint64 = (len arg#0) + let tmp%0#0: bytes = (substring3 arg#0 item_start_offset%0#0 item_end_offset%0#0) + let item_start_offset%1#0: uint64 = (extract_uint16 arg#0 10u) + let item_end_offset%1#0: uint64 = (len arg#0) + let tmp%1#0: bytes = (substring3 arg#0 item_start_offset%1#0 item_end_offset%1#0) + let (echo%0#0: bytes, echo%1#0: bytes) = test_cases.arc_56.contract.echo(tmp%1#0) + let tmp%1#1: bytes = echo%1#0 + let tmp%2#0: bool = (== tmp%0#0 echo%0#0) + (assert tmp%2#0) // this won't error + let item_start_offset%2#0: uint64 = (extract_uint16 arg#0 10u) + let item_end_offset%2#0: uint64 = (len arg#0) + let tmp%3#0: bytes = (substring3 arg#0 item_start_offset%2#0 item_end_offset%2#0) + return tmp%3#0 + + subroutine test_cases.arc_56.contract.echo(s: bytes) -> : + block@0: // L118 + return s#0 s#0 + + subroutine test_cases.arc_56.contract.Contract.errors(arg: bytes) -> void: + block@0: // L85 + let tmp%0#0: bytes = (extract3 arg#0 0u 8u) // on error: Index access is out of bounds + let tmp%1#0: bool = (== tmp%0#0 0x00) + (assert tmp%1#0) // this will error + return + + subroutine test_cases.arc_56.contract.Contract.emitter() -> void: + block@0: // L89 + let length%0#0: uint64 = (len 0x68656c6c6f31) + let as_bytes%0#0: bytes = (itob length%0#0) + let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) + let encoded_value%0#0: bytes = (concat length_uint16%0#0 0x68656c6c6f31) + let current_tail_offset%0#0: uint64 = 3u + let encoded_tuple_buffer%0#0: bytes = 0x + let as_bytes%1#0: bytes = (itob current_tail_offset%0#0) + let offset_as_uint16%0#0: bytes = ((extract 6 2) as_bytes%1#0) + let encoded_tuple_buffer%1#0: bytes = (concat encoded_tuple_buffer%0#0 offset_as_uint16%0#0) + let data_length%0#0: uint64 = (len encoded_value%0#0) + let current_tail_offset%1#0: uint64 = (+ current_tail_offset%0#0 data_length%0#0) + let encoded_tuple_buffer%2#0: bytes = (concat encoded_tuple_buffer%1#0 0x2a) + let encoded_tuple_buffer%3#0: bytes = (concat encoded_tuple_buffer%2#0 encoded_value%0#0) + let event%0#0: bytes = (concat method "SharedStruct(byte[],uint8)" encoded_tuple_buffer%3#0) + (log event%0#0) + let length%1#0: uint64 = (len "hello") + let as_bytes%2#0: bytes = (itob length%1#0) + let length_uint16%1#0: bytes = ((extract 6 2) as_bytes%2#0) + let encoded_value%1#0: bytes = (concat length_uint16%1#0 "hello") + let length%2#0: uint64 = (len 0x68656c6c6f32) + let as_bytes%3#0: bytes = (itob length%2#0) + let length_uint16%2#0: bytes = ((extract 6 2) as_bytes%3#0) + let encoded_value%2#0: bytes = (concat length_uint16%2#0 0x68656c6c6f32) + let current_tail_offset%2#0: uint64 = 3u + let encoded_tuple_buffer%4#0: bytes = 0x + let as_bytes%4#0: bytes = (itob current_tail_offset%2#0) + let offset_as_uint16%1#0: bytes = ((extract 6 2) as_bytes%4#0) + let encoded_tuple_buffer%5#0: bytes = (concat encoded_tuple_buffer%4#0 offset_as_uint16%1#0) + let data_length%1#0: uint64 = (len encoded_value%2#0) + let current_tail_offset%3#0: uint64 = (+ current_tail_offset%2#0 data_length%1#0) + let encoded_tuple_buffer%6#0: bytes = (concat encoded_tuple_buffer%5#0 0x2a) + let encoded_tuple_buffer%7#0: bytes = (concat encoded_tuple_buffer%6#0 encoded_value%2#0) + let current_tail_offset%4#0: uint64 = 4u + let encoded_tuple_buffer%8#0: bytes = 0x + let as_bytes%5#0: bytes = (itob current_tail_offset%4#0) + let offset_as_uint16%2#0: bytes = ((extract 6 2) as_bytes%5#0) + let encoded_tuple_buffer%9#0: bytes = (concat encoded_tuple_buffer%8#0 offset_as_uint16%2#0) + let data_length%2#0: uint64 = (len encoded_value%1#0) + let current_tail_offset%5#0: uint64 = (+ current_tail_offset%4#0 data_length%2#0) + let as_bytes%6#0: bytes = (itob current_tail_offset%5#0) + let offset_as_uint16%3#0: bytes = ((extract 6 2) as_bytes%6#0) + let encoded_tuple_buffer%10#0: bytes = (concat encoded_tuple_buffer%9#0 offset_as_uint16%3#0) + let data_length%3#0: uint64 = (len encoded_tuple_buffer%7#0) + let current_tail_offset%6#0: uint64 = (+ current_tail_offset%5#0 data_length%3#0) + let encoded_tuple_buffer%11#0: bytes = (concat encoded_tuple_buffer%10#0 encoded_value%1#0) + let encoded_tuple_buffer%12#0: bytes = (concat encoded_tuple_buffer%11#0 encoded_tuple_buffer%7#0) + let event%1#0: bytes = (concat method "Anonymous(string,(byte[],uint8))" encoded_tuple_buffer%12#0) + (log event%1#0) + return + + subroutine test_cases.arc_56.contract.Contract.conditional_emit(should_emit: bool) -> void: + block@0: // L99 + goto should_emit#0 ? block@1 : block@2 + block@1: // if_body_L102 + let current_tail_offset%0#0: uint64 = 16u + let encoded_tuple_buffer%0#0: bytes = 0x + let encoded_tuple_buffer%1#0: bytes = (concat encoded_tuple_buffer%0#0 0x000000000000002a) + let encoded_tuple_buffer%2#0: bytes = (concat encoded_tuple_buffer%1#0 0x000000000000002b) + let length%0#0: uint64 = (len 0x68656c6c6f33) + let as_bytes%0#0: bytes = (itob length%0#0) + let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) + let encoded_value%0#0: bytes = (concat length_uint16%0#0 0x68656c6c6f33) + let current_tail_offset%1#0: uint64 = 3u + let encoded_tuple_buffer%3#0: bytes = 0x + let as_bytes%1#0: bytes = (itob current_tail_offset%1#0) + let offset_as_uint16%0#0: bytes = ((extract 6 2) as_bytes%1#0) + let encoded_tuple_buffer%4#0: bytes = (concat encoded_tuple_buffer%3#0 offset_as_uint16%0#0) + let data_length%0#0: uint64 = (len encoded_value%0#0) + let current_tail_offset%2#0: uint64 = (+ current_tail_offset%1#0 data_length%0#0) + let encoded_tuple_buffer%5#0: bytes = (concat encoded_tuple_buffer%4#0 0x2a) + let encoded_tuple_buffer%6#0: bytes = (concat encoded_tuple_buffer%5#0 encoded_value%0#0) + let current_tail_offset%3#0: uint64 = 18u + let encoded_tuple_buffer%7#0: bytes = 0x + let encoded_tuple_buffer%8#0: bytes = (concat encoded_tuple_buffer%7#0 encoded_tuple_buffer%2#0) + let as_bytes%2#0: bytes = (itob current_tail_offset%3#0) + let offset_as_uint16%1#0: bytes = ((extract 6 2) as_bytes%2#0) + let encoded_tuple_buffer%9#0: bytes = (concat encoded_tuple_buffer%8#0 offset_as_uint16%1#0) + let data_length%1#0: uint64 = (len encoded_tuple_buffer%6#0) + let current_tail_offset%4#0: uint64 = (+ current_tail_offset%3#0 data_length%1#0) + let encoded_tuple_buffer%10#0: bytes = (concat encoded_tuple_buffer%9#0 encoded_tuple_buffer%6#0) + let event%0#0: bytes = (concat method "Anonymous2((uint64,uint64),(byte[],uint8))" encoded_tuple_buffer%10#0) + (log event%0#0) + goto block@2 + block@2: // after_if_else_L101 + return + + subroutine test_cases.arc_56.contract.Contract.template_value() -> : + block@0: // L108 + return TemplateVar[bytes](TMPL_STRUCT) TemplateVar[uint64](TMPL_AVM_UINT64) TemplateVar[bytes](TMPL_AVM_STRING) TemplateVar[bytes](TMPL_ARC4_UINT8) + + subroutine test_cases.arc_56.contract.Contract.bare_create() -> void: + block@0: // L63 + return + + subroutine test_cases.arc_56.contract.Contract.transient() -> void: + block@0: // L71 + return + + subroutine test_cases.arc_56.contract.Contract.__init__() -> void: + block@0: // L43 + return + + program clear-state: + subroutine algopy.arc4.ARC4Contract.clear_state_program() -> bool: + block@0: // L1 + return 1u \ No newline at end of file diff --git a/test_cases/arc_56/out/Contract.ssa.opt_pass_1.ir b/test_cases/arc_56/out/Contract.ssa.opt_pass_1.ir new file mode 100644 index 0000000000..7681f7cd79 --- /dev/null +++ b/test_cases/arc_56/out/Contract.ssa.opt_pass_1.ir @@ -0,0 +1,220 @@ +contract test_cases.arc_56.contract.Contract: + program approval: + subroutine algopy.arc4.ARC4Contract.approval_program() -> bool: + block@0: // L1 + let app_id%0#0: uint64 = (txn ApplicationID) + goto app_id%0#0 ? block@2 : block@1 + block@1: // on_create_L43 + goto block@2 + block@2: // entrypoint_L43 + let tmp%0#0: bool = test_cases.arc_56.contract.Contract.__puya_arc4_router__() + return tmp%0#0 + + subroutine test_cases.arc_56.contract.Contract.__puya_arc4_router__() -> bool: + block@0: // L41 + let tmp%0#0: uint64 = (txn NumAppArgs) + goto tmp%0#0 ? block@1 : block@11 + block@1: // abi_routing_L41 + let tmp%2#0: bytes = (txna ApplicationArgs 0) + switch tmp%2#0 {method "create()void" => block@2, method "struct_arg((uint64,string,(byte[],uint8)),(byte[],uint8))uint64" => block@3, method "struct_return((uint64,string,(byte[],uint8)))(byte[],uint8)" => block@4, method "emits_error((uint64,string,(byte[],uint8)))void" => block@5, method "emitter()void" => block@6, method "conditional_emit(bool)void" => block@7, method "template_value()((byte[],uint8),uint64,string,uint8)" => block@8, * => return 0u} + block@2: // create_route_L67 + let tmp%3#0: uint64 = (txn OnCompletion) + let tmp%4#0: uint64 = (shl 1u tmp%3#0) + let tmp%5#0: uint64 = (& tmp%4#0 3u) + (assert tmp%5#0) // OnCompletion is one of NoOp, OptIn + return 1u + block@3: // struct_arg_route_L75 + let tmp%6#0: uint64 = (txn OnCompletion) + let tmp%7#0: bool = (! tmp%6#0) + (assert tmp%7#0) // OnCompletion is NoOp + let tmp%8#0: uint64 = (txn ApplicationID) + (assert tmp%8#0) // is not creating + let tmp%10#0: bytes = (txna ApplicationArgs 1) + let tmp%11#0: bytes = (txna ApplicationArgs 2) + let to_encode%0#0: uint64 = test_cases.arc_56.contract.Contract.struct_arg(tmp%10#0, tmp%11#0) + let val_as_bytes%0#0: bytes = (itob to_encode%0#0) + let tmp%12#0: bytes = (concat 0x151f7c75 val_as_bytes%0#0) + (log tmp%12#0) + return 1u + block@4: // struct_return_route_L80 + let tmp%13#0: uint64 = (txn OnCompletion) + let tmp%14#0: bool = (! tmp%13#0) + (assert tmp%14#0) // OnCompletion is NoOp + let tmp%15#0: uint64 = (txn ApplicationID) + (assert tmp%15#0) // is not creating + let tmp%17#0: bytes = (txna ApplicationArgs 1) + let tmp%18#0: bytes = test_cases.arc_56.contract.Contract.struct_return(tmp%17#0) + let tmp%19#0: bytes = (concat 0x151f7c75 tmp%18#0) + (log tmp%19#0) + return 1u + block@5: // emits_error_route_L85 + let tmp%20#0: uint64 = (txn OnCompletion) + let tmp%21#0: bool = (! tmp%20#0) + (assert tmp%21#0) // OnCompletion is NoOp + let tmp%22#0: uint64 = (txn ApplicationID) + (assert tmp%22#0) // is not creating + let tmp%24#0: bytes = (txna ApplicationArgs 1) + test_cases.arc_56.contract.Contract.errors(tmp%24#0) + return 1u + block@6: // emitter_route_L89 + let tmp%25#0: uint64 = (txn OnCompletion) + let tmp%26#0: bool = (! tmp%25#0) + (assert tmp%26#0) // OnCompletion is NoOp + let tmp%27#0: uint64 = (txn ApplicationID) + (assert tmp%27#0) // is not creating + test_cases.arc_56.contract.Contract.emitter() + return 1u + block@7: // conditional_emit_route_L99 + let tmp%29#0: uint64 = (txn OnCompletion) + let tmp%30#0: bool = (! tmp%29#0) + (assert tmp%30#0) // OnCompletion is NoOp + let tmp%31#0: uint64 = (txn ApplicationID) + (assert tmp%31#0) // is not creating + let tmp%33#0: bytes = (txna ApplicationArgs 1) + let tmp%34#0: bool = (getbit tmp%33#0 0u) + test_cases.arc_56.contract.Contract.conditional_emit(tmp%34#0) + return 1u + block@8: // template_value_route_L108 + let tmp%35#0: uint64 = (txn OnCompletion) + let tmp%36#0: bool = (! tmp%35#0) + (assert tmp%36#0) // OnCompletion is NoOp + let tmp%37#0: uint64 = (txn ApplicationID) + (assert tmp%37#0) // is not creating + let (elements_to_encode%0#0: bytes, elements_to_encode%1#0: uint64, elements_to_encode%2#0: bytes, elements_to_encode%3#0: bytes) = test_cases.arc_56.contract.Contract.template_value() + let val_as_bytes%1#0: bytes = (itob elements_to_encode%1#0) + let length%0#0: uint64 = (len elements_to_encode%2#0) + let as_bytes%0#0: bytes = (itob length%0#0) + let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) + let encoded_value%0#0: bytes = (concat length_uint16%0#0 elements_to_encode%2#0) + let offset_as_uint16%0#0: bytes = 0x000d + let encoded_tuple_buffer%1#0: bytes = offset_as_uint16%0#0 + let data_length%0#0: uint64 = (len elements_to_encode%0#0) + let current_tail_offset%1#0: uint64 = (+ 13u data_length%0#0) + let encoded_tuple_buffer%2#0: bytes = (concat encoded_tuple_buffer%1#0 val_as_bytes%1#0) + let as_bytes%2#0: bytes = (itob current_tail_offset%1#0) + let offset_as_uint16%1#0: bytes = ((extract 6 2) as_bytes%2#0) + let encoded_tuple_buffer%3#0: bytes = (concat encoded_tuple_buffer%2#0 offset_as_uint16%1#0) + let data_length%1#0: uint64 = (len encoded_value%0#0) + let encoded_tuple_buffer%4#0: bytes = (concat encoded_tuple_buffer%3#0 elements_to_encode%3#0) + let encoded_tuple_buffer%5#0: bytes = (concat encoded_tuple_buffer%4#0 elements_to_encode%0#0) + let encoded_tuple_buffer%6#0: bytes = (concat encoded_tuple_buffer%5#0 encoded_value%0#0) + let tmp%39#0: bytes = (concat 0x151f7c75 encoded_tuple_buffer%6#0) + (log tmp%39#0) + return 1u + block@11: // bare_routing_L41 + let tmp%40#0: uint64 = (txn OnCompletion) + goto_nth [block@12, block@12, block@16, block@16, block@16, block@13][tmp%40#0] else return 0u + block@12: // bare_create_L63 + return 1u + block@13: // transient_L71 + let tmp%41#0: uint64 = (txn ApplicationID) + let tmp%42#0: bool = (! tmp%41#0) + (assert tmp%42#0) // is creating + return 1u + block@16: // after_if_else_L41 + return 0u + + subroutine test_cases.arc_56.contract.Contract.struct_arg(arg: bytes, shared: bytes) -> uint64: + block@0: // L75 + let item_start_offset%0#0: uint64 = (extract_uint16 arg#0 10u) + let item_end_offset%0#0: uint64 = (len arg#0) + let tmp%0#0: bytes = (substring3 arg#0 item_start_offset%0#0 item_end_offset%0#0) + let tmp%1#0: bool = (== tmp%0#0 shared#0) + (assert tmp%1#0) // this might error + return 42u + + subroutine test_cases.arc_56.contract.Contract.struct_return(arg: bytes) -> bytes: + block@0: // L80 + let item_start_offset%0#0: uint64 = (extract_uint16 arg#0 10u) + let item_end_offset%0#0: uint64 = (len arg#0) + let tmp%0#0: bytes = (substring3 arg#0 item_start_offset%0#0 item_end_offset%0#0) + let (echo%0#0: bytes, echo%1#0: bytes) = test_cases.arc_56.contract.echo(tmp%0#0) + let tmp%2#0: bool = (== tmp%0#0 echo%0#0) + (assert tmp%2#0) // this won't error + return tmp%0#0 + + subroutine test_cases.arc_56.contract.echo(s: bytes) -> : + block@0: // L118 + return s#0 s#0 + + subroutine test_cases.arc_56.contract.Contract.errors(arg: bytes) -> void: + block@0: // L85 + let tmp%0#0: bytes = ((extract 0 8) arg#0) // on error: Index access is out of bounds + let tmp%1#0: bool = (== tmp%0#0 0x00) + (assert tmp%1#0) // this will error + return + + subroutine test_cases.arc_56.contract.Contract.emitter() -> void: + block@0: // L89 + let length%0#0: uint64 = 6u + let as_bytes%0#0: bytes = (itob length%0#0) + let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) + let encoded_value%0#0: bytes = (concat length_uint16%0#0 0x68656c6c6f31) + let offset_as_uint16%0#0: bytes = 0x0003 + let encoded_tuple_buffer%1#0: bytes = offset_as_uint16%0#0 + let data_length%0#0: uint64 = (len encoded_value%0#0) + let encoded_tuple_buffer%2#0: bytes = (concat encoded_tuple_buffer%1#0 0x2a) + let encoded_tuple_buffer%3#0: bytes = (concat encoded_tuple_buffer%2#0 encoded_value%0#0) + let event%0#0: bytes = (concat method "SharedStruct(byte[],uint8)" encoded_tuple_buffer%3#0) + (log event%0#0) + let length%1#0: uint64 = 5u + let as_bytes%2#0: bytes = (itob length%1#0) + let length_uint16%1#0: bytes = ((extract 6 2) as_bytes%2#0) + let encoded_value%1#0: bytes = (concat length_uint16%1#0 "hello") + let length%2#0: uint64 = 6u + let as_bytes%3#0: bytes = (itob length%2#0) + let length_uint16%2#0: bytes = ((extract 6 2) as_bytes%3#0) + let encoded_value%2#0: bytes = (concat length_uint16%2#0 0x68656c6c6f32) + let offset_as_uint16%1#0: bytes = 0x0003 + let encoded_tuple_buffer%5#0: bytes = offset_as_uint16%1#0 + let data_length%1#0: uint64 = (len encoded_value%2#0) + let encoded_tuple_buffer%6#0: bytes = (concat encoded_tuple_buffer%5#0 0x2a) + let encoded_tuple_buffer%7#0: bytes = (concat encoded_tuple_buffer%6#0 encoded_value%2#0) + let offset_as_uint16%2#0: bytes = 0x0004 + let encoded_tuple_buffer%9#0: bytes = offset_as_uint16%2#0 + let data_length%2#0: uint64 = (len encoded_value%1#0) + let current_tail_offset%5#0: uint64 = (+ 4u data_length%2#0) + let as_bytes%6#0: bytes = (itob current_tail_offset%5#0) + let offset_as_uint16%3#0: bytes = ((extract 6 2) as_bytes%6#0) + let encoded_tuple_buffer%10#0: bytes = (concat encoded_tuple_buffer%9#0 offset_as_uint16%3#0) + let data_length%3#0: uint64 = (len encoded_tuple_buffer%7#0) + let encoded_tuple_buffer%11#0: bytes = (concat encoded_tuple_buffer%10#0 encoded_value%1#0) + let encoded_tuple_buffer%12#0: bytes = (concat encoded_tuple_buffer%11#0 encoded_tuple_buffer%7#0) + let event%1#0: bytes = (concat method "Anonymous(string,(byte[],uint8))" encoded_tuple_buffer%12#0) + (log event%1#0) + return + + subroutine test_cases.arc_56.contract.Contract.conditional_emit(should_emit: bool) -> void: + block@0: // L99 + goto should_emit#0 ? block@1 : block@2 + block@1: // if_body_L102 + let encoded_tuple_buffer%1#0: bytes = 0x000000000000002a + let encoded_tuple_buffer%2#0: bytes = (concat encoded_tuple_buffer%1#0 0x000000000000002b) + let length%0#0: uint64 = 6u + let as_bytes%0#0: bytes = (itob length%0#0) + let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) + let encoded_value%0#0: bytes = (concat length_uint16%0#0 0x68656c6c6f33) + let offset_as_uint16%0#0: bytes = 0x0003 + let encoded_tuple_buffer%4#0: bytes = offset_as_uint16%0#0 + let data_length%0#0: uint64 = (len encoded_value%0#0) + let encoded_tuple_buffer%5#0: bytes = (concat encoded_tuple_buffer%4#0 0x2a) + let encoded_tuple_buffer%6#0: bytes = (concat encoded_tuple_buffer%5#0 encoded_value%0#0) + let encoded_tuple_buffer%8#0: bytes = encoded_tuple_buffer%2#0 + let offset_as_uint16%1#0: bytes = 0x0012 + let encoded_tuple_buffer%9#0: bytes = (concat encoded_tuple_buffer%8#0 offset_as_uint16%1#0) + let data_length%1#0: uint64 = (len encoded_tuple_buffer%6#0) + let encoded_tuple_buffer%10#0: bytes = (concat encoded_tuple_buffer%9#0 encoded_tuple_buffer%6#0) + let event%0#0: bytes = (concat method "Anonymous2((uint64,uint64),(byte[],uint8))" encoded_tuple_buffer%10#0) + (log event%0#0) + goto block@2 + block@2: // after_if_else_L101 + return + + subroutine test_cases.arc_56.contract.Contract.template_value() -> : + block@0: // L108 + return TemplateVar[bytes](TMPL_STRUCT) TemplateVar[uint64](TMPL_AVM_UINT64) TemplateVar[bytes](TMPL_AVM_STRING) TemplateVar[bytes](TMPL_ARC4_UINT8) + + program clear-state: + subroutine algopy.arc4.ARC4Contract.clear_state_program() -> bool: + block@0: // L1 + return 1u \ No newline at end of file diff --git a/test_cases/arc_56/out/Contract.ssa.opt_pass_10.ir b/test_cases/arc_56/out/Contract.ssa.opt_pass_10.ir new file mode 100644 index 0000000000..4a3f07ca27 --- /dev/null +++ b/test_cases/arc_56/out/Contract.ssa.opt_pass_10.ir @@ -0,0 +1,164 @@ +contract test_cases.arc_56.contract.Contract: + program approval: + subroutine algopy.arc4.ARC4Contract.approval_program() -> bool: + block@0: // L1 + let tmp%0#0: bool = test_cases.arc_56.contract.Contract.__puya_arc4_router__() + return tmp%0#0 + + subroutine test_cases.arc_56.contract.Contract.__puya_arc4_router__() -> bool: + block@0: // L41 + let tmp%0#0: uint64 = (txn NumAppArgs) + goto tmp%0#0 ? block@1 : block@11 + block@1: // abi_routing_L41 + let tmp%2#0: bytes = (txna ApplicationArgs 0) + switch tmp%2#0 {method "create()void" => block@2, method "struct_arg((uint64,string,(byte[],uint8)),(byte[],uint8))uint64" => block@3, method "struct_return((uint64,string,(byte[],uint8)))(byte[],uint8)" => block@4, method "emits_error((uint64,string,(byte[],uint8)))void" => block@5, method "emitter()void" => block@6, method "conditional_emit(bool)void" => block@7, method "template_value()((byte[],uint8),uint64,string,uint8)" => block@8, * => return 0u} + block@2: // create_route_L67 + let tmp%3#0: uint64 = (txn OnCompletion) + let tmp%4#0: uint64 = (shl 1u tmp%3#0) + let tmp%5#0: uint64 = (& tmp%4#0 3u) + (assert tmp%5#0) // OnCompletion is one of NoOp, OptIn + return 1u + block@3: // struct_arg_route_L75 + let tmp%6#0: uint64 = (txn OnCompletion) + let tmp%7#0: bool = (! tmp%6#0) + (assert tmp%7#0) // OnCompletion is NoOp + let tmp%8#0: uint64 = (txn ApplicationID) + (assert tmp%8#0) // is not creating + let tmp%10#0: bytes = (txna ApplicationArgs 1) + let tmp%11#0: bytes = (txna ApplicationArgs 2) + let to_encode%0#0: uint64 = test_cases.arc_56.contract.Contract.struct_arg(tmp%10#0, tmp%11#0) + let val_as_bytes%0#0: bytes = (itob to_encode%0#0) + let tmp%12#0: bytes = (concat 0x151f7c75 val_as_bytes%0#0) + (log tmp%12#0) + return 1u + block@4: // struct_return_route_L80 + let tmp%13#0: uint64 = (txn OnCompletion) + let tmp%14#0: bool = (! tmp%13#0) + (assert tmp%14#0) // OnCompletion is NoOp + let tmp%15#0: uint64 = (txn ApplicationID) + (assert tmp%15#0) // is not creating + let tmp%17#0: bytes = (txna ApplicationArgs 1) + let tmp%18#0: bytes = test_cases.arc_56.contract.Contract.struct_return(tmp%17#0) + let tmp%19#0: bytes = (concat 0x151f7c75 tmp%18#0) + (log tmp%19#0) + return 1u + block@5: // emits_error_route_L85 + let tmp%20#0: uint64 = (txn OnCompletion) + let tmp%21#0: bool = (! tmp%20#0) + (assert tmp%21#0) // OnCompletion is NoOp + let tmp%22#0: uint64 = (txn ApplicationID) + (assert tmp%22#0) // is not creating + let tmp%24#0: bytes = (txna ApplicationArgs 1) + test_cases.arc_56.contract.Contract.errors(tmp%24#0) + return 1u + block@6: // emitter_route_L89 + let tmp%25#0: uint64 = (txn OnCompletion) + let tmp%26#0: bool = (! tmp%25#0) + (assert tmp%26#0) // OnCompletion is NoOp + let tmp%27#0: uint64 = (txn ApplicationID) + (assert tmp%27#0) // is not creating + test_cases.arc_56.contract.Contract.emitter() + return 1u + block@7: // conditional_emit_route_L99 + let tmp%29#0: uint64 = (txn OnCompletion) + let tmp%30#0: bool = (! tmp%29#0) + (assert tmp%30#0) // OnCompletion is NoOp + let tmp%31#0: uint64 = (txn ApplicationID) + (assert tmp%31#0) // is not creating + let tmp%33#0: bytes = (txna ApplicationArgs 1) + let tmp%34#0: bool = (getbit tmp%33#0 0u) + test_cases.arc_56.contract.Contract.conditional_emit(tmp%34#0) + return 1u + block@8: // template_value_route_L108 + let tmp%35#0: uint64 = (txn OnCompletion) + let tmp%36#0: bool = (! tmp%35#0) + (assert tmp%36#0) // OnCompletion is NoOp + let tmp%37#0: uint64 = (txn ApplicationID) + (assert tmp%37#0) // is not creating + let (elements_to_encode%0#0: bytes, elements_to_encode%1#0: uint64, elements_to_encode%2#0: bytes, elements_to_encode%3#0: bytes) = test_cases.arc_56.contract.Contract.template_value() + let val_as_bytes%1#0: bytes = (itob elements_to_encode%1#0) + let length%0#0: uint64 = (len elements_to_encode%2#0) + let as_bytes%0#0: bytes = (itob length%0#0) + let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) + let encoded_value%0#0: bytes = (concat length_uint16%0#0 elements_to_encode%2#0) + let data_length%0#0: uint64 = (len elements_to_encode%0#0) + let current_tail_offset%1#0: uint64 = (+ 13u data_length%0#0) + let encoded_tuple_buffer%2#0: bytes = (concat 0x000d val_as_bytes%1#0) + let as_bytes%2#0: bytes = (itob current_tail_offset%1#0) + let offset_as_uint16%1#0: bytes = ((extract 6 2) as_bytes%2#0) + let encoded_tuple_buffer%3#0: bytes = (concat encoded_tuple_buffer%2#0 offset_as_uint16%1#0) + let encoded_tuple_buffer%4#0: bytes = (concat encoded_tuple_buffer%3#0 elements_to_encode%3#0) + let encoded_tuple_buffer%5#0: bytes = (concat encoded_tuple_buffer%4#0 elements_to_encode%0#0) + let encoded_tuple_buffer%6#0: bytes = (concat encoded_tuple_buffer%5#0 encoded_value%0#0) + let tmp%39#0: bytes = (concat 0x151f7c75 encoded_tuple_buffer%6#0) + (log tmp%39#0) + return 1u + block@11: // bare_routing_L41 + let tmp%40#0: uint64 = (txn OnCompletion) + goto_nth [block@12, block@12, block@16, block@16, block@16, block@13][tmp%40#0] else return 0u + block@12: // bare_create_L63 + return 1u + block@13: // transient_L71 + let tmp%41#0: uint64 = (txn ApplicationID) + let tmp%42#0: bool = (! tmp%41#0) + (assert tmp%42#0) // is creating + return 1u + block@16: // after_if_else_L41 + return 0u + + subroutine test_cases.arc_56.contract.Contract.struct_arg(arg: bytes, shared: bytes) -> uint64: + block@0: // L75 + let item_start_offset%0#0: uint64 = (extract_uint16 arg#0 10u) + let item_end_offset%0#0: uint64 = (len arg#0) + let tmp%0#0: bytes = (substring3 arg#0 item_start_offset%0#0 item_end_offset%0#0) + let tmp%1#0: bool = (== tmp%0#0 shared#0) + (assert tmp%1#0) // this might error + return 42u + + subroutine test_cases.arc_56.contract.Contract.struct_return(arg: bytes) -> bytes: + block@0: // L80 + let item_start_offset%0#0: uint64 = (extract_uint16 arg#0 10u) + let item_end_offset%0#0: uint64 = (len arg#0) + let tmp%0#0: bytes = (substring3 arg#0 item_start_offset%0#0 item_end_offset%0#0) + let (echo%0#0: bytes, echo%1#0: bytes) = test_cases.arc_56.contract.echo(tmp%0#0) + let tmp%2#0: bool = (== tmp%0#0 echo%0#0) + (assert tmp%2#0) // this won't error + return tmp%0#0 + + subroutine test_cases.arc_56.contract.echo(s: bytes) -> : + block@0: // L118 + return s#0 s#0 + + subroutine test_cases.arc_56.contract.Contract.errors(arg: bytes) -> void: + block@0: // L85 + let tmp%0#0: bytes = ((extract 0 8) arg#0) // on error: Index access is out of bounds + let tmp%1#0: bool = (== tmp%0#0 0x00) + (assert tmp%1#0) // this will error + return + + subroutine test_cases.arc_56.contract.Contract.emitter() -> void: + block@0: // L89 + let event%0#0: bytes = (concat method "SharedStruct(byte[],uint8)" 0x00032a000668656c6c6f31) + (log event%0#0) + let event%1#0: bytes = (concat method "Anonymous(string,(byte[],uint8))" 0x0004000b000568656c6c6f00032a000668656c6c6f32) + (log event%1#0) + return + + subroutine test_cases.arc_56.contract.Contract.conditional_emit(should_emit: bool) -> void: + block@0: // L99 + goto should_emit#0 ? block@1 : block@2 + block@1: // if_body_L102 + let event%0#0: bytes = (concat method "Anonymous2((uint64,uint64),(byte[],uint8))" 0x000000000000002a000000000000002b001200032a000668656c6c6f33) + (log event%0#0) + goto block@2 + block@2: // after_if_else_L101 + return + + subroutine test_cases.arc_56.contract.Contract.template_value() -> : + block@0: // L108 + return TemplateVar[bytes](TMPL_STRUCT) TemplateVar[uint64](TMPL_AVM_UINT64) TemplateVar[bytes](TMPL_AVM_STRING) TemplateVar[bytes](TMPL_ARC4_UINT8) + + program clear-state: + subroutine algopy.arc4.ARC4Contract.clear_state_program() -> bool: + block@0: // L1 + return 1u \ No newline at end of file diff --git a/test_cases/arc_56/out/Contract.ssa.opt_pass_2.ir b/test_cases/arc_56/out/Contract.ssa.opt_pass_2.ir new file mode 100644 index 0000000000..7b5c6a8469 --- /dev/null +++ b/test_cases/arc_56/out/Contract.ssa.opt_pass_2.ir @@ -0,0 +1,191 @@ +contract test_cases.arc_56.contract.Contract: + program approval: + subroutine algopy.arc4.ARC4Contract.approval_program() -> bool: + block@0: // L1 + let app_id%0#0: uint64 = (txn ApplicationID) + goto block@2 + block@2: // entrypoint_L43 + let tmp%0#0: bool = test_cases.arc_56.contract.Contract.__puya_arc4_router__() + return tmp%0#0 + + subroutine test_cases.arc_56.contract.Contract.__puya_arc4_router__() -> bool: + block@0: // L41 + let tmp%0#0: uint64 = (txn NumAppArgs) + goto tmp%0#0 ? block@1 : block@11 + block@1: // abi_routing_L41 + let tmp%2#0: bytes = (txna ApplicationArgs 0) + switch tmp%2#0 {method "create()void" => block@2, method "struct_arg((uint64,string,(byte[],uint8)),(byte[],uint8))uint64" => block@3, method "struct_return((uint64,string,(byte[],uint8)))(byte[],uint8)" => block@4, method "emits_error((uint64,string,(byte[],uint8)))void" => block@5, method "emitter()void" => block@6, method "conditional_emit(bool)void" => block@7, method "template_value()((byte[],uint8),uint64,string,uint8)" => block@8, * => return 0u} + block@2: // create_route_L67 + let tmp%3#0: uint64 = (txn OnCompletion) + let tmp%4#0: uint64 = (shl 1u tmp%3#0) + let tmp%5#0: uint64 = (& tmp%4#0 3u) + (assert tmp%5#0) // OnCompletion is one of NoOp, OptIn + return 1u + block@3: // struct_arg_route_L75 + let tmp%6#0: uint64 = (txn OnCompletion) + let tmp%7#0: bool = (! tmp%6#0) + (assert tmp%7#0) // OnCompletion is NoOp + let tmp%8#0: uint64 = (txn ApplicationID) + (assert tmp%8#0) // is not creating + let tmp%10#0: bytes = (txna ApplicationArgs 1) + let tmp%11#0: bytes = (txna ApplicationArgs 2) + let to_encode%0#0: uint64 = test_cases.arc_56.contract.Contract.struct_arg(tmp%10#0, tmp%11#0) + let val_as_bytes%0#0: bytes = (itob to_encode%0#0) + let tmp%12#0: bytes = (concat 0x151f7c75 val_as_bytes%0#0) + (log tmp%12#0) + return 1u + block@4: // struct_return_route_L80 + let tmp%13#0: uint64 = (txn OnCompletion) + let tmp%14#0: bool = (! tmp%13#0) + (assert tmp%14#0) // OnCompletion is NoOp + let tmp%15#0: uint64 = (txn ApplicationID) + (assert tmp%15#0) // is not creating + let tmp%17#0: bytes = (txna ApplicationArgs 1) + let tmp%18#0: bytes = test_cases.arc_56.contract.Contract.struct_return(tmp%17#0) + let tmp%19#0: bytes = (concat 0x151f7c75 tmp%18#0) + (log tmp%19#0) + return 1u + block@5: // emits_error_route_L85 + let tmp%20#0: uint64 = (txn OnCompletion) + let tmp%21#0: bool = (! tmp%20#0) + (assert tmp%21#0) // OnCompletion is NoOp + let tmp%22#0: uint64 = (txn ApplicationID) + (assert tmp%22#0) // is not creating + let tmp%24#0: bytes = (txna ApplicationArgs 1) + test_cases.arc_56.contract.Contract.errors(tmp%24#0) + return 1u + block@6: // emitter_route_L89 + let tmp%25#0: uint64 = (txn OnCompletion) + let tmp%26#0: bool = (! tmp%25#0) + (assert tmp%26#0) // OnCompletion is NoOp + let tmp%27#0: uint64 = (txn ApplicationID) + (assert tmp%27#0) // is not creating + test_cases.arc_56.contract.Contract.emitter() + return 1u + block@7: // conditional_emit_route_L99 + let tmp%29#0: uint64 = (txn OnCompletion) + let tmp%30#0: bool = (! tmp%29#0) + (assert tmp%30#0) // OnCompletion is NoOp + let tmp%31#0: uint64 = (txn ApplicationID) + (assert tmp%31#0) // is not creating + let tmp%33#0: bytes = (txna ApplicationArgs 1) + let tmp%34#0: bool = (getbit tmp%33#0 0u) + test_cases.arc_56.contract.Contract.conditional_emit(tmp%34#0) + return 1u + block@8: // template_value_route_L108 + let tmp%35#0: uint64 = (txn OnCompletion) + let tmp%36#0: bool = (! tmp%35#0) + (assert tmp%36#0) // OnCompletion is NoOp + let tmp%37#0: uint64 = (txn ApplicationID) + (assert tmp%37#0) // is not creating + let (elements_to_encode%0#0: bytes, elements_to_encode%1#0: uint64, elements_to_encode%2#0: bytes, elements_to_encode%3#0: bytes) = test_cases.arc_56.contract.Contract.template_value() + let val_as_bytes%1#0: bytes = (itob elements_to_encode%1#0) + let length%0#0: uint64 = (len elements_to_encode%2#0) + let as_bytes%0#0: bytes = (itob length%0#0) + let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) + let encoded_value%0#0: bytes = (concat length_uint16%0#0 elements_to_encode%2#0) + let data_length%0#0: uint64 = (len elements_to_encode%0#0) + let current_tail_offset%1#0: uint64 = (+ 13u data_length%0#0) + let encoded_tuple_buffer%2#0: bytes = (concat 0x000d val_as_bytes%1#0) + let as_bytes%2#0: bytes = (itob current_tail_offset%1#0) + let offset_as_uint16%1#0: bytes = ((extract 6 2) as_bytes%2#0) + let encoded_tuple_buffer%3#0: bytes = (concat encoded_tuple_buffer%2#0 offset_as_uint16%1#0) + let encoded_tuple_buffer%4#0: bytes = (concat encoded_tuple_buffer%3#0 elements_to_encode%3#0) + let encoded_tuple_buffer%5#0: bytes = (concat encoded_tuple_buffer%4#0 elements_to_encode%0#0) + let encoded_tuple_buffer%6#0: bytes = (concat encoded_tuple_buffer%5#0 encoded_value%0#0) + let tmp%39#0: bytes = (concat 0x151f7c75 encoded_tuple_buffer%6#0) + (log tmp%39#0) + return 1u + block@11: // bare_routing_L41 + let tmp%40#0: uint64 = (txn OnCompletion) + goto_nth [block@12, block@12, block@16, block@16, block@16, block@13][tmp%40#0] else return 0u + block@12: // bare_create_L63 + return 1u + block@13: // transient_L71 + let tmp%41#0: uint64 = (txn ApplicationID) + let tmp%42#0: bool = (! tmp%41#0) + (assert tmp%42#0) // is creating + return 1u + block@16: // after_if_else_L41 + return 0u + + subroutine test_cases.arc_56.contract.Contract.struct_arg(arg: bytes, shared: bytes) -> uint64: + block@0: // L75 + let item_start_offset%0#0: uint64 = (extract_uint16 arg#0 10u) + let item_end_offset%0#0: uint64 = (len arg#0) + let tmp%0#0: bytes = (substring3 arg#0 item_start_offset%0#0 item_end_offset%0#0) + let tmp%1#0: bool = (== tmp%0#0 shared#0) + (assert tmp%1#0) // this might error + return 42u + + subroutine test_cases.arc_56.contract.Contract.struct_return(arg: bytes) -> bytes: + block@0: // L80 + let item_start_offset%0#0: uint64 = (extract_uint16 arg#0 10u) + let item_end_offset%0#0: uint64 = (len arg#0) + let tmp%0#0: bytes = (substring3 arg#0 item_start_offset%0#0 item_end_offset%0#0) + let (echo%0#0: bytes, echo%1#0: bytes) = test_cases.arc_56.contract.echo(tmp%0#0) + let tmp%2#0: bool = (== tmp%0#0 echo%0#0) + (assert tmp%2#0) // this won't error + return tmp%0#0 + + subroutine test_cases.arc_56.contract.echo(s: bytes) -> : + block@0: // L118 + return s#0 s#0 + + subroutine test_cases.arc_56.contract.Contract.errors(arg: bytes) -> void: + block@0: // L85 + let tmp%0#0: bytes = ((extract 0 8) arg#0) // on error: Index access is out of bounds + let tmp%1#0: bool = (== tmp%0#0 0x00) + (assert tmp%1#0) // this will error + return + + subroutine test_cases.arc_56.contract.Contract.emitter() -> void: + block@0: // L89 + let length_uint16%0#0: bytes = 0x0006 + let encoded_value%0#0: bytes = (concat length_uint16%0#0 0x68656c6c6f31) + let encoded_tuple_buffer%2#0: bytes = 0x00032a + let encoded_tuple_buffer%3#0: bytes = (concat encoded_tuple_buffer%2#0 encoded_value%0#0) + let event%0#0: bytes = (concat method "SharedStruct(byte[],uint8)" encoded_tuple_buffer%3#0) + (log event%0#0) + let length_uint16%1#0: bytes = 0x0005 + let encoded_value%1#0: bytes = (concat length_uint16%1#0 "hello") + let length_uint16%2#0: bytes = 0x0006 + let encoded_value%2#0: bytes = (concat length_uint16%2#0 0x68656c6c6f32) + let encoded_tuple_buffer%6#0: bytes = 0x00032a + let encoded_tuple_buffer%7#0: bytes = (concat encoded_tuple_buffer%6#0 encoded_value%2#0) + let data_length%2#0: uint64 = (len encoded_value%1#0) + let current_tail_offset%5#0: uint64 = (+ 4u data_length%2#0) + let as_bytes%6#0: bytes = (itob current_tail_offset%5#0) + let offset_as_uint16%3#0: bytes = ((extract 6 2) as_bytes%6#0) + let encoded_tuple_buffer%10#0: bytes = (concat 0x0004 offset_as_uint16%3#0) + let encoded_tuple_buffer%11#0: bytes = (concat encoded_tuple_buffer%10#0 encoded_value%1#0) + let encoded_tuple_buffer%12#0: bytes = (concat encoded_tuple_buffer%11#0 encoded_tuple_buffer%7#0) + let event%1#0: bytes = (concat method "Anonymous(string,(byte[],uint8))" encoded_tuple_buffer%12#0) + (log event%1#0) + return + + subroutine test_cases.arc_56.contract.Contract.conditional_emit(should_emit: bool) -> void: + block@0: // L99 + goto should_emit#0 ? block@1 : block@2 + block@1: // if_body_L102 + let encoded_tuple_buffer%2#0: bytes = 0x000000000000002a000000000000002b + let length_uint16%0#0: bytes = 0x0006 + let encoded_value%0#0: bytes = (concat length_uint16%0#0 0x68656c6c6f33) + let encoded_tuple_buffer%5#0: bytes = 0x00032a + let encoded_tuple_buffer%6#0: bytes = (concat encoded_tuple_buffer%5#0 encoded_value%0#0) + let encoded_tuple_buffer%9#0: bytes = (concat encoded_tuple_buffer%2#0 0x0012) + let encoded_tuple_buffer%10#0: bytes = (concat encoded_tuple_buffer%9#0 encoded_tuple_buffer%6#0) + let event%0#0: bytes = (concat method "Anonymous2((uint64,uint64),(byte[],uint8))" encoded_tuple_buffer%10#0) + (log event%0#0) + goto block@2 + block@2: // after_if_else_L101 + return + + subroutine test_cases.arc_56.contract.Contract.template_value() -> : + block@0: // L108 + return TemplateVar[bytes](TMPL_STRUCT) TemplateVar[uint64](TMPL_AVM_UINT64) TemplateVar[bytes](TMPL_AVM_STRING) TemplateVar[bytes](TMPL_ARC4_UINT8) + + program clear-state: + subroutine algopy.arc4.ARC4Contract.clear_state_program() -> bool: + block@0: // L1 + return 1u \ No newline at end of file diff --git a/test_cases/arc_56/out/Contract.ssa.opt_pass_3.ir b/test_cases/arc_56/out/Contract.ssa.opt_pass_3.ir new file mode 100644 index 0000000000..d3b9acdca5 --- /dev/null +++ b/test_cases/arc_56/out/Contract.ssa.opt_pass_3.ir @@ -0,0 +1,180 @@ +contract test_cases.arc_56.contract.Contract: + program approval: + subroutine algopy.arc4.ARC4Contract.approval_program() -> bool: + block@0: // L1 + let tmp%0#0: bool = test_cases.arc_56.contract.Contract.__puya_arc4_router__() + return tmp%0#0 + + subroutine test_cases.arc_56.contract.Contract.__puya_arc4_router__() -> bool: + block@0: // L41 + let tmp%0#0: uint64 = (txn NumAppArgs) + goto tmp%0#0 ? block@1 : block@11 + block@1: // abi_routing_L41 + let tmp%2#0: bytes = (txna ApplicationArgs 0) + switch tmp%2#0 {method "create()void" => block@2, method "struct_arg((uint64,string,(byte[],uint8)),(byte[],uint8))uint64" => block@3, method "struct_return((uint64,string,(byte[],uint8)))(byte[],uint8)" => block@4, method "emits_error((uint64,string,(byte[],uint8)))void" => block@5, method "emitter()void" => block@6, method "conditional_emit(bool)void" => block@7, method "template_value()((byte[],uint8),uint64,string,uint8)" => block@8, * => return 0u} + block@2: // create_route_L67 + let tmp%3#0: uint64 = (txn OnCompletion) + let tmp%4#0: uint64 = (shl 1u tmp%3#0) + let tmp%5#0: uint64 = (& tmp%4#0 3u) + (assert tmp%5#0) // OnCompletion is one of NoOp, OptIn + return 1u + block@3: // struct_arg_route_L75 + let tmp%6#0: uint64 = (txn OnCompletion) + let tmp%7#0: bool = (! tmp%6#0) + (assert tmp%7#0) // OnCompletion is NoOp + let tmp%8#0: uint64 = (txn ApplicationID) + (assert tmp%8#0) // is not creating + let tmp%10#0: bytes = (txna ApplicationArgs 1) + let tmp%11#0: bytes = (txna ApplicationArgs 2) + let to_encode%0#0: uint64 = test_cases.arc_56.contract.Contract.struct_arg(tmp%10#0, tmp%11#0) + let val_as_bytes%0#0: bytes = (itob to_encode%0#0) + let tmp%12#0: bytes = (concat 0x151f7c75 val_as_bytes%0#0) + (log tmp%12#0) + return 1u + block@4: // struct_return_route_L80 + let tmp%13#0: uint64 = (txn OnCompletion) + let tmp%14#0: bool = (! tmp%13#0) + (assert tmp%14#0) // OnCompletion is NoOp + let tmp%15#0: uint64 = (txn ApplicationID) + (assert tmp%15#0) // is not creating + let tmp%17#0: bytes = (txna ApplicationArgs 1) + let tmp%18#0: bytes = test_cases.arc_56.contract.Contract.struct_return(tmp%17#0) + let tmp%19#0: bytes = (concat 0x151f7c75 tmp%18#0) + (log tmp%19#0) + return 1u + block@5: // emits_error_route_L85 + let tmp%20#0: uint64 = (txn OnCompletion) + let tmp%21#0: bool = (! tmp%20#0) + (assert tmp%21#0) // OnCompletion is NoOp + let tmp%22#0: uint64 = (txn ApplicationID) + (assert tmp%22#0) // is not creating + let tmp%24#0: bytes = (txna ApplicationArgs 1) + test_cases.arc_56.contract.Contract.errors(tmp%24#0) + return 1u + block@6: // emitter_route_L89 + let tmp%25#0: uint64 = (txn OnCompletion) + let tmp%26#0: bool = (! tmp%25#0) + (assert tmp%26#0) // OnCompletion is NoOp + let tmp%27#0: uint64 = (txn ApplicationID) + (assert tmp%27#0) // is not creating + test_cases.arc_56.contract.Contract.emitter() + return 1u + block@7: // conditional_emit_route_L99 + let tmp%29#0: uint64 = (txn OnCompletion) + let tmp%30#0: bool = (! tmp%29#0) + (assert tmp%30#0) // OnCompletion is NoOp + let tmp%31#0: uint64 = (txn ApplicationID) + (assert tmp%31#0) // is not creating + let tmp%33#0: bytes = (txna ApplicationArgs 1) + let tmp%34#0: bool = (getbit tmp%33#0 0u) + test_cases.arc_56.contract.Contract.conditional_emit(tmp%34#0) + return 1u + block@8: // template_value_route_L108 + let tmp%35#0: uint64 = (txn OnCompletion) + let tmp%36#0: bool = (! tmp%35#0) + (assert tmp%36#0) // OnCompletion is NoOp + let tmp%37#0: uint64 = (txn ApplicationID) + (assert tmp%37#0) // is not creating + let (elements_to_encode%0#0: bytes, elements_to_encode%1#0: uint64, elements_to_encode%2#0: bytes, elements_to_encode%3#0: bytes) = test_cases.arc_56.contract.Contract.template_value() + let val_as_bytes%1#0: bytes = (itob elements_to_encode%1#0) + let length%0#0: uint64 = (len elements_to_encode%2#0) + let as_bytes%0#0: bytes = (itob length%0#0) + let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) + let encoded_value%0#0: bytes = (concat length_uint16%0#0 elements_to_encode%2#0) + let data_length%0#0: uint64 = (len elements_to_encode%0#0) + let current_tail_offset%1#0: uint64 = (+ 13u data_length%0#0) + let encoded_tuple_buffer%2#0: bytes = (concat 0x000d val_as_bytes%1#0) + let as_bytes%2#0: bytes = (itob current_tail_offset%1#0) + let offset_as_uint16%1#0: bytes = ((extract 6 2) as_bytes%2#0) + let encoded_tuple_buffer%3#0: bytes = (concat encoded_tuple_buffer%2#0 offset_as_uint16%1#0) + let encoded_tuple_buffer%4#0: bytes = (concat encoded_tuple_buffer%3#0 elements_to_encode%3#0) + let encoded_tuple_buffer%5#0: bytes = (concat encoded_tuple_buffer%4#0 elements_to_encode%0#0) + let encoded_tuple_buffer%6#0: bytes = (concat encoded_tuple_buffer%5#0 encoded_value%0#0) + let tmp%39#0: bytes = (concat 0x151f7c75 encoded_tuple_buffer%6#0) + (log tmp%39#0) + return 1u + block@11: // bare_routing_L41 + let tmp%40#0: uint64 = (txn OnCompletion) + goto_nth [block@12, block@12, block@16, block@16, block@16, block@13][tmp%40#0] else return 0u + block@12: // bare_create_L63 + return 1u + block@13: // transient_L71 + let tmp%41#0: uint64 = (txn ApplicationID) + let tmp%42#0: bool = (! tmp%41#0) + (assert tmp%42#0) // is creating + return 1u + block@16: // after_if_else_L41 + return 0u + + subroutine test_cases.arc_56.contract.Contract.struct_arg(arg: bytes, shared: bytes) -> uint64: + block@0: // L75 + let item_start_offset%0#0: uint64 = (extract_uint16 arg#0 10u) + let item_end_offset%0#0: uint64 = (len arg#0) + let tmp%0#0: bytes = (substring3 arg#0 item_start_offset%0#0 item_end_offset%0#0) + let tmp%1#0: bool = (== tmp%0#0 shared#0) + (assert tmp%1#0) // this might error + return 42u + + subroutine test_cases.arc_56.contract.Contract.struct_return(arg: bytes) -> bytes: + block@0: // L80 + let item_start_offset%0#0: uint64 = (extract_uint16 arg#0 10u) + let item_end_offset%0#0: uint64 = (len arg#0) + let tmp%0#0: bytes = (substring3 arg#0 item_start_offset%0#0 item_end_offset%0#0) + let (echo%0#0: bytes, echo%1#0: bytes) = test_cases.arc_56.contract.echo(tmp%0#0) + let tmp%2#0: bool = (== tmp%0#0 echo%0#0) + (assert tmp%2#0) // this won't error + return tmp%0#0 + + subroutine test_cases.arc_56.contract.echo(s: bytes) -> : + block@0: // L118 + return s#0 s#0 + + subroutine test_cases.arc_56.contract.Contract.errors(arg: bytes) -> void: + block@0: // L85 + let tmp%0#0: bytes = ((extract 0 8) arg#0) // on error: Index access is out of bounds + let tmp%1#0: bool = (== tmp%0#0 0x00) + (assert tmp%1#0) // this will error + return + + subroutine test_cases.arc_56.contract.Contract.emitter() -> void: + block@0: // L89 + let encoded_value%0#0: bytes = 0x000668656c6c6f31 + let encoded_tuple_buffer%3#0: bytes = (concat 0x00032a encoded_value%0#0) + let event%0#0: bytes = (concat method "SharedStruct(byte[],uint8)" encoded_tuple_buffer%3#0) + (log event%0#0) + let encoded_value%1#0: bytes = 0x000568656c6c6f + let encoded_value%2#0: bytes = 0x000668656c6c6f32 + let encoded_tuple_buffer%7#0: bytes = (concat 0x00032a encoded_value%2#0) + let data_length%2#0: uint64 = (len encoded_value%1#0) + let current_tail_offset%5#0: uint64 = (+ 4u data_length%2#0) + let as_bytes%6#0: bytes = (itob current_tail_offset%5#0) + let offset_as_uint16%3#0: bytes = ((extract 6 2) as_bytes%6#0) + let encoded_tuple_buffer%10#0: bytes = (concat 0x0004 offset_as_uint16%3#0) + let encoded_tuple_buffer%11#0: bytes = (concat encoded_tuple_buffer%10#0 encoded_value%1#0) + let encoded_tuple_buffer%12#0: bytes = (concat encoded_tuple_buffer%11#0 encoded_tuple_buffer%7#0) + let event%1#0: bytes = (concat method "Anonymous(string,(byte[],uint8))" encoded_tuple_buffer%12#0) + (log event%1#0) + return + + subroutine test_cases.arc_56.contract.Contract.conditional_emit(should_emit: bool) -> void: + block@0: // L99 + goto should_emit#0 ? block@1 : block@2 + block@1: // if_body_L102 + let encoded_value%0#0: bytes = 0x000668656c6c6f33 + let encoded_tuple_buffer%6#0: bytes = (concat 0x00032a encoded_value%0#0) + let encoded_tuple_buffer%9#0: bytes = 0x000000000000002a000000000000002b0012 + let encoded_tuple_buffer%10#0: bytes = (concat encoded_tuple_buffer%9#0 encoded_tuple_buffer%6#0) + let event%0#0: bytes = (concat method "Anonymous2((uint64,uint64),(byte[],uint8))" encoded_tuple_buffer%10#0) + (log event%0#0) + goto block@2 + block@2: // after_if_else_L101 + return + + subroutine test_cases.arc_56.contract.Contract.template_value() -> : + block@0: // L108 + return TemplateVar[bytes](TMPL_STRUCT) TemplateVar[uint64](TMPL_AVM_UINT64) TemplateVar[bytes](TMPL_AVM_STRING) TemplateVar[bytes](TMPL_ARC4_UINT8) + + program clear-state: + subroutine algopy.arc4.ARC4Contract.clear_state_program() -> bool: + block@0: // L1 + return 1u \ No newline at end of file diff --git a/test_cases/arc_56/out/Contract.ssa.opt_pass_4.ir b/test_cases/arc_56/out/Contract.ssa.opt_pass_4.ir new file mode 100644 index 0000000000..bdd2e431df --- /dev/null +++ b/test_cases/arc_56/out/Contract.ssa.opt_pass_4.ir @@ -0,0 +1,175 @@ +contract test_cases.arc_56.contract.Contract: + program approval: + subroutine algopy.arc4.ARC4Contract.approval_program() -> bool: + block@0: // L1 + let tmp%0#0: bool = test_cases.arc_56.contract.Contract.__puya_arc4_router__() + return tmp%0#0 + + subroutine test_cases.arc_56.contract.Contract.__puya_arc4_router__() -> bool: + block@0: // L41 + let tmp%0#0: uint64 = (txn NumAppArgs) + goto tmp%0#0 ? block@1 : block@11 + block@1: // abi_routing_L41 + let tmp%2#0: bytes = (txna ApplicationArgs 0) + switch tmp%2#0 {method "create()void" => block@2, method "struct_arg((uint64,string,(byte[],uint8)),(byte[],uint8))uint64" => block@3, method "struct_return((uint64,string,(byte[],uint8)))(byte[],uint8)" => block@4, method "emits_error((uint64,string,(byte[],uint8)))void" => block@5, method "emitter()void" => block@6, method "conditional_emit(bool)void" => block@7, method "template_value()((byte[],uint8),uint64,string,uint8)" => block@8, * => return 0u} + block@2: // create_route_L67 + let tmp%3#0: uint64 = (txn OnCompletion) + let tmp%4#0: uint64 = (shl 1u tmp%3#0) + let tmp%5#0: uint64 = (& tmp%4#0 3u) + (assert tmp%5#0) // OnCompletion is one of NoOp, OptIn + return 1u + block@3: // struct_arg_route_L75 + let tmp%6#0: uint64 = (txn OnCompletion) + let tmp%7#0: bool = (! tmp%6#0) + (assert tmp%7#0) // OnCompletion is NoOp + let tmp%8#0: uint64 = (txn ApplicationID) + (assert tmp%8#0) // is not creating + let tmp%10#0: bytes = (txna ApplicationArgs 1) + let tmp%11#0: bytes = (txna ApplicationArgs 2) + let to_encode%0#0: uint64 = test_cases.arc_56.contract.Contract.struct_arg(tmp%10#0, tmp%11#0) + let val_as_bytes%0#0: bytes = (itob to_encode%0#0) + let tmp%12#0: bytes = (concat 0x151f7c75 val_as_bytes%0#0) + (log tmp%12#0) + return 1u + block@4: // struct_return_route_L80 + let tmp%13#0: uint64 = (txn OnCompletion) + let tmp%14#0: bool = (! tmp%13#0) + (assert tmp%14#0) // OnCompletion is NoOp + let tmp%15#0: uint64 = (txn ApplicationID) + (assert tmp%15#0) // is not creating + let tmp%17#0: bytes = (txna ApplicationArgs 1) + let tmp%18#0: bytes = test_cases.arc_56.contract.Contract.struct_return(tmp%17#0) + let tmp%19#0: bytes = (concat 0x151f7c75 tmp%18#0) + (log tmp%19#0) + return 1u + block@5: // emits_error_route_L85 + let tmp%20#0: uint64 = (txn OnCompletion) + let tmp%21#0: bool = (! tmp%20#0) + (assert tmp%21#0) // OnCompletion is NoOp + let tmp%22#0: uint64 = (txn ApplicationID) + (assert tmp%22#0) // is not creating + let tmp%24#0: bytes = (txna ApplicationArgs 1) + test_cases.arc_56.contract.Contract.errors(tmp%24#0) + return 1u + block@6: // emitter_route_L89 + let tmp%25#0: uint64 = (txn OnCompletion) + let tmp%26#0: bool = (! tmp%25#0) + (assert tmp%26#0) // OnCompletion is NoOp + let tmp%27#0: uint64 = (txn ApplicationID) + (assert tmp%27#0) // is not creating + test_cases.arc_56.contract.Contract.emitter() + return 1u + block@7: // conditional_emit_route_L99 + let tmp%29#0: uint64 = (txn OnCompletion) + let tmp%30#0: bool = (! tmp%29#0) + (assert tmp%30#0) // OnCompletion is NoOp + let tmp%31#0: uint64 = (txn ApplicationID) + (assert tmp%31#0) // is not creating + let tmp%33#0: bytes = (txna ApplicationArgs 1) + let tmp%34#0: bool = (getbit tmp%33#0 0u) + test_cases.arc_56.contract.Contract.conditional_emit(tmp%34#0) + return 1u + block@8: // template_value_route_L108 + let tmp%35#0: uint64 = (txn OnCompletion) + let tmp%36#0: bool = (! tmp%35#0) + (assert tmp%36#0) // OnCompletion is NoOp + let tmp%37#0: uint64 = (txn ApplicationID) + (assert tmp%37#0) // is not creating + let (elements_to_encode%0#0: bytes, elements_to_encode%1#0: uint64, elements_to_encode%2#0: bytes, elements_to_encode%3#0: bytes) = test_cases.arc_56.contract.Contract.template_value() + let val_as_bytes%1#0: bytes = (itob elements_to_encode%1#0) + let length%0#0: uint64 = (len elements_to_encode%2#0) + let as_bytes%0#0: bytes = (itob length%0#0) + let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) + let encoded_value%0#0: bytes = (concat length_uint16%0#0 elements_to_encode%2#0) + let data_length%0#0: uint64 = (len elements_to_encode%0#0) + let current_tail_offset%1#0: uint64 = (+ 13u data_length%0#0) + let encoded_tuple_buffer%2#0: bytes = (concat 0x000d val_as_bytes%1#0) + let as_bytes%2#0: bytes = (itob current_tail_offset%1#0) + let offset_as_uint16%1#0: bytes = ((extract 6 2) as_bytes%2#0) + let encoded_tuple_buffer%3#0: bytes = (concat encoded_tuple_buffer%2#0 offset_as_uint16%1#0) + let encoded_tuple_buffer%4#0: bytes = (concat encoded_tuple_buffer%3#0 elements_to_encode%3#0) + let encoded_tuple_buffer%5#0: bytes = (concat encoded_tuple_buffer%4#0 elements_to_encode%0#0) + let encoded_tuple_buffer%6#0: bytes = (concat encoded_tuple_buffer%5#0 encoded_value%0#0) + let tmp%39#0: bytes = (concat 0x151f7c75 encoded_tuple_buffer%6#0) + (log tmp%39#0) + return 1u + block@11: // bare_routing_L41 + let tmp%40#0: uint64 = (txn OnCompletion) + goto_nth [block@12, block@12, block@16, block@16, block@16, block@13][tmp%40#0] else return 0u + block@12: // bare_create_L63 + return 1u + block@13: // transient_L71 + let tmp%41#0: uint64 = (txn ApplicationID) + let tmp%42#0: bool = (! tmp%41#0) + (assert tmp%42#0) // is creating + return 1u + block@16: // after_if_else_L41 + return 0u + + subroutine test_cases.arc_56.contract.Contract.struct_arg(arg: bytes, shared: bytes) -> uint64: + block@0: // L75 + let item_start_offset%0#0: uint64 = (extract_uint16 arg#0 10u) + let item_end_offset%0#0: uint64 = (len arg#0) + let tmp%0#0: bytes = (substring3 arg#0 item_start_offset%0#0 item_end_offset%0#0) + let tmp%1#0: bool = (== tmp%0#0 shared#0) + (assert tmp%1#0) // this might error + return 42u + + subroutine test_cases.arc_56.contract.Contract.struct_return(arg: bytes) -> bytes: + block@0: // L80 + let item_start_offset%0#0: uint64 = (extract_uint16 arg#0 10u) + let item_end_offset%0#0: uint64 = (len arg#0) + let tmp%0#0: bytes = (substring3 arg#0 item_start_offset%0#0 item_end_offset%0#0) + let (echo%0#0: bytes, echo%1#0: bytes) = test_cases.arc_56.contract.echo(tmp%0#0) + let tmp%2#0: bool = (== tmp%0#0 echo%0#0) + (assert tmp%2#0) // this won't error + return tmp%0#0 + + subroutine test_cases.arc_56.contract.echo(s: bytes) -> : + block@0: // L118 + return s#0 s#0 + + subroutine test_cases.arc_56.contract.Contract.errors(arg: bytes) -> void: + block@0: // L85 + let tmp%0#0: bytes = ((extract 0 8) arg#0) // on error: Index access is out of bounds + let tmp%1#0: bool = (== tmp%0#0 0x00) + (assert tmp%1#0) // this will error + return + + subroutine test_cases.arc_56.contract.Contract.emitter() -> void: + block@0: // L89 + let encoded_tuple_buffer%3#0: bytes = 0x00032a000668656c6c6f31 + let event%0#0: bytes = (concat method "SharedStruct(byte[],uint8)" encoded_tuple_buffer%3#0) + (log event%0#0) + let encoded_tuple_buffer%7#0: bytes = 0x00032a000668656c6c6f32 + let data_length%2#0: uint64 = 7u + let current_tail_offset%5#0: uint64 = (+ 4u data_length%2#0) + let as_bytes%6#0: bytes = (itob current_tail_offset%5#0) + let offset_as_uint16%3#0: bytes = ((extract 6 2) as_bytes%6#0) + let encoded_tuple_buffer%10#0: bytes = (concat 0x0004 offset_as_uint16%3#0) + let encoded_tuple_buffer%11#0: bytes = (concat encoded_tuple_buffer%10#0 0x000568656c6c6f) + let encoded_tuple_buffer%12#0: bytes = (concat encoded_tuple_buffer%11#0 encoded_tuple_buffer%7#0) + let event%1#0: bytes = (concat method "Anonymous(string,(byte[],uint8))" encoded_tuple_buffer%12#0) + (log event%1#0) + return + + subroutine test_cases.arc_56.contract.Contract.conditional_emit(should_emit: bool) -> void: + block@0: // L99 + goto should_emit#0 ? block@1 : block@2 + block@1: // if_body_L102 + let encoded_tuple_buffer%6#0: bytes = 0x00032a000668656c6c6f33 + let encoded_tuple_buffer%10#0: bytes = (concat 0x000000000000002a000000000000002b0012 encoded_tuple_buffer%6#0) + let event%0#0: bytes = (concat method "Anonymous2((uint64,uint64),(byte[],uint8))" encoded_tuple_buffer%10#0) + (log event%0#0) + goto block@2 + block@2: // after_if_else_L101 + return + + subroutine test_cases.arc_56.contract.Contract.template_value() -> : + block@0: // L108 + return TemplateVar[bytes](TMPL_STRUCT) TemplateVar[uint64](TMPL_AVM_UINT64) TemplateVar[bytes](TMPL_AVM_STRING) TemplateVar[bytes](TMPL_ARC4_UINT8) + + program clear-state: + subroutine algopy.arc4.ARC4Contract.clear_state_program() -> bool: + block@0: // L1 + return 1u \ No newline at end of file diff --git a/test_cases/arc_56/out/Contract.ssa.opt_pass_5.ir b/test_cases/arc_56/out/Contract.ssa.opt_pass_5.ir new file mode 100644 index 0000000000..37c31601e0 --- /dev/null +++ b/test_cases/arc_56/out/Contract.ssa.opt_pass_5.ir @@ -0,0 +1,171 @@ +contract test_cases.arc_56.contract.Contract: + program approval: + subroutine algopy.arc4.ARC4Contract.approval_program() -> bool: + block@0: // L1 + let tmp%0#0: bool = test_cases.arc_56.contract.Contract.__puya_arc4_router__() + return tmp%0#0 + + subroutine test_cases.arc_56.contract.Contract.__puya_arc4_router__() -> bool: + block@0: // L41 + let tmp%0#0: uint64 = (txn NumAppArgs) + goto tmp%0#0 ? block@1 : block@11 + block@1: // abi_routing_L41 + let tmp%2#0: bytes = (txna ApplicationArgs 0) + switch tmp%2#0 {method "create()void" => block@2, method "struct_arg((uint64,string,(byte[],uint8)),(byte[],uint8))uint64" => block@3, method "struct_return((uint64,string,(byte[],uint8)))(byte[],uint8)" => block@4, method "emits_error((uint64,string,(byte[],uint8)))void" => block@5, method "emitter()void" => block@6, method "conditional_emit(bool)void" => block@7, method "template_value()((byte[],uint8),uint64,string,uint8)" => block@8, * => return 0u} + block@2: // create_route_L67 + let tmp%3#0: uint64 = (txn OnCompletion) + let tmp%4#0: uint64 = (shl 1u tmp%3#0) + let tmp%5#0: uint64 = (& tmp%4#0 3u) + (assert tmp%5#0) // OnCompletion is one of NoOp, OptIn + return 1u + block@3: // struct_arg_route_L75 + let tmp%6#0: uint64 = (txn OnCompletion) + let tmp%7#0: bool = (! tmp%6#0) + (assert tmp%7#0) // OnCompletion is NoOp + let tmp%8#0: uint64 = (txn ApplicationID) + (assert tmp%8#0) // is not creating + let tmp%10#0: bytes = (txna ApplicationArgs 1) + let tmp%11#0: bytes = (txna ApplicationArgs 2) + let to_encode%0#0: uint64 = test_cases.arc_56.contract.Contract.struct_arg(tmp%10#0, tmp%11#0) + let val_as_bytes%0#0: bytes = (itob to_encode%0#0) + let tmp%12#0: bytes = (concat 0x151f7c75 val_as_bytes%0#0) + (log tmp%12#0) + return 1u + block@4: // struct_return_route_L80 + let tmp%13#0: uint64 = (txn OnCompletion) + let tmp%14#0: bool = (! tmp%13#0) + (assert tmp%14#0) // OnCompletion is NoOp + let tmp%15#0: uint64 = (txn ApplicationID) + (assert tmp%15#0) // is not creating + let tmp%17#0: bytes = (txna ApplicationArgs 1) + let tmp%18#0: bytes = test_cases.arc_56.contract.Contract.struct_return(tmp%17#0) + let tmp%19#0: bytes = (concat 0x151f7c75 tmp%18#0) + (log tmp%19#0) + return 1u + block@5: // emits_error_route_L85 + let tmp%20#0: uint64 = (txn OnCompletion) + let tmp%21#0: bool = (! tmp%20#0) + (assert tmp%21#0) // OnCompletion is NoOp + let tmp%22#0: uint64 = (txn ApplicationID) + (assert tmp%22#0) // is not creating + let tmp%24#0: bytes = (txna ApplicationArgs 1) + test_cases.arc_56.contract.Contract.errors(tmp%24#0) + return 1u + block@6: // emitter_route_L89 + let tmp%25#0: uint64 = (txn OnCompletion) + let tmp%26#0: bool = (! tmp%25#0) + (assert tmp%26#0) // OnCompletion is NoOp + let tmp%27#0: uint64 = (txn ApplicationID) + (assert tmp%27#0) // is not creating + test_cases.arc_56.contract.Contract.emitter() + return 1u + block@7: // conditional_emit_route_L99 + let tmp%29#0: uint64 = (txn OnCompletion) + let tmp%30#0: bool = (! tmp%29#0) + (assert tmp%30#0) // OnCompletion is NoOp + let tmp%31#0: uint64 = (txn ApplicationID) + (assert tmp%31#0) // is not creating + let tmp%33#0: bytes = (txna ApplicationArgs 1) + let tmp%34#0: bool = (getbit tmp%33#0 0u) + test_cases.arc_56.contract.Contract.conditional_emit(tmp%34#0) + return 1u + block@8: // template_value_route_L108 + let tmp%35#0: uint64 = (txn OnCompletion) + let tmp%36#0: bool = (! tmp%35#0) + (assert tmp%36#0) // OnCompletion is NoOp + let tmp%37#0: uint64 = (txn ApplicationID) + (assert tmp%37#0) // is not creating + let (elements_to_encode%0#0: bytes, elements_to_encode%1#0: uint64, elements_to_encode%2#0: bytes, elements_to_encode%3#0: bytes) = test_cases.arc_56.contract.Contract.template_value() + let val_as_bytes%1#0: bytes = (itob elements_to_encode%1#0) + let length%0#0: uint64 = (len elements_to_encode%2#0) + let as_bytes%0#0: bytes = (itob length%0#0) + let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) + let encoded_value%0#0: bytes = (concat length_uint16%0#0 elements_to_encode%2#0) + let data_length%0#0: uint64 = (len elements_to_encode%0#0) + let current_tail_offset%1#0: uint64 = (+ 13u data_length%0#0) + let encoded_tuple_buffer%2#0: bytes = (concat 0x000d val_as_bytes%1#0) + let as_bytes%2#0: bytes = (itob current_tail_offset%1#0) + let offset_as_uint16%1#0: bytes = ((extract 6 2) as_bytes%2#0) + let encoded_tuple_buffer%3#0: bytes = (concat encoded_tuple_buffer%2#0 offset_as_uint16%1#0) + let encoded_tuple_buffer%4#0: bytes = (concat encoded_tuple_buffer%3#0 elements_to_encode%3#0) + let encoded_tuple_buffer%5#0: bytes = (concat encoded_tuple_buffer%4#0 elements_to_encode%0#0) + let encoded_tuple_buffer%6#0: bytes = (concat encoded_tuple_buffer%5#0 encoded_value%0#0) + let tmp%39#0: bytes = (concat 0x151f7c75 encoded_tuple_buffer%6#0) + (log tmp%39#0) + return 1u + block@11: // bare_routing_L41 + let tmp%40#0: uint64 = (txn OnCompletion) + goto_nth [block@12, block@12, block@16, block@16, block@16, block@13][tmp%40#0] else return 0u + block@12: // bare_create_L63 + return 1u + block@13: // transient_L71 + let tmp%41#0: uint64 = (txn ApplicationID) + let tmp%42#0: bool = (! tmp%41#0) + (assert tmp%42#0) // is creating + return 1u + block@16: // after_if_else_L41 + return 0u + + subroutine test_cases.arc_56.contract.Contract.struct_arg(arg: bytes, shared: bytes) -> uint64: + block@0: // L75 + let item_start_offset%0#0: uint64 = (extract_uint16 arg#0 10u) + let item_end_offset%0#0: uint64 = (len arg#0) + let tmp%0#0: bytes = (substring3 arg#0 item_start_offset%0#0 item_end_offset%0#0) + let tmp%1#0: bool = (== tmp%0#0 shared#0) + (assert tmp%1#0) // this might error + return 42u + + subroutine test_cases.arc_56.contract.Contract.struct_return(arg: bytes) -> bytes: + block@0: // L80 + let item_start_offset%0#0: uint64 = (extract_uint16 arg#0 10u) + let item_end_offset%0#0: uint64 = (len arg#0) + let tmp%0#0: bytes = (substring3 arg#0 item_start_offset%0#0 item_end_offset%0#0) + let (echo%0#0: bytes, echo%1#0: bytes) = test_cases.arc_56.contract.echo(tmp%0#0) + let tmp%2#0: bool = (== tmp%0#0 echo%0#0) + (assert tmp%2#0) // this won't error + return tmp%0#0 + + subroutine test_cases.arc_56.contract.echo(s: bytes) -> : + block@0: // L118 + return s#0 s#0 + + subroutine test_cases.arc_56.contract.Contract.errors(arg: bytes) -> void: + block@0: // L85 + let tmp%0#0: bytes = ((extract 0 8) arg#0) // on error: Index access is out of bounds + let tmp%1#0: bool = (== tmp%0#0 0x00) + (assert tmp%1#0) // this will error + return + + subroutine test_cases.arc_56.contract.Contract.emitter() -> void: + block@0: // L89 + let event%0#0: bytes = (concat method "SharedStruct(byte[],uint8)" 0x00032a000668656c6c6f31) + (log event%0#0) + let current_tail_offset%5#0: uint64 = 11u + let as_bytes%6#0: bytes = (itob current_tail_offset%5#0) + let offset_as_uint16%3#0: bytes = ((extract 6 2) as_bytes%6#0) + let encoded_tuple_buffer%10#0: bytes = (concat 0x0004 offset_as_uint16%3#0) + let encoded_tuple_buffer%11#0: bytes = (concat encoded_tuple_buffer%10#0 0x000568656c6c6f) + let encoded_tuple_buffer%12#0: bytes = (concat encoded_tuple_buffer%11#0 0x00032a000668656c6c6f32) + let event%1#0: bytes = (concat method "Anonymous(string,(byte[],uint8))" encoded_tuple_buffer%12#0) + (log event%1#0) + return + + subroutine test_cases.arc_56.contract.Contract.conditional_emit(should_emit: bool) -> void: + block@0: // L99 + goto should_emit#0 ? block@1 : block@2 + block@1: // if_body_L102 + let encoded_tuple_buffer%10#0: bytes = 0x000000000000002a000000000000002b001200032a000668656c6c6f33 + let event%0#0: bytes = (concat method "Anonymous2((uint64,uint64),(byte[],uint8))" encoded_tuple_buffer%10#0) + (log event%0#0) + goto block@2 + block@2: // after_if_else_L101 + return + + subroutine test_cases.arc_56.contract.Contract.template_value() -> : + block@0: // L108 + return TemplateVar[bytes](TMPL_STRUCT) TemplateVar[uint64](TMPL_AVM_UINT64) TemplateVar[bytes](TMPL_AVM_STRING) TemplateVar[bytes](TMPL_ARC4_UINT8) + + program clear-state: + subroutine algopy.arc4.ARC4Contract.clear_state_program() -> bool: + block@0: // L1 + return 1u \ No newline at end of file diff --git a/test_cases/arc_56/out/Contract.ssa.opt_pass_6.ir b/test_cases/arc_56/out/Contract.ssa.opt_pass_6.ir new file mode 100644 index 0000000000..7c4b9d7d07 --- /dev/null +++ b/test_cases/arc_56/out/Contract.ssa.opt_pass_6.ir @@ -0,0 +1,168 @@ +contract test_cases.arc_56.contract.Contract: + program approval: + subroutine algopy.arc4.ARC4Contract.approval_program() -> bool: + block@0: // L1 + let tmp%0#0: bool = test_cases.arc_56.contract.Contract.__puya_arc4_router__() + return tmp%0#0 + + subroutine test_cases.arc_56.contract.Contract.__puya_arc4_router__() -> bool: + block@0: // L41 + let tmp%0#0: uint64 = (txn NumAppArgs) + goto tmp%0#0 ? block@1 : block@11 + block@1: // abi_routing_L41 + let tmp%2#0: bytes = (txna ApplicationArgs 0) + switch tmp%2#0 {method "create()void" => block@2, method "struct_arg((uint64,string,(byte[],uint8)),(byte[],uint8))uint64" => block@3, method "struct_return((uint64,string,(byte[],uint8)))(byte[],uint8)" => block@4, method "emits_error((uint64,string,(byte[],uint8)))void" => block@5, method "emitter()void" => block@6, method "conditional_emit(bool)void" => block@7, method "template_value()((byte[],uint8),uint64,string,uint8)" => block@8, * => return 0u} + block@2: // create_route_L67 + let tmp%3#0: uint64 = (txn OnCompletion) + let tmp%4#0: uint64 = (shl 1u tmp%3#0) + let tmp%5#0: uint64 = (& tmp%4#0 3u) + (assert tmp%5#0) // OnCompletion is one of NoOp, OptIn + return 1u + block@3: // struct_arg_route_L75 + let tmp%6#0: uint64 = (txn OnCompletion) + let tmp%7#0: bool = (! tmp%6#0) + (assert tmp%7#0) // OnCompletion is NoOp + let tmp%8#0: uint64 = (txn ApplicationID) + (assert tmp%8#0) // is not creating + let tmp%10#0: bytes = (txna ApplicationArgs 1) + let tmp%11#0: bytes = (txna ApplicationArgs 2) + let to_encode%0#0: uint64 = test_cases.arc_56.contract.Contract.struct_arg(tmp%10#0, tmp%11#0) + let val_as_bytes%0#0: bytes = (itob to_encode%0#0) + let tmp%12#0: bytes = (concat 0x151f7c75 val_as_bytes%0#0) + (log tmp%12#0) + return 1u + block@4: // struct_return_route_L80 + let tmp%13#0: uint64 = (txn OnCompletion) + let tmp%14#0: bool = (! tmp%13#0) + (assert tmp%14#0) // OnCompletion is NoOp + let tmp%15#0: uint64 = (txn ApplicationID) + (assert tmp%15#0) // is not creating + let tmp%17#0: bytes = (txna ApplicationArgs 1) + let tmp%18#0: bytes = test_cases.arc_56.contract.Contract.struct_return(tmp%17#0) + let tmp%19#0: bytes = (concat 0x151f7c75 tmp%18#0) + (log tmp%19#0) + return 1u + block@5: // emits_error_route_L85 + let tmp%20#0: uint64 = (txn OnCompletion) + let tmp%21#0: bool = (! tmp%20#0) + (assert tmp%21#0) // OnCompletion is NoOp + let tmp%22#0: uint64 = (txn ApplicationID) + (assert tmp%22#0) // is not creating + let tmp%24#0: bytes = (txna ApplicationArgs 1) + test_cases.arc_56.contract.Contract.errors(tmp%24#0) + return 1u + block@6: // emitter_route_L89 + let tmp%25#0: uint64 = (txn OnCompletion) + let tmp%26#0: bool = (! tmp%25#0) + (assert tmp%26#0) // OnCompletion is NoOp + let tmp%27#0: uint64 = (txn ApplicationID) + (assert tmp%27#0) // is not creating + test_cases.arc_56.contract.Contract.emitter() + return 1u + block@7: // conditional_emit_route_L99 + let tmp%29#0: uint64 = (txn OnCompletion) + let tmp%30#0: bool = (! tmp%29#0) + (assert tmp%30#0) // OnCompletion is NoOp + let tmp%31#0: uint64 = (txn ApplicationID) + (assert tmp%31#0) // is not creating + let tmp%33#0: bytes = (txna ApplicationArgs 1) + let tmp%34#0: bool = (getbit tmp%33#0 0u) + test_cases.arc_56.contract.Contract.conditional_emit(tmp%34#0) + return 1u + block@8: // template_value_route_L108 + let tmp%35#0: uint64 = (txn OnCompletion) + let tmp%36#0: bool = (! tmp%35#0) + (assert tmp%36#0) // OnCompletion is NoOp + let tmp%37#0: uint64 = (txn ApplicationID) + (assert tmp%37#0) // is not creating + let (elements_to_encode%0#0: bytes, elements_to_encode%1#0: uint64, elements_to_encode%2#0: bytes, elements_to_encode%3#0: bytes) = test_cases.arc_56.contract.Contract.template_value() + let val_as_bytes%1#0: bytes = (itob elements_to_encode%1#0) + let length%0#0: uint64 = (len elements_to_encode%2#0) + let as_bytes%0#0: bytes = (itob length%0#0) + let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) + let encoded_value%0#0: bytes = (concat length_uint16%0#0 elements_to_encode%2#0) + let data_length%0#0: uint64 = (len elements_to_encode%0#0) + let current_tail_offset%1#0: uint64 = (+ 13u data_length%0#0) + let encoded_tuple_buffer%2#0: bytes = (concat 0x000d val_as_bytes%1#0) + let as_bytes%2#0: bytes = (itob current_tail_offset%1#0) + let offset_as_uint16%1#0: bytes = ((extract 6 2) as_bytes%2#0) + let encoded_tuple_buffer%3#0: bytes = (concat encoded_tuple_buffer%2#0 offset_as_uint16%1#0) + let encoded_tuple_buffer%4#0: bytes = (concat encoded_tuple_buffer%3#0 elements_to_encode%3#0) + let encoded_tuple_buffer%5#0: bytes = (concat encoded_tuple_buffer%4#0 elements_to_encode%0#0) + let encoded_tuple_buffer%6#0: bytes = (concat encoded_tuple_buffer%5#0 encoded_value%0#0) + let tmp%39#0: bytes = (concat 0x151f7c75 encoded_tuple_buffer%6#0) + (log tmp%39#0) + return 1u + block@11: // bare_routing_L41 + let tmp%40#0: uint64 = (txn OnCompletion) + goto_nth [block@12, block@12, block@16, block@16, block@16, block@13][tmp%40#0] else return 0u + block@12: // bare_create_L63 + return 1u + block@13: // transient_L71 + let tmp%41#0: uint64 = (txn ApplicationID) + let tmp%42#0: bool = (! tmp%41#0) + (assert tmp%42#0) // is creating + return 1u + block@16: // after_if_else_L41 + return 0u + + subroutine test_cases.arc_56.contract.Contract.struct_arg(arg: bytes, shared: bytes) -> uint64: + block@0: // L75 + let item_start_offset%0#0: uint64 = (extract_uint16 arg#0 10u) + let item_end_offset%0#0: uint64 = (len arg#0) + let tmp%0#0: bytes = (substring3 arg#0 item_start_offset%0#0 item_end_offset%0#0) + let tmp%1#0: bool = (== tmp%0#0 shared#0) + (assert tmp%1#0) // this might error + return 42u + + subroutine test_cases.arc_56.contract.Contract.struct_return(arg: bytes) -> bytes: + block@0: // L80 + let item_start_offset%0#0: uint64 = (extract_uint16 arg#0 10u) + let item_end_offset%0#0: uint64 = (len arg#0) + let tmp%0#0: bytes = (substring3 arg#0 item_start_offset%0#0 item_end_offset%0#0) + let (echo%0#0: bytes, echo%1#0: bytes) = test_cases.arc_56.contract.echo(tmp%0#0) + let tmp%2#0: bool = (== tmp%0#0 echo%0#0) + (assert tmp%2#0) // this won't error + return tmp%0#0 + + subroutine test_cases.arc_56.contract.echo(s: bytes) -> : + block@0: // L118 + return s#0 s#0 + + subroutine test_cases.arc_56.contract.Contract.errors(arg: bytes) -> void: + block@0: // L85 + let tmp%0#0: bytes = ((extract 0 8) arg#0) // on error: Index access is out of bounds + let tmp%1#0: bool = (== tmp%0#0 0x00) + (assert tmp%1#0) // this will error + return + + subroutine test_cases.arc_56.contract.Contract.emitter() -> void: + block@0: // L89 + let event%0#0: bytes = (concat method "SharedStruct(byte[],uint8)" 0x00032a000668656c6c6f31) + (log event%0#0) + let offset_as_uint16%3#0: bytes = 0x000b + let encoded_tuple_buffer%10#0: bytes = (concat 0x0004 offset_as_uint16%3#0) + let encoded_tuple_buffer%11#0: bytes = (concat encoded_tuple_buffer%10#0 0x000568656c6c6f) + let encoded_tuple_buffer%12#0: bytes = (concat encoded_tuple_buffer%11#0 0x00032a000668656c6c6f32) + let event%1#0: bytes = (concat method "Anonymous(string,(byte[],uint8))" encoded_tuple_buffer%12#0) + (log event%1#0) + return + + subroutine test_cases.arc_56.contract.Contract.conditional_emit(should_emit: bool) -> void: + block@0: // L99 + goto should_emit#0 ? block@1 : block@2 + block@1: // if_body_L102 + let event%0#0: bytes = (concat method "Anonymous2((uint64,uint64),(byte[],uint8))" 0x000000000000002a000000000000002b001200032a000668656c6c6f33) + (log event%0#0) + goto block@2 + block@2: // after_if_else_L101 + return + + subroutine test_cases.arc_56.contract.Contract.template_value() -> : + block@0: // L108 + return TemplateVar[bytes](TMPL_STRUCT) TemplateVar[uint64](TMPL_AVM_UINT64) TemplateVar[bytes](TMPL_AVM_STRING) TemplateVar[bytes](TMPL_ARC4_UINT8) + + program clear-state: + subroutine algopy.arc4.ARC4Contract.clear_state_program() -> bool: + block@0: // L1 + return 1u \ No newline at end of file diff --git a/test_cases/arc_56/out/Contract.ssa.opt_pass_7.ir b/test_cases/arc_56/out/Contract.ssa.opt_pass_7.ir new file mode 100644 index 0000000000..796c282631 --- /dev/null +++ b/test_cases/arc_56/out/Contract.ssa.opt_pass_7.ir @@ -0,0 +1,167 @@ +contract test_cases.arc_56.contract.Contract: + program approval: + subroutine algopy.arc4.ARC4Contract.approval_program() -> bool: + block@0: // L1 + let tmp%0#0: bool = test_cases.arc_56.contract.Contract.__puya_arc4_router__() + return tmp%0#0 + + subroutine test_cases.arc_56.contract.Contract.__puya_arc4_router__() -> bool: + block@0: // L41 + let tmp%0#0: uint64 = (txn NumAppArgs) + goto tmp%0#0 ? block@1 : block@11 + block@1: // abi_routing_L41 + let tmp%2#0: bytes = (txna ApplicationArgs 0) + switch tmp%2#0 {method "create()void" => block@2, method "struct_arg((uint64,string,(byte[],uint8)),(byte[],uint8))uint64" => block@3, method "struct_return((uint64,string,(byte[],uint8)))(byte[],uint8)" => block@4, method "emits_error((uint64,string,(byte[],uint8)))void" => block@5, method "emitter()void" => block@6, method "conditional_emit(bool)void" => block@7, method "template_value()((byte[],uint8),uint64,string,uint8)" => block@8, * => return 0u} + block@2: // create_route_L67 + let tmp%3#0: uint64 = (txn OnCompletion) + let tmp%4#0: uint64 = (shl 1u tmp%3#0) + let tmp%5#0: uint64 = (& tmp%4#0 3u) + (assert tmp%5#0) // OnCompletion is one of NoOp, OptIn + return 1u + block@3: // struct_arg_route_L75 + let tmp%6#0: uint64 = (txn OnCompletion) + let tmp%7#0: bool = (! tmp%6#0) + (assert tmp%7#0) // OnCompletion is NoOp + let tmp%8#0: uint64 = (txn ApplicationID) + (assert tmp%8#0) // is not creating + let tmp%10#0: bytes = (txna ApplicationArgs 1) + let tmp%11#0: bytes = (txna ApplicationArgs 2) + let to_encode%0#0: uint64 = test_cases.arc_56.contract.Contract.struct_arg(tmp%10#0, tmp%11#0) + let val_as_bytes%0#0: bytes = (itob to_encode%0#0) + let tmp%12#0: bytes = (concat 0x151f7c75 val_as_bytes%0#0) + (log tmp%12#0) + return 1u + block@4: // struct_return_route_L80 + let tmp%13#0: uint64 = (txn OnCompletion) + let tmp%14#0: bool = (! tmp%13#0) + (assert tmp%14#0) // OnCompletion is NoOp + let tmp%15#0: uint64 = (txn ApplicationID) + (assert tmp%15#0) // is not creating + let tmp%17#0: bytes = (txna ApplicationArgs 1) + let tmp%18#0: bytes = test_cases.arc_56.contract.Contract.struct_return(tmp%17#0) + let tmp%19#0: bytes = (concat 0x151f7c75 tmp%18#0) + (log tmp%19#0) + return 1u + block@5: // emits_error_route_L85 + let tmp%20#0: uint64 = (txn OnCompletion) + let tmp%21#0: bool = (! tmp%20#0) + (assert tmp%21#0) // OnCompletion is NoOp + let tmp%22#0: uint64 = (txn ApplicationID) + (assert tmp%22#0) // is not creating + let tmp%24#0: bytes = (txna ApplicationArgs 1) + test_cases.arc_56.contract.Contract.errors(tmp%24#0) + return 1u + block@6: // emitter_route_L89 + let tmp%25#0: uint64 = (txn OnCompletion) + let tmp%26#0: bool = (! tmp%25#0) + (assert tmp%26#0) // OnCompletion is NoOp + let tmp%27#0: uint64 = (txn ApplicationID) + (assert tmp%27#0) // is not creating + test_cases.arc_56.contract.Contract.emitter() + return 1u + block@7: // conditional_emit_route_L99 + let tmp%29#0: uint64 = (txn OnCompletion) + let tmp%30#0: bool = (! tmp%29#0) + (assert tmp%30#0) // OnCompletion is NoOp + let tmp%31#0: uint64 = (txn ApplicationID) + (assert tmp%31#0) // is not creating + let tmp%33#0: bytes = (txna ApplicationArgs 1) + let tmp%34#0: bool = (getbit tmp%33#0 0u) + test_cases.arc_56.contract.Contract.conditional_emit(tmp%34#0) + return 1u + block@8: // template_value_route_L108 + let tmp%35#0: uint64 = (txn OnCompletion) + let tmp%36#0: bool = (! tmp%35#0) + (assert tmp%36#0) // OnCompletion is NoOp + let tmp%37#0: uint64 = (txn ApplicationID) + (assert tmp%37#0) // is not creating + let (elements_to_encode%0#0: bytes, elements_to_encode%1#0: uint64, elements_to_encode%2#0: bytes, elements_to_encode%3#0: bytes) = test_cases.arc_56.contract.Contract.template_value() + let val_as_bytes%1#0: bytes = (itob elements_to_encode%1#0) + let length%0#0: uint64 = (len elements_to_encode%2#0) + let as_bytes%0#0: bytes = (itob length%0#0) + let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) + let encoded_value%0#0: bytes = (concat length_uint16%0#0 elements_to_encode%2#0) + let data_length%0#0: uint64 = (len elements_to_encode%0#0) + let current_tail_offset%1#0: uint64 = (+ 13u data_length%0#0) + let encoded_tuple_buffer%2#0: bytes = (concat 0x000d val_as_bytes%1#0) + let as_bytes%2#0: bytes = (itob current_tail_offset%1#0) + let offset_as_uint16%1#0: bytes = ((extract 6 2) as_bytes%2#0) + let encoded_tuple_buffer%3#0: bytes = (concat encoded_tuple_buffer%2#0 offset_as_uint16%1#0) + let encoded_tuple_buffer%4#0: bytes = (concat encoded_tuple_buffer%3#0 elements_to_encode%3#0) + let encoded_tuple_buffer%5#0: bytes = (concat encoded_tuple_buffer%4#0 elements_to_encode%0#0) + let encoded_tuple_buffer%6#0: bytes = (concat encoded_tuple_buffer%5#0 encoded_value%0#0) + let tmp%39#0: bytes = (concat 0x151f7c75 encoded_tuple_buffer%6#0) + (log tmp%39#0) + return 1u + block@11: // bare_routing_L41 + let tmp%40#0: uint64 = (txn OnCompletion) + goto_nth [block@12, block@12, block@16, block@16, block@16, block@13][tmp%40#0] else return 0u + block@12: // bare_create_L63 + return 1u + block@13: // transient_L71 + let tmp%41#0: uint64 = (txn ApplicationID) + let tmp%42#0: bool = (! tmp%41#0) + (assert tmp%42#0) // is creating + return 1u + block@16: // after_if_else_L41 + return 0u + + subroutine test_cases.arc_56.contract.Contract.struct_arg(arg: bytes, shared: bytes) -> uint64: + block@0: // L75 + let item_start_offset%0#0: uint64 = (extract_uint16 arg#0 10u) + let item_end_offset%0#0: uint64 = (len arg#0) + let tmp%0#0: bytes = (substring3 arg#0 item_start_offset%0#0 item_end_offset%0#0) + let tmp%1#0: bool = (== tmp%0#0 shared#0) + (assert tmp%1#0) // this might error + return 42u + + subroutine test_cases.arc_56.contract.Contract.struct_return(arg: bytes) -> bytes: + block@0: // L80 + let item_start_offset%0#0: uint64 = (extract_uint16 arg#0 10u) + let item_end_offset%0#0: uint64 = (len arg#0) + let tmp%0#0: bytes = (substring3 arg#0 item_start_offset%0#0 item_end_offset%0#0) + let (echo%0#0: bytes, echo%1#0: bytes) = test_cases.arc_56.contract.echo(tmp%0#0) + let tmp%2#0: bool = (== tmp%0#0 echo%0#0) + (assert tmp%2#0) // this won't error + return tmp%0#0 + + subroutine test_cases.arc_56.contract.echo(s: bytes) -> : + block@0: // L118 + return s#0 s#0 + + subroutine test_cases.arc_56.contract.Contract.errors(arg: bytes) -> void: + block@0: // L85 + let tmp%0#0: bytes = ((extract 0 8) arg#0) // on error: Index access is out of bounds + let tmp%1#0: bool = (== tmp%0#0 0x00) + (assert tmp%1#0) // this will error + return + + subroutine test_cases.arc_56.contract.Contract.emitter() -> void: + block@0: // L89 + let event%0#0: bytes = (concat method "SharedStruct(byte[],uint8)" 0x00032a000668656c6c6f31) + (log event%0#0) + let encoded_tuple_buffer%10#0: bytes = 0x0004000b + let encoded_tuple_buffer%11#0: bytes = (concat encoded_tuple_buffer%10#0 0x000568656c6c6f) + let encoded_tuple_buffer%12#0: bytes = (concat encoded_tuple_buffer%11#0 0x00032a000668656c6c6f32) + let event%1#0: bytes = (concat method "Anonymous(string,(byte[],uint8))" encoded_tuple_buffer%12#0) + (log event%1#0) + return + + subroutine test_cases.arc_56.contract.Contract.conditional_emit(should_emit: bool) -> void: + block@0: // L99 + goto should_emit#0 ? block@1 : block@2 + block@1: // if_body_L102 + let event%0#0: bytes = (concat method "Anonymous2((uint64,uint64),(byte[],uint8))" 0x000000000000002a000000000000002b001200032a000668656c6c6f33) + (log event%0#0) + goto block@2 + block@2: // after_if_else_L101 + return + + subroutine test_cases.arc_56.contract.Contract.template_value() -> : + block@0: // L108 + return TemplateVar[bytes](TMPL_STRUCT) TemplateVar[uint64](TMPL_AVM_UINT64) TemplateVar[bytes](TMPL_AVM_STRING) TemplateVar[bytes](TMPL_ARC4_UINT8) + + program clear-state: + subroutine algopy.arc4.ARC4Contract.clear_state_program() -> bool: + block@0: // L1 + return 1u \ No newline at end of file diff --git a/test_cases/arc_56/out/Contract.ssa.opt_pass_8.ir b/test_cases/arc_56/out/Contract.ssa.opt_pass_8.ir new file mode 100644 index 0000000000..6b12f79fe7 --- /dev/null +++ b/test_cases/arc_56/out/Contract.ssa.opt_pass_8.ir @@ -0,0 +1,166 @@ +contract test_cases.arc_56.contract.Contract: + program approval: + subroutine algopy.arc4.ARC4Contract.approval_program() -> bool: + block@0: // L1 + let tmp%0#0: bool = test_cases.arc_56.contract.Contract.__puya_arc4_router__() + return tmp%0#0 + + subroutine test_cases.arc_56.contract.Contract.__puya_arc4_router__() -> bool: + block@0: // L41 + let tmp%0#0: uint64 = (txn NumAppArgs) + goto tmp%0#0 ? block@1 : block@11 + block@1: // abi_routing_L41 + let tmp%2#0: bytes = (txna ApplicationArgs 0) + switch tmp%2#0 {method "create()void" => block@2, method "struct_arg((uint64,string,(byte[],uint8)),(byte[],uint8))uint64" => block@3, method "struct_return((uint64,string,(byte[],uint8)))(byte[],uint8)" => block@4, method "emits_error((uint64,string,(byte[],uint8)))void" => block@5, method "emitter()void" => block@6, method "conditional_emit(bool)void" => block@7, method "template_value()((byte[],uint8),uint64,string,uint8)" => block@8, * => return 0u} + block@2: // create_route_L67 + let tmp%3#0: uint64 = (txn OnCompletion) + let tmp%4#0: uint64 = (shl 1u tmp%3#0) + let tmp%5#0: uint64 = (& tmp%4#0 3u) + (assert tmp%5#0) // OnCompletion is one of NoOp, OptIn + return 1u + block@3: // struct_arg_route_L75 + let tmp%6#0: uint64 = (txn OnCompletion) + let tmp%7#0: bool = (! tmp%6#0) + (assert tmp%7#0) // OnCompletion is NoOp + let tmp%8#0: uint64 = (txn ApplicationID) + (assert tmp%8#0) // is not creating + let tmp%10#0: bytes = (txna ApplicationArgs 1) + let tmp%11#0: bytes = (txna ApplicationArgs 2) + let to_encode%0#0: uint64 = test_cases.arc_56.contract.Contract.struct_arg(tmp%10#0, tmp%11#0) + let val_as_bytes%0#0: bytes = (itob to_encode%0#0) + let tmp%12#0: bytes = (concat 0x151f7c75 val_as_bytes%0#0) + (log tmp%12#0) + return 1u + block@4: // struct_return_route_L80 + let tmp%13#0: uint64 = (txn OnCompletion) + let tmp%14#0: bool = (! tmp%13#0) + (assert tmp%14#0) // OnCompletion is NoOp + let tmp%15#0: uint64 = (txn ApplicationID) + (assert tmp%15#0) // is not creating + let tmp%17#0: bytes = (txna ApplicationArgs 1) + let tmp%18#0: bytes = test_cases.arc_56.contract.Contract.struct_return(tmp%17#0) + let tmp%19#0: bytes = (concat 0x151f7c75 tmp%18#0) + (log tmp%19#0) + return 1u + block@5: // emits_error_route_L85 + let tmp%20#0: uint64 = (txn OnCompletion) + let tmp%21#0: bool = (! tmp%20#0) + (assert tmp%21#0) // OnCompletion is NoOp + let tmp%22#0: uint64 = (txn ApplicationID) + (assert tmp%22#0) // is not creating + let tmp%24#0: bytes = (txna ApplicationArgs 1) + test_cases.arc_56.contract.Contract.errors(tmp%24#0) + return 1u + block@6: // emitter_route_L89 + let tmp%25#0: uint64 = (txn OnCompletion) + let tmp%26#0: bool = (! tmp%25#0) + (assert tmp%26#0) // OnCompletion is NoOp + let tmp%27#0: uint64 = (txn ApplicationID) + (assert tmp%27#0) // is not creating + test_cases.arc_56.contract.Contract.emitter() + return 1u + block@7: // conditional_emit_route_L99 + let tmp%29#0: uint64 = (txn OnCompletion) + let tmp%30#0: bool = (! tmp%29#0) + (assert tmp%30#0) // OnCompletion is NoOp + let tmp%31#0: uint64 = (txn ApplicationID) + (assert tmp%31#0) // is not creating + let tmp%33#0: bytes = (txna ApplicationArgs 1) + let tmp%34#0: bool = (getbit tmp%33#0 0u) + test_cases.arc_56.contract.Contract.conditional_emit(tmp%34#0) + return 1u + block@8: // template_value_route_L108 + let tmp%35#0: uint64 = (txn OnCompletion) + let tmp%36#0: bool = (! tmp%35#0) + (assert tmp%36#0) // OnCompletion is NoOp + let tmp%37#0: uint64 = (txn ApplicationID) + (assert tmp%37#0) // is not creating + let (elements_to_encode%0#0: bytes, elements_to_encode%1#0: uint64, elements_to_encode%2#0: bytes, elements_to_encode%3#0: bytes) = test_cases.arc_56.contract.Contract.template_value() + let val_as_bytes%1#0: bytes = (itob elements_to_encode%1#0) + let length%0#0: uint64 = (len elements_to_encode%2#0) + let as_bytes%0#0: bytes = (itob length%0#0) + let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) + let encoded_value%0#0: bytes = (concat length_uint16%0#0 elements_to_encode%2#0) + let data_length%0#0: uint64 = (len elements_to_encode%0#0) + let current_tail_offset%1#0: uint64 = (+ 13u data_length%0#0) + let encoded_tuple_buffer%2#0: bytes = (concat 0x000d val_as_bytes%1#0) + let as_bytes%2#0: bytes = (itob current_tail_offset%1#0) + let offset_as_uint16%1#0: bytes = ((extract 6 2) as_bytes%2#0) + let encoded_tuple_buffer%3#0: bytes = (concat encoded_tuple_buffer%2#0 offset_as_uint16%1#0) + let encoded_tuple_buffer%4#0: bytes = (concat encoded_tuple_buffer%3#0 elements_to_encode%3#0) + let encoded_tuple_buffer%5#0: bytes = (concat encoded_tuple_buffer%4#0 elements_to_encode%0#0) + let encoded_tuple_buffer%6#0: bytes = (concat encoded_tuple_buffer%5#0 encoded_value%0#0) + let tmp%39#0: bytes = (concat 0x151f7c75 encoded_tuple_buffer%6#0) + (log tmp%39#0) + return 1u + block@11: // bare_routing_L41 + let tmp%40#0: uint64 = (txn OnCompletion) + goto_nth [block@12, block@12, block@16, block@16, block@16, block@13][tmp%40#0] else return 0u + block@12: // bare_create_L63 + return 1u + block@13: // transient_L71 + let tmp%41#0: uint64 = (txn ApplicationID) + let tmp%42#0: bool = (! tmp%41#0) + (assert tmp%42#0) // is creating + return 1u + block@16: // after_if_else_L41 + return 0u + + subroutine test_cases.arc_56.contract.Contract.struct_arg(arg: bytes, shared: bytes) -> uint64: + block@0: // L75 + let item_start_offset%0#0: uint64 = (extract_uint16 arg#0 10u) + let item_end_offset%0#0: uint64 = (len arg#0) + let tmp%0#0: bytes = (substring3 arg#0 item_start_offset%0#0 item_end_offset%0#0) + let tmp%1#0: bool = (== tmp%0#0 shared#0) + (assert tmp%1#0) // this might error + return 42u + + subroutine test_cases.arc_56.contract.Contract.struct_return(arg: bytes) -> bytes: + block@0: // L80 + let item_start_offset%0#0: uint64 = (extract_uint16 arg#0 10u) + let item_end_offset%0#0: uint64 = (len arg#0) + let tmp%0#0: bytes = (substring3 arg#0 item_start_offset%0#0 item_end_offset%0#0) + let (echo%0#0: bytes, echo%1#0: bytes) = test_cases.arc_56.contract.echo(tmp%0#0) + let tmp%2#0: bool = (== tmp%0#0 echo%0#0) + (assert tmp%2#0) // this won't error + return tmp%0#0 + + subroutine test_cases.arc_56.contract.echo(s: bytes) -> : + block@0: // L118 + return s#0 s#0 + + subroutine test_cases.arc_56.contract.Contract.errors(arg: bytes) -> void: + block@0: // L85 + let tmp%0#0: bytes = ((extract 0 8) arg#0) // on error: Index access is out of bounds + let tmp%1#0: bool = (== tmp%0#0 0x00) + (assert tmp%1#0) // this will error + return + + subroutine test_cases.arc_56.contract.Contract.emitter() -> void: + block@0: // L89 + let event%0#0: bytes = (concat method "SharedStruct(byte[],uint8)" 0x00032a000668656c6c6f31) + (log event%0#0) + let encoded_tuple_buffer%11#0: bytes = 0x0004000b000568656c6c6f + let encoded_tuple_buffer%12#0: bytes = (concat encoded_tuple_buffer%11#0 0x00032a000668656c6c6f32) + let event%1#0: bytes = (concat method "Anonymous(string,(byte[],uint8))" encoded_tuple_buffer%12#0) + (log event%1#0) + return + + subroutine test_cases.arc_56.contract.Contract.conditional_emit(should_emit: bool) -> void: + block@0: // L99 + goto should_emit#0 ? block@1 : block@2 + block@1: // if_body_L102 + let event%0#0: bytes = (concat method "Anonymous2((uint64,uint64),(byte[],uint8))" 0x000000000000002a000000000000002b001200032a000668656c6c6f33) + (log event%0#0) + goto block@2 + block@2: // after_if_else_L101 + return + + subroutine test_cases.arc_56.contract.Contract.template_value() -> : + block@0: // L108 + return TemplateVar[bytes](TMPL_STRUCT) TemplateVar[uint64](TMPL_AVM_UINT64) TemplateVar[bytes](TMPL_AVM_STRING) TemplateVar[bytes](TMPL_ARC4_UINT8) + + program clear-state: + subroutine algopy.arc4.ARC4Contract.clear_state_program() -> bool: + block@0: // L1 + return 1u \ No newline at end of file diff --git a/test_cases/arc_56/out/Contract.ssa.opt_pass_9.ir b/test_cases/arc_56/out/Contract.ssa.opt_pass_9.ir new file mode 100644 index 0000000000..c40cda7373 --- /dev/null +++ b/test_cases/arc_56/out/Contract.ssa.opt_pass_9.ir @@ -0,0 +1,165 @@ +contract test_cases.arc_56.contract.Contract: + program approval: + subroutine algopy.arc4.ARC4Contract.approval_program() -> bool: + block@0: // L1 + let tmp%0#0: bool = test_cases.arc_56.contract.Contract.__puya_arc4_router__() + return tmp%0#0 + + subroutine test_cases.arc_56.contract.Contract.__puya_arc4_router__() -> bool: + block@0: // L41 + let tmp%0#0: uint64 = (txn NumAppArgs) + goto tmp%0#0 ? block@1 : block@11 + block@1: // abi_routing_L41 + let tmp%2#0: bytes = (txna ApplicationArgs 0) + switch tmp%2#0 {method "create()void" => block@2, method "struct_arg((uint64,string,(byte[],uint8)),(byte[],uint8))uint64" => block@3, method "struct_return((uint64,string,(byte[],uint8)))(byte[],uint8)" => block@4, method "emits_error((uint64,string,(byte[],uint8)))void" => block@5, method "emitter()void" => block@6, method "conditional_emit(bool)void" => block@7, method "template_value()((byte[],uint8),uint64,string,uint8)" => block@8, * => return 0u} + block@2: // create_route_L67 + let tmp%3#0: uint64 = (txn OnCompletion) + let tmp%4#0: uint64 = (shl 1u tmp%3#0) + let tmp%5#0: uint64 = (& tmp%4#0 3u) + (assert tmp%5#0) // OnCompletion is one of NoOp, OptIn + return 1u + block@3: // struct_arg_route_L75 + let tmp%6#0: uint64 = (txn OnCompletion) + let tmp%7#0: bool = (! tmp%6#0) + (assert tmp%7#0) // OnCompletion is NoOp + let tmp%8#0: uint64 = (txn ApplicationID) + (assert tmp%8#0) // is not creating + let tmp%10#0: bytes = (txna ApplicationArgs 1) + let tmp%11#0: bytes = (txna ApplicationArgs 2) + let to_encode%0#0: uint64 = test_cases.arc_56.contract.Contract.struct_arg(tmp%10#0, tmp%11#0) + let val_as_bytes%0#0: bytes = (itob to_encode%0#0) + let tmp%12#0: bytes = (concat 0x151f7c75 val_as_bytes%0#0) + (log tmp%12#0) + return 1u + block@4: // struct_return_route_L80 + let tmp%13#0: uint64 = (txn OnCompletion) + let tmp%14#0: bool = (! tmp%13#0) + (assert tmp%14#0) // OnCompletion is NoOp + let tmp%15#0: uint64 = (txn ApplicationID) + (assert tmp%15#0) // is not creating + let tmp%17#0: bytes = (txna ApplicationArgs 1) + let tmp%18#0: bytes = test_cases.arc_56.contract.Contract.struct_return(tmp%17#0) + let tmp%19#0: bytes = (concat 0x151f7c75 tmp%18#0) + (log tmp%19#0) + return 1u + block@5: // emits_error_route_L85 + let tmp%20#0: uint64 = (txn OnCompletion) + let tmp%21#0: bool = (! tmp%20#0) + (assert tmp%21#0) // OnCompletion is NoOp + let tmp%22#0: uint64 = (txn ApplicationID) + (assert tmp%22#0) // is not creating + let tmp%24#0: bytes = (txna ApplicationArgs 1) + test_cases.arc_56.contract.Contract.errors(tmp%24#0) + return 1u + block@6: // emitter_route_L89 + let tmp%25#0: uint64 = (txn OnCompletion) + let tmp%26#0: bool = (! tmp%25#0) + (assert tmp%26#0) // OnCompletion is NoOp + let tmp%27#0: uint64 = (txn ApplicationID) + (assert tmp%27#0) // is not creating + test_cases.arc_56.contract.Contract.emitter() + return 1u + block@7: // conditional_emit_route_L99 + let tmp%29#0: uint64 = (txn OnCompletion) + let tmp%30#0: bool = (! tmp%29#0) + (assert tmp%30#0) // OnCompletion is NoOp + let tmp%31#0: uint64 = (txn ApplicationID) + (assert tmp%31#0) // is not creating + let tmp%33#0: bytes = (txna ApplicationArgs 1) + let tmp%34#0: bool = (getbit tmp%33#0 0u) + test_cases.arc_56.contract.Contract.conditional_emit(tmp%34#0) + return 1u + block@8: // template_value_route_L108 + let tmp%35#0: uint64 = (txn OnCompletion) + let tmp%36#0: bool = (! tmp%35#0) + (assert tmp%36#0) // OnCompletion is NoOp + let tmp%37#0: uint64 = (txn ApplicationID) + (assert tmp%37#0) // is not creating + let (elements_to_encode%0#0: bytes, elements_to_encode%1#0: uint64, elements_to_encode%2#0: bytes, elements_to_encode%3#0: bytes) = test_cases.arc_56.contract.Contract.template_value() + let val_as_bytes%1#0: bytes = (itob elements_to_encode%1#0) + let length%0#0: uint64 = (len elements_to_encode%2#0) + let as_bytes%0#0: bytes = (itob length%0#0) + let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) + let encoded_value%0#0: bytes = (concat length_uint16%0#0 elements_to_encode%2#0) + let data_length%0#0: uint64 = (len elements_to_encode%0#0) + let current_tail_offset%1#0: uint64 = (+ 13u data_length%0#0) + let encoded_tuple_buffer%2#0: bytes = (concat 0x000d val_as_bytes%1#0) + let as_bytes%2#0: bytes = (itob current_tail_offset%1#0) + let offset_as_uint16%1#0: bytes = ((extract 6 2) as_bytes%2#0) + let encoded_tuple_buffer%3#0: bytes = (concat encoded_tuple_buffer%2#0 offset_as_uint16%1#0) + let encoded_tuple_buffer%4#0: bytes = (concat encoded_tuple_buffer%3#0 elements_to_encode%3#0) + let encoded_tuple_buffer%5#0: bytes = (concat encoded_tuple_buffer%4#0 elements_to_encode%0#0) + let encoded_tuple_buffer%6#0: bytes = (concat encoded_tuple_buffer%5#0 encoded_value%0#0) + let tmp%39#0: bytes = (concat 0x151f7c75 encoded_tuple_buffer%6#0) + (log tmp%39#0) + return 1u + block@11: // bare_routing_L41 + let tmp%40#0: uint64 = (txn OnCompletion) + goto_nth [block@12, block@12, block@16, block@16, block@16, block@13][tmp%40#0] else return 0u + block@12: // bare_create_L63 + return 1u + block@13: // transient_L71 + let tmp%41#0: uint64 = (txn ApplicationID) + let tmp%42#0: bool = (! tmp%41#0) + (assert tmp%42#0) // is creating + return 1u + block@16: // after_if_else_L41 + return 0u + + subroutine test_cases.arc_56.contract.Contract.struct_arg(arg: bytes, shared: bytes) -> uint64: + block@0: // L75 + let item_start_offset%0#0: uint64 = (extract_uint16 arg#0 10u) + let item_end_offset%0#0: uint64 = (len arg#0) + let tmp%0#0: bytes = (substring3 arg#0 item_start_offset%0#0 item_end_offset%0#0) + let tmp%1#0: bool = (== tmp%0#0 shared#0) + (assert tmp%1#0) // this might error + return 42u + + subroutine test_cases.arc_56.contract.Contract.struct_return(arg: bytes) -> bytes: + block@0: // L80 + let item_start_offset%0#0: uint64 = (extract_uint16 arg#0 10u) + let item_end_offset%0#0: uint64 = (len arg#0) + let tmp%0#0: bytes = (substring3 arg#0 item_start_offset%0#0 item_end_offset%0#0) + let (echo%0#0: bytes, echo%1#0: bytes) = test_cases.arc_56.contract.echo(tmp%0#0) + let tmp%2#0: bool = (== tmp%0#0 echo%0#0) + (assert tmp%2#0) // this won't error + return tmp%0#0 + + subroutine test_cases.arc_56.contract.echo(s: bytes) -> : + block@0: // L118 + return s#0 s#0 + + subroutine test_cases.arc_56.contract.Contract.errors(arg: bytes) -> void: + block@0: // L85 + let tmp%0#0: bytes = ((extract 0 8) arg#0) // on error: Index access is out of bounds + let tmp%1#0: bool = (== tmp%0#0 0x00) + (assert tmp%1#0) // this will error + return + + subroutine test_cases.arc_56.contract.Contract.emitter() -> void: + block@0: // L89 + let event%0#0: bytes = (concat method "SharedStruct(byte[],uint8)" 0x00032a000668656c6c6f31) + (log event%0#0) + let encoded_tuple_buffer%12#0: bytes = 0x0004000b000568656c6c6f00032a000668656c6c6f32 + let event%1#0: bytes = (concat method "Anonymous(string,(byte[],uint8))" encoded_tuple_buffer%12#0) + (log event%1#0) + return + + subroutine test_cases.arc_56.contract.Contract.conditional_emit(should_emit: bool) -> void: + block@0: // L99 + goto should_emit#0 ? block@1 : block@2 + block@1: // if_body_L102 + let event%0#0: bytes = (concat method "Anonymous2((uint64,uint64),(byte[],uint8))" 0x000000000000002a000000000000002b001200032a000668656c6c6f33) + (log event%0#0) + goto block@2 + block@2: // after_if_else_L101 + return + + subroutine test_cases.arc_56.contract.Contract.template_value() -> : + block@0: // L108 + return TemplateVar[bytes](TMPL_STRUCT) TemplateVar[uint64](TMPL_AVM_UINT64) TemplateVar[bytes](TMPL_AVM_STRING) TemplateVar[bytes](TMPL_ARC4_UINT8) + + program clear-state: + subroutine algopy.arc4.ARC4Contract.clear_state_program() -> bool: + block@0: // L1 + return 1u \ No newline at end of file diff --git a/test_cases/arc_56/out/client_Contract.py b/test_cases/arc_56/out/client_Contract.py new file mode 100644 index 0000000000..5598046888 --- /dev/null +++ b/test_cases/arc_56/out/client_Contract.py @@ -0,0 +1,55 @@ +# This file is auto-generated, do not modify +# flake8: noqa +# fmt: off +import typing + +import algopy + +class TopLevelStruct(algopy.arc4.Struct): + a: algopy.arc4.UIntN[typing.Literal[64]] + b: algopy.arc4.String + shared: algopy.arc4.Tuple[algopy.arc4.DynamicBytes, algopy.arc4.UIntN[typing.Literal[8]]] +class SharedStruct(algopy.arc4.Struct): + foo: algopy.arc4.DynamicBytes + bar: algopy.arc4.UIntN[typing.Literal[8]] + +class Contract(algopy.arc4.ARC4Client, typing.Protocol): + @algopy.arc4.abimethod(allow_actions=['NoOp', 'OptIn'], create='allow') + def create( + self, + ) -> None: ... + + @algopy.arc4.abimethod + def struct_arg( + self, + arg: TopLevelStruct, + shared: SharedStruct, + ) -> algopy.arc4.UIntN[typing.Literal[64]]: ... + + @algopy.arc4.abimethod(readonly=True) + def struct_return( + self, + arg: TopLevelStruct, + ) -> algopy.arc4.Tuple[algopy.arc4.DynamicBytes, algopy.arc4.UIntN[typing.Literal[8]]]: ... + + @algopy.arc4.abimethod(readonly=True) + def emits_error( + self, + arg: TopLevelStruct, + ) -> None: ... + + @algopy.arc4.abimethod + def emitter( + self, + ) -> None: ... + + @algopy.arc4.abimethod + def conditional_emit( + self, + should_emit: algopy.arc4.Bool, + ) -> None: ... + + @algopy.arc4.abimethod + def template_value( + self, + ) -> algopy.arc4.Tuple[algopy.arc4.Tuple[algopy.arc4.DynamicBytes, algopy.arc4.UIntN[typing.Literal[8]]], algopy.arc4.UIntN[typing.Literal[64]], algopy.arc4.String, algopy.arc4.UIntN[typing.Literal[8]]]: ... diff --git a/test_cases/arc_56/out/module.awst b/test_cases/arc_56/out/module.awst new file mode 100644 index 0000000000..fbae3875c7 --- /dev/null +++ b/test_cases/arc_56/out/module.awst @@ -0,0 +1,79 @@ +contract Contract extends (algopy.arc4.ARC4Contract) +{ + globals { + ['g_struct']: test_cases.arc_56.contract.StateStruct + [hex<"6775">]: uint64 + [hex<"6761">]: arc4.static_array + } + locals { + ['l_struct']: test_cases.arc_56.contract.StateStruct + [hex<"6C75">]: uint64 + [hex<"6C61">]: arc4.static_array + } + boxes { + ['b_struct']: test_cases.arc_56.contract.StateStruct + [hex<"6275">]: uint64 + [hex<"6261">]: arc4.static_array + ['box_map_struct']: test_cases.arc_56.contract.StateStruct => test_cases.arc_56.contract.SharedStruct + [hex<"626D75">]: uint64 => test_cases.arc_56.contract.SharedStruct + [hex<"626D61">]: arc4.static_array => test_cases.arc_56.contract.SharedStruct + ['box_ref']: bytes + [hex<"6272">]: bytes + } + + constructor() + { + } + + baremethod bare_create(): void + { + } + + abimethod create(): void + { + } + + baremethod transient(): void + { + } + + abimethod struct_arg(arg: test_cases.arc_56.contract.TopLevelStruct, shared: test_cases.arc_56.contract.SharedStruct): uint64 + { + assert(arg.shared == shared, comment="this might error") + return 42u + } + + abimethod struct_return(arg: test_cases.arc_56.contract.TopLevelStruct): test_cases.arc_56.contract.SharedStruct + { + assert(arg.shared == test_cases.arc_56.contract.echo(arg.shared), comment="this won't error") + return arg.shared + } + + abimethod[name_override=emits_error] errors(arg: test_cases.arc_56.contract.TopLevelStruct): void + { + assert(reinterpret_cast(arg.a) == reinterpret_cast(0arc4u8), comment="this will error") + } + + abimethod emitter(): void + { + emit('SharedStruct(byte[],uint8)', new test_cases.arc_56.contract.SharedStruct(foo=arc4_encode(hex<"68656C6C6F31">, arc4.dynamic_array), bar=42arc4u8)) + emit('Anonymous(string,(byte[],uint8))', new Anonymous(field1=arc4_encode('hello', arc4.dynamic_array), field2=new test_cases.arc_56.contract.SharedStruct(foo=arc4_encode(hex<"68656C6C6F32">, arc4.dynamic_array), bar=42arc4u8))) + } + + abimethod conditional_emit(should_emit: bool): void + { + if (should_emit) { + emit('Anonymous2((uint64,uint64),(byte[],uint8))', new Anonymous2(field1=new test_cases.arc_56.contract.EventOnly(x=42arc4u64, y=43arc4u64), field2=new test_cases.arc_56.contract.SharedStruct(foo=arc4_encode(hex<"68656C6C6F33">, arc4.dynamic_array), bar=42arc4u8))) + } + } + + abimethod template_value(): tuple + { + return (TemplateVar[test_cases.arc_56.contract.SharedStruct](TMPL_STRUCT), TemplateVar[uint64](TMPL_AVM_UINT64), TemplateVar[string](TMPL_AVM_STRING), TemplateVar[arc4.uint8](TMPL_ARC4_UINT8)) + } +} + +subroutine echo(s: test_cases.arc_56.contract.SharedStruct): test_cases.arc_56.contract.SharedStruct +{ + return s +} \ No newline at end of file diff --git a/test_cases/arc_56/out_O2/Contract.approval.teal b/test_cases/arc_56/out_O2/Contract.approval.teal new file mode 100644 index 0000000000..acac3f117d --- /dev/null +++ b/test_cases/arc_56/out_O2/Contract.approval.teal @@ -0,0 +1,247 @@ +#pragma version 10 + +test_cases.arc_56.contract.Contract.approval_program: + intcblock 1 0 10 TMPL_AVM_UINT64 + bytecblock 0x151f7c75 TMPL_STRUCT TMPL_AVM_STRING TMPL_ARC4_UINT8 + callsub __puya_arc4_router__ + return + + +// test_cases.arc_56.contract.Contract.__puya_arc4_router__() -> uint64: +__puya_arc4_router__: + proto 0 1 + txn NumAppArgs + bz __puya_arc4_router___bare_routing@11 + pushbytess 0x4c5c61ba 0x97e8e4a7 0x76c4de11 0xc1ca7709 0x6de762c2 0x59fc5282 0x9d9eecb0 // method "create()void", method "struct_arg((uint64,string,(byte[],uint8)),(byte[],uint8))uint64", method "struct_return((uint64,string,(byte[],uint8)))(byte[],uint8)", method "emits_error((uint64,string,(byte[],uint8)))void", method "emitter()void", method "conditional_emit(bool)void", method "template_value()((byte[],uint8),uint64,string,uint8)" + txna ApplicationArgs 0 + match __puya_arc4_router___create_route@2 __puya_arc4_router___struct_arg_route@3 __puya_arc4_router___struct_return_route@4 __puya_arc4_router___emits_error_route@5 __puya_arc4_router___emitter_route@6 __puya_arc4_router___conditional_emit_route@7 __puya_arc4_router___template_value_route@8 + intc_1 // 0 + retsub + +__puya_arc4_router___create_route@2: + intc_0 // 1 + txn OnCompletion + shl + pushint 3 // 3 + & + assert // OnCompletion is one of NoOp, OptIn + intc_0 // 1 + retsub + +__puya_arc4_router___struct_arg_route@3: + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + txna ApplicationArgs 1 + txna ApplicationArgs 2 + callsub struct_arg + itob + bytec_0 // 0x151f7c75 + swap + concat + log + intc_0 // 1 + retsub + +__puya_arc4_router___struct_return_route@4: + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + txna ApplicationArgs 1 + callsub struct_return + bytec_0 // 0x151f7c75 + swap + concat + log + intc_0 // 1 + retsub + +__puya_arc4_router___emits_error_route@5: + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + txna ApplicationArgs 1 + callsub errors + intc_0 // 1 + retsub + +__puya_arc4_router___emitter_route@6: + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + callsub emitter + intc_0 // 1 + retsub + +__puya_arc4_router___conditional_emit_route@7: + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + txna ApplicationArgs 1 + intc_1 // 0 + getbit + callsub conditional_emit + intc_0 // 1 + retsub + +__puya_arc4_router___template_value_route@8: + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + callsub template_value + uncover 2 + itob + dig 2 + len + itob + extract 6 2 + uncover 3 + concat + dig 3 + len + pushint 13 // 13 + + + pushbytes 0x000d + uncover 3 + concat + swap + itob + extract 6 2 + concat + uncover 2 + concat + uncover 2 + concat + swap + concat + bytec_0 // 0x151f7c75 + swap + concat + log + intc_0 // 1 + retsub + +__puya_arc4_router___bare_routing@11: + txn OnCompletion + switch __puya_arc4_router___bare_create@12 __puya_arc4_router___bare_create@12 __puya_arc4_router___after_if_else@16 __puya_arc4_router___after_if_else@16 __puya_arc4_router___after_if_else@16 __puya_arc4_router___transient@13 + intc_1 // 0 + retsub + +__puya_arc4_router___bare_create@12: + intc_0 // 1 + retsub + +__puya_arc4_router___transient@13: + txn ApplicationID + ! + assert // is creating + intc_0 // 1 + retsub + +__puya_arc4_router___after_if_else@16: + intc_1 // 0 + retsub + + +// test_cases.arc_56.contract.Contract.struct_arg(arg: bytes, shared: bytes) -> uint64: +struct_arg: + proto 2 1 + frame_dig -2 + intc_2 // 10 + extract_uint16 + frame_dig -2 + len + frame_dig -2 + cover 2 + substring3 + frame_dig -1 + == + assert // this might error + pushint 42 // 42 + retsub + + +// test_cases.arc_56.contract.Contract.struct_return(arg: bytes) -> bytes: +struct_return: + proto 1 1 + frame_dig -1 + intc_2 // 10 + extract_uint16 + frame_dig -1 + len + frame_dig -1 + cover 2 + substring3 + dup + callsub echo + pop + dig 1 + == + assert // this won't error + retsub + + +// test_cases.arc_56.contract.echo(s: bytes) -> bytes, bytes: +echo: + proto 1 2 + frame_dig -1 + dup + retsub + + +// test_cases.arc_56.contract.Contract.errors(arg: bytes) -> void: +errors: + proto 1 0 + frame_dig -1 + extract 0 8 // on error: Index access is out of bounds + pushbytes 0x00 + == + assert // this will error + retsub + + +// test_cases.arc_56.contract.Contract.emitter() -> void: +emitter: + proto 0 0 + pushbytess 0xd93f374e 0x00032a000668656c6c6f31 // method "SharedStruct(byte[],uint8)", 0x00032a000668656c6c6f31 + concat + log + pushbytess 0x1e72af4e 0x0004000b000568656c6c6f00032a000668656c6c6f32 // method "Anonymous(string,(byte[],uint8))", 0x0004000b000568656c6c6f00032a000668656c6c6f32 + concat + log + retsub + + +// test_cases.arc_56.contract.Contract.conditional_emit(should_emit: uint64) -> void: +conditional_emit: + proto 1 0 + frame_dig -1 + bz conditional_emit_after_if_else@2 + pushbytess 0x11c547ba 0x000000000000002a000000000000002b001200032a000668656c6c6f33 // method "Anonymous2((uint64,uint64),(byte[],uint8))", 0x000000000000002a000000000000002b001200032a000668656c6c6f33 + concat + log + +conditional_emit_after_if_else@2: + retsub + + +// test_cases.arc_56.contract.Contract.template_value() -> bytes, uint64, bytes, bytes: +template_value: + proto 0 4 + bytec_1 // TMPL_STRUCT + intc_3 // TMPL_AVM_UINT64 + bytec_2 // TMPL_AVM_STRING + bytec_3 // TMPL_ARC4_UINT8 + retsub diff --git a/test_cases/arc_56/out_O2/Contract.clear.teal b/test_cases/arc_56/out_O2/Contract.clear.teal new file mode 100644 index 0000000000..883b1f693b --- /dev/null +++ b/test_cases/arc_56/out_O2/Contract.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +test_cases.arc_56.contract.Contract.clear_state_program: + pushint 1 // 1 + return diff --git a/test_cases/arc_56/out_O2/Contract.destructured.ir b/test_cases/arc_56/out_O2/Contract.destructured.ir new file mode 100644 index 0000000000..4a3f07ca27 --- /dev/null +++ b/test_cases/arc_56/out_O2/Contract.destructured.ir @@ -0,0 +1,164 @@ +contract test_cases.arc_56.contract.Contract: + program approval: + subroutine algopy.arc4.ARC4Contract.approval_program() -> bool: + block@0: // L1 + let tmp%0#0: bool = test_cases.arc_56.contract.Contract.__puya_arc4_router__() + return tmp%0#0 + + subroutine test_cases.arc_56.contract.Contract.__puya_arc4_router__() -> bool: + block@0: // L41 + let tmp%0#0: uint64 = (txn NumAppArgs) + goto tmp%0#0 ? block@1 : block@11 + block@1: // abi_routing_L41 + let tmp%2#0: bytes = (txna ApplicationArgs 0) + switch tmp%2#0 {method "create()void" => block@2, method "struct_arg((uint64,string,(byte[],uint8)),(byte[],uint8))uint64" => block@3, method "struct_return((uint64,string,(byte[],uint8)))(byte[],uint8)" => block@4, method "emits_error((uint64,string,(byte[],uint8)))void" => block@5, method "emitter()void" => block@6, method "conditional_emit(bool)void" => block@7, method "template_value()((byte[],uint8),uint64,string,uint8)" => block@8, * => return 0u} + block@2: // create_route_L67 + let tmp%3#0: uint64 = (txn OnCompletion) + let tmp%4#0: uint64 = (shl 1u tmp%3#0) + let tmp%5#0: uint64 = (& tmp%4#0 3u) + (assert tmp%5#0) // OnCompletion is one of NoOp, OptIn + return 1u + block@3: // struct_arg_route_L75 + let tmp%6#0: uint64 = (txn OnCompletion) + let tmp%7#0: bool = (! tmp%6#0) + (assert tmp%7#0) // OnCompletion is NoOp + let tmp%8#0: uint64 = (txn ApplicationID) + (assert tmp%8#0) // is not creating + let tmp%10#0: bytes = (txna ApplicationArgs 1) + let tmp%11#0: bytes = (txna ApplicationArgs 2) + let to_encode%0#0: uint64 = test_cases.arc_56.contract.Contract.struct_arg(tmp%10#0, tmp%11#0) + let val_as_bytes%0#0: bytes = (itob to_encode%0#0) + let tmp%12#0: bytes = (concat 0x151f7c75 val_as_bytes%0#0) + (log tmp%12#0) + return 1u + block@4: // struct_return_route_L80 + let tmp%13#0: uint64 = (txn OnCompletion) + let tmp%14#0: bool = (! tmp%13#0) + (assert tmp%14#0) // OnCompletion is NoOp + let tmp%15#0: uint64 = (txn ApplicationID) + (assert tmp%15#0) // is not creating + let tmp%17#0: bytes = (txna ApplicationArgs 1) + let tmp%18#0: bytes = test_cases.arc_56.contract.Contract.struct_return(tmp%17#0) + let tmp%19#0: bytes = (concat 0x151f7c75 tmp%18#0) + (log tmp%19#0) + return 1u + block@5: // emits_error_route_L85 + let tmp%20#0: uint64 = (txn OnCompletion) + let tmp%21#0: bool = (! tmp%20#0) + (assert tmp%21#0) // OnCompletion is NoOp + let tmp%22#0: uint64 = (txn ApplicationID) + (assert tmp%22#0) // is not creating + let tmp%24#0: bytes = (txna ApplicationArgs 1) + test_cases.arc_56.contract.Contract.errors(tmp%24#0) + return 1u + block@6: // emitter_route_L89 + let tmp%25#0: uint64 = (txn OnCompletion) + let tmp%26#0: bool = (! tmp%25#0) + (assert tmp%26#0) // OnCompletion is NoOp + let tmp%27#0: uint64 = (txn ApplicationID) + (assert tmp%27#0) // is not creating + test_cases.arc_56.contract.Contract.emitter() + return 1u + block@7: // conditional_emit_route_L99 + let tmp%29#0: uint64 = (txn OnCompletion) + let tmp%30#0: bool = (! tmp%29#0) + (assert tmp%30#0) // OnCompletion is NoOp + let tmp%31#0: uint64 = (txn ApplicationID) + (assert tmp%31#0) // is not creating + let tmp%33#0: bytes = (txna ApplicationArgs 1) + let tmp%34#0: bool = (getbit tmp%33#0 0u) + test_cases.arc_56.contract.Contract.conditional_emit(tmp%34#0) + return 1u + block@8: // template_value_route_L108 + let tmp%35#0: uint64 = (txn OnCompletion) + let tmp%36#0: bool = (! tmp%35#0) + (assert tmp%36#0) // OnCompletion is NoOp + let tmp%37#0: uint64 = (txn ApplicationID) + (assert tmp%37#0) // is not creating + let (elements_to_encode%0#0: bytes, elements_to_encode%1#0: uint64, elements_to_encode%2#0: bytes, elements_to_encode%3#0: bytes) = test_cases.arc_56.contract.Contract.template_value() + let val_as_bytes%1#0: bytes = (itob elements_to_encode%1#0) + let length%0#0: uint64 = (len elements_to_encode%2#0) + let as_bytes%0#0: bytes = (itob length%0#0) + let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) + let encoded_value%0#0: bytes = (concat length_uint16%0#0 elements_to_encode%2#0) + let data_length%0#0: uint64 = (len elements_to_encode%0#0) + let current_tail_offset%1#0: uint64 = (+ 13u data_length%0#0) + let encoded_tuple_buffer%2#0: bytes = (concat 0x000d val_as_bytes%1#0) + let as_bytes%2#0: bytes = (itob current_tail_offset%1#0) + let offset_as_uint16%1#0: bytes = ((extract 6 2) as_bytes%2#0) + let encoded_tuple_buffer%3#0: bytes = (concat encoded_tuple_buffer%2#0 offset_as_uint16%1#0) + let encoded_tuple_buffer%4#0: bytes = (concat encoded_tuple_buffer%3#0 elements_to_encode%3#0) + let encoded_tuple_buffer%5#0: bytes = (concat encoded_tuple_buffer%4#0 elements_to_encode%0#0) + let encoded_tuple_buffer%6#0: bytes = (concat encoded_tuple_buffer%5#0 encoded_value%0#0) + let tmp%39#0: bytes = (concat 0x151f7c75 encoded_tuple_buffer%6#0) + (log tmp%39#0) + return 1u + block@11: // bare_routing_L41 + let tmp%40#0: uint64 = (txn OnCompletion) + goto_nth [block@12, block@12, block@16, block@16, block@16, block@13][tmp%40#0] else return 0u + block@12: // bare_create_L63 + return 1u + block@13: // transient_L71 + let tmp%41#0: uint64 = (txn ApplicationID) + let tmp%42#0: bool = (! tmp%41#0) + (assert tmp%42#0) // is creating + return 1u + block@16: // after_if_else_L41 + return 0u + + subroutine test_cases.arc_56.contract.Contract.struct_arg(arg: bytes, shared: bytes) -> uint64: + block@0: // L75 + let item_start_offset%0#0: uint64 = (extract_uint16 arg#0 10u) + let item_end_offset%0#0: uint64 = (len arg#0) + let tmp%0#0: bytes = (substring3 arg#0 item_start_offset%0#0 item_end_offset%0#0) + let tmp%1#0: bool = (== tmp%0#0 shared#0) + (assert tmp%1#0) // this might error + return 42u + + subroutine test_cases.arc_56.contract.Contract.struct_return(arg: bytes) -> bytes: + block@0: // L80 + let item_start_offset%0#0: uint64 = (extract_uint16 arg#0 10u) + let item_end_offset%0#0: uint64 = (len arg#0) + let tmp%0#0: bytes = (substring3 arg#0 item_start_offset%0#0 item_end_offset%0#0) + let (echo%0#0: bytes, echo%1#0: bytes) = test_cases.arc_56.contract.echo(tmp%0#0) + let tmp%2#0: bool = (== tmp%0#0 echo%0#0) + (assert tmp%2#0) // this won't error + return tmp%0#0 + + subroutine test_cases.arc_56.contract.echo(s: bytes) -> : + block@0: // L118 + return s#0 s#0 + + subroutine test_cases.arc_56.contract.Contract.errors(arg: bytes) -> void: + block@0: // L85 + let tmp%0#0: bytes = ((extract 0 8) arg#0) // on error: Index access is out of bounds + let tmp%1#0: bool = (== tmp%0#0 0x00) + (assert tmp%1#0) // this will error + return + + subroutine test_cases.arc_56.contract.Contract.emitter() -> void: + block@0: // L89 + let event%0#0: bytes = (concat method "SharedStruct(byte[],uint8)" 0x00032a000668656c6c6f31) + (log event%0#0) + let event%1#0: bytes = (concat method "Anonymous(string,(byte[],uint8))" 0x0004000b000568656c6c6f00032a000668656c6c6f32) + (log event%1#0) + return + + subroutine test_cases.arc_56.contract.Contract.conditional_emit(should_emit: bool) -> void: + block@0: // L99 + goto should_emit#0 ? block@1 : block@2 + block@1: // if_body_L102 + let event%0#0: bytes = (concat method "Anonymous2((uint64,uint64),(byte[],uint8))" 0x000000000000002a000000000000002b001200032a000668656c6c6f33) + (log event%0#0) + goto block@2 + block@2: // after_if_else_L101 + return + + subroutine test_cases.arc_56.contract.Contract.template_value() -> : + block@0: // L108 + return TemplateVar[bytes](TMPL_STRUCT) TemplateVar[uint64](TMPL_AVM_UINT64) TemplateVar[bytes](TMPL_AVM_STRING) TemplateVar[bytes](TMPL_ARC4_UINT8) + + program clear-state: + subroutine algopy.arc4.ARC4Contract.clear_state_program() -> bool: + block@0: // L1 + return 1u \ No newline at end of file diff --git a/test_cases/arc_56/out_unoptimized/Contract.approval.teal b/test_cases/arc_56/out_unoptimized/Contract.approval.teal new file mode 100644 index 0000000000..4af866e58a --- /dev/null +++ b/test_cases/arc_56/out_unoptimized/Contract.approval.teal @@ -0,0 +1,561 @@ +#pragma version 10 + +test_cases.arc_56.contract.Contract.approval_program: + intcblock 0 1 3 10 TMPL_AVM_UINT64 + bytecblock 0x 0x151f7c75 0x2a 0x68656c6c6f31 "hello" 0x68656c6c6f32 0x68656c6c6f33 TMPL_STRUCT TMPL_AVM_STRING TMPL_ARC4_UINT8 + txn ApplicationID + bnz main_entrypoint@2 + callsub __init__ + +main_entrypoint@2: + callsub __puya_arc4_router__ + return + + +// test_cases.arc_56.contract.Contract.__puya_arc4_router__() -> uint64: +__puya_arc4_router__: + // arc_56/contract.py:41 + // class Contract(ARC4Contract): + proto 0 1 + txn NumAppArgs + intc_0 // 0 + != + bz __puya_arc4_router___bare_routing@11 + txna ApplicationArgs 0 + pushbytes 0x4c5c61ba // method "create()void" + pushbytes 0x97e8e4a7 // method "struct_arg((uint64,string,(byte[],uint8)),(byte[],uint8))uint64" + pushbytes 0x76c4de11 // method "struct_return((uint64,string,(byte[],uint8)))(byte[],uint8)" + pushbytes 0xc1ca7709 // method "emits_error((uint64,string,(byte[],uint8)))void" + pushbytes 0x6de762c2 // method "emitter()void" + pushbytes 0x59fc5282 // method "conditional_emit(bool)void" + pushbytes 0x9d9eecb0 // method "template_value()((byte[],uint8),uint64,string,uint8)" + uncover 7 + match __puya_arc4_router___create_route@2 __puya_arc4_router___struct_arg_route@3 __puya_arc4_router___struct_return_route@4 __puya_arc4_router___emits_error_route@5 __puya_arc4_router___emitter_route@6 __puya_arc4_router___conditional_emit_route@7 __puya_arc4_router___template_value_route@8 + b __puya_arc4_router___switch_case_default@9 + +__puya_arc4_router___create_route@2: + // arc_56/contract.py:67 + // @arc4.abimethod(create="allow", allow_actions=["NoOp", "OptIn"]) + txn OnCompletion + intc_1 // 1 + swap + shl + intc_2 // 3 + & + assert // OnCompletion is one of NoOp, OptIn + callsub create + intc_1 // 1 + retsub + +__puya_arc4_router___struct_arg_route@3: + // arc_56/contract.py:75 + // @arc4.abimethod() + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is NoOp + txn ApplicationID + intc_0 // 0 + != + assert // is not creating + // arc_56/contract.py:41 + // class Contract(ARC4Contract): + txna ApplicationArgs 1 + txna ApplicationArgs 2 + // arc_56/contract.py:75 + // @arc4.abimethod() + callsub struct_arg + itob + bytec_1 // 0x151f7c75 + swap + concat + log + intc_1 // 1 + retsub + +__puya_arc4_router___struct_return_route@4: + // arc_56/contract.py:80 + // @arc4.abimethod(readonly=True) + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is NoOp + txn ApplicationID + intc_0 // 0 + != + assert // is not creating + // arc_56/contract.py:41 + // class Contract(ARC4Contract): + txna ApplicationArgs 1 + // arc_56/contract.py:80 + // @arc4.abimethod(readonly=True) + callsub struct_return + bytec_1 // 0x151f7c75 + swap + concat + log + intc_1 // 1 + retsub + +__puya_arc4_router___emits_error_route@5: + // arc_56/contract.py:85 + // @arc4.abimethod(name="emits_error", readonly=True) + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is NoOp + txn ApplicationID + intc_0 // 0 + != + assert // is not creating + // arc_56/contract.py:41 + // class Contract(ARC4Contract): + txna ApplicationArgs 1 + // arc_56/contract.py:85 + // @arc4.abimethod(name="emits_error", readonly=True) + callsub errors + intc_1 // 1 + retsub + +__puya_arc4_router___emitter_route@6: + // arc_56/contract.py:89 + // @arc4.abimethod() + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is NoOp + txn ApplicationID + intc_0 // 0 + != + assert // is not creating + callsub emitter + intc_1 // 1 + retsub + +__puya_arc4_router___conditional_emit_route@7: + // arc_56/contract.py:99 + // @arc4.abimethod() + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is NoOp + txn ApplicationID + intc_0 // 0 + != + assert // is not creating + // arc_56/contract.py:41 + // class Contract(ARC4Contract): + txna ApplicationArgs 1 + intc_0 // 0 + getbit + // arc_56/contract.py:99 + // @arc4.abimethod() + callsub conditional_emit + intc_1 // 1 + retsub + +__puya_arc4_router___template_value_route@8: + // arc_56/contract.py:108 + // @arc4.abimethod() + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is NoOp + txn ApplicationID + intc_0 // 0 + != + assert // is not creating + callsub template_value + cover 3 + cover 2 + swap + cover 2 + itob + cover 2 + dup + len + itob + extract 6 2 + swap + concat + cover 2 + pushint 13 // 13 + itob + extract 6 2 + bytec_0 // 0x + swap + concat + dig 1 + len + pushint 13 // 13 + + + swap + uncover 3 + concat + swap + itob + extract 6 2 + concat + uncover 3 + concat + swap + concat + swap + concat + bytec_1 // 0x151f7c75 + swap + concat + log + intc_1 // 1 + retsub + +__puya_arc4_router___switch_case_default@9: + b __puya_arc4_router___after_if_else@16 + +__puya_arc4_router___bare_routing@11: + // arc_56/contract.py:41 + // class Contract(ARC4Contract): + txn OnCompletion + intc_0 // 0 + intc_1 // 1 + pushint 5 // 5 + uncover 3 + match __puya_arc4_router___bare_create@12 __puya_arc4_router___bare_create@12 __puya_arc4_router___transient@13 + b __puya_arc4_router___switch_case_default@14 + +__puya_arc4_router___bare_create@12: + // arc_56/contract.py:63-64 + // @arc4.baremethod(create="allow", allow_actions=["NoOp", "OptIn"]) + // def bare_create(self) -> None: + callsub bare_create + intc_1 // 1 + retsub + +__puya_arc4_router___transient@13: + // arc_56/contract.py:71 + // @arc4.baremethod(create="require", allow_actions=["DeleteApplication"]) + txn ApplicationID + intc_0 // 0 + == + assert // is creating + // arc_56/contract.py:71-72 + // @arc4.baremethod(create="require", allow_actions=["DeleteApplication"]) + // def transient(self) -> None: + callsub transient + intc_1 // 1 + retsub + +__puya_arc4_router___switch_case_default@14: + +__puya_arc4_router___after_if_else@16: + // arc_56/contract.py:41 + // class Contract(ARC4Contract): + intc_0 // 0 + retsub + + +// test_cases.arc_56.contract.Contract.create() -> void: +create: + // arc_56/contract.py:67-68 + // @arc4.abimethod(create="allow", allow_actions=["NoOp", "OptIn"]) + // def create(self) -> None: + proto 0 0 + retsub + + +// test_cases.arc_56.contract.Contract.struct_arg(arg: bytes, shared: bytes) -> uint64: +struct_arg: + // arc_56/contract.py:75-76 + // @arc4.abimethod() + // def struct_arg(self, arg: TopLevelStruct, shared: SharedStruct) -> UInt64: + proto 2 1 + // arc_56/contract.py:77 + // assert arg.shared == shared, "this might error" + frame_dig -2 + intc_3 // 10 + extract_uint16 + frame_dig -2 + len + frame_dig -2 + uncover 2 + uncover 2 + substring3 + frame_dig -1 + == + assert // this might error + // arc_56/contract.py:78 + // return UInt64(42) + pushint 42 // 42 + retsub + + +// test_cases.arc_56.contract.Contract.struct_return(arg: bytes) -> bytes: +struct_return: + // arc_56/contract.py:80-81 + // @arc4.abimethod(readonly=True) + // def struct_return(self, arg: TopLevelStruct) -> SharedStruct: + proto 1 1 + // arc_56/contract.py:82 + // assert arg.shared == echo(arg.shared), "this won't error" + frame_dig -1 + intc_3 // 10 + extract_uint16 + frame_dig -1 + len + frame_dig -1 + uncover 2 + uncover 2 + substring3 + frame_dig -1 + intc_3 // 10 + extract_uint16 + frame_dig -1 + len + frame_dig -1 + uncover 2 + uncover 2 + substring3 + callsub echo + pop + == + assert // this won't error + // arc_56/contract.py:83 + // return arg.shared + frame_dig -1 + intc_3 // 10 + extract_uint16 + frame_dig -1 + len + frame_dig -1 + uncover 2 + uncover 2 + substring3 + retsub + + +// test_cases.arc_56.contract.echo(s: bytes) -> bytes, bytes: +echo: + // arc_56/contract.py:118-119 + // @subroutine + // def echo(s: SharedStruct) -> SharedStruct: + proto 1 2 + // arc_56/contract.py:120 + // return s + frame_dig -1 + dup + retsub + + +// test_cases.arc_56.contract.Contract.errors(arg: bytes) -> void: +errors: + // arc_56/contract.py:85-86 + // @arc4.abimethod(name="emits_error", readonly=True) + // def errors(self, arg: TopLevelStruct) -> None: + proto 1 0 + // arc_56/contract.py:87 + // assert arg.a.bytes == arc4.UInt8(0).bytes, "this will error" + frame_dig -1 + intc_0 // 0 + pushint 8 // 8 + extract3 // on error: Index access is out of bounds + pushbytes 0x00 + == + assert // this will error + retsub + + +// test_cases.arc_56.contract.Contract.emitter() -> void: +emitter: + // arc_56/contract.py:89-90 + // @arc4.abimethod() + // def emitter(self) -> None: + proto 0 0 + // arc_56/contract.py:91 + // arc4.emit(SharedStruct(foo=arc4.DynamicBytes(b"hello1"), bar=arc4.UInt8(42))) + bytec_3 // 0x68656c6c6f31 + len + itob + extract 6 2 + bytec_3 // 0x68656c6c6f31 + concat + intc_2 // 3 + itob + extract 6 2 + bytec_0 // 0x + swap + concat + bytec_2 // 0x2a + concat + swap + concat + pushbytes 0xd93f374e // method "SharedStruct(byte[],uint8)" + swap + concat + log + // arc_56/contract.py:95 + // String("hello"), + bytec 4 // "hello" + len + itob + extract 6 2 + bytec 4 // "hello" + concat + // arc_56/contract.py:96 + // SharedStruct(foo=arc4.DynamicBytes(b"hello2"), bar=arc4.UInt8(42)), + bytec 5 // 0x68656c6c6f32 + len + itob + extract 6 2 + bytec 5 // 0x68656c6c6f32 + concat + intc_2 // 3 + itob + extract 6 2 + bytec_0 // 0x + swap + concat + bytec_2 // 0x2a + concat + swap + concat + // arc_56/contract.py:93-97 + // arc4.emit( + // "Anonymous", + // String("hello"), + // SharedStruct(foo=arc4.DynamicBytes(b"hello2"), bar=arc4.UInt8(42)), + // ) + pushint 4 // 4 + itob + extract 6 2 + bytec_0 // 0x + swap + concat + dig 2 + len + pushint 4 // 4 + + + itob + extract 6 2 + concat + uncover 2 + concat + swap + concat + pushbytes 0x1e72af4e // method "Anonymous(string,(byte[],uint8))" + swap + concat + log + retsub + + +// test_cases.arc_56.contract.Contract.conditional_emit(should_emit: uint64) -> void: +conditional_emit: + // arc_56/contract.py:99-100 + // @arc4.abimethod() + // def conditional_emit(self, should_emit: bool) -> None: + proto 1 0 + // arc_56/contract.py:101 + // if should_emit: + frame_dig -1 + bz conditional_emit_after_if_else@2 + // arc_56/contract.py:104 + // EventOnly(arc4.UInt64(42), arc4.UInt64(43)), + bytec_0 // 0x + pushbytes 0x000000000000002a + concat + pushbytes 0x000000000000002b + concat + // arc_56/contract.py:105 + // SharedStruct(foo=arc4.DynamicBytes(b"hello3"), bar=arc4.UInt8(42)), + bytec 6 // 0x68656c6c6f33 + len + itob + extract 6 2 + bytec 6 // 0x68656c6c6f33 + concat + intc_2 // 3 + itob + extract 6 2 + bytec_0 // 0x + swap + concat + bytec_2 // 0x2a + concat + swap + concat + // arc_56/contract.py:102-106 + // arc4.emit( + // "Anonymous2", + // EventOnly(arc4.UInt64(42), arc4.UInt64(43)), + // SharedStruct(foo=arc4.DynamicBytes(b"hello3"), bar=arc4.UInt8(42)), + // ) + bytec_0 // 0x + uncover 2 + concat + pushint 18 // 18 + itob + extract 6 2 + concat + swap + concat + pushbytes 0x11c547ba // method "Anonymous2((uint64,uint64),(byte[],uint8))" + swap + concat + log + +conditional_emit_after_if_else@2: + retsub + + +// test_cases.arc_56.contract.Contract.template_value() -> bytes, uint64, bytes, bytes: +template_value: + // arc_56/contract.py:108-109 + // @arc4.abimethod() + // def template_value(self) -> tuple[SharedStruct, UInt64, String, arc4.UInt8]: + proto 0 4 + // arc_56/contract.py:111 + // TemplateVar[SharedStruct]("STRUCT"), + bytec 7 // TMPL_STRUCT + // arc_56/contract.py:112 + // TemplateVar[UInt64]("AVM_UINT64"), + intc 4 // TMPL_AVM_UINT64 + // arc_56/contract.py:113 + // TemplateVar[String]("AVM_STRING"), + bytec 8 // TMPL_AVM_STRING + // arc_56/contract.py:114 + // TemplateVar[arc4.UInt8]("ARC4_UINT8"), + bytec 9 // TMPL_ARC4_UINT8 + // arc_56/contract.py:110-115 + // return ( + // TemplateVar[SharedStruct]("STRUCT"), + // TemplateVar[UInt64]("AVM_UINT64"), + // TemplateVar[String]("AVM_STRING"), + // TemplateVar[arc4.UInt8]("ARC4_UINT8"), + // ) + retsub + + +// test_cases.arc_56.contract.Contract.bare_create() -> void: +bare_create: + // arc_56/contract.py:63-64 + // @arc4.baremethod(create="allow", allow_actions=["NoOp", "OptIn"]) + // def bare_create(self) -> None: + proto 0 0 + retsub + + +// test_cases.arc_56.contract.Contract.transient() -> void: +transient: + // arc_56/contract.py:71-72 + // @arc4.baremethod(create="require", allow_actions=["DeleteApplication"]) + // def transient(self) -> None: + proto 0 0 + retsub + + +// test_cases.arc_56.contract.Contract.__init__() -> void: +__init__: + // arc_56/contract.py:43 + // def __init__(self) -> None: + proto 0 0 + retsub diff --git a/test_cases/arc_56/out_unoptimized/Contract.clear.teal b/test_cases/arc_56/out_unoptimized/Contract.clear.teal new file mode 100644 index 0000000000..883b1f693b --- /dev/null +++ b/test_cases/arc_56/out_unoptimized/Contract.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +test_cases.arc_56.contract.Contract.clear_state_program: + pushint 1 // 1 + return diff --git a/test_cases/arc_56/out_unoptimized/Contract.destructured.ir b/test_cases/arc_56/out_unoptimized/Contract.destructured.ir new file mode 100644 index 0000000000..8e37f2aea9 --- /dev/null +++ b/test_cases/arc_56/out_unoptimized/Contract.destructured.ir @@ -0,0 +1,261 @@ +contract test_cases.arc_56.contract.Contract: + program approval: + subroutine algopy.arc4.ARC4Contract.approval_program() -> bool: + block@0: // L1 + let app_id%0#0: uint64 = (txn ApplicationID) + goto app_id%0#0 ? block@2 : block@1 + block@1: // on_create_L43 + test_cases.arc_56.contract.Contract.__init__() + goto block@2 + block@2: // entrypoint_L43 + let tmp%0#0: bool = test_cases.arc_56.contract.Contract.__puya_arc4_router__() + return tmp%0#0 + + subroutine test_cases.arc_56.contract.Contract.__puya_arc4_router__() -> bool: + block@0: // L41 + let tmp%0#0: uint64 = (txn NumAppArgs) + let tmp%1#0: bool = (!= tmp%0#0 0u) + goto tmp%1#0 ? block@1 : block@11 + block@1: // abi_routing_L41 + let tmp%2#0: bytes = (txna ApplicationArgs 0) + switch tmp%2#0 {method "create()void" => block@2, method "struct_arg((uint64,string,(byte[],uint8)),(byte[],uint8))uint64" => block@3, method "struct_return((uint64,string,(byte[],uint8)))(byte[],uint8)" => block@4, method "emits_error((uint64,string,(byte[],uint8)))void" => block@5, method "emitter()void" => block@6, method "conditional_emit(bool)void" => block@7, method "template_value()((byte[],uint8),uint64,string,uint8)" => block@8, * => block@9} + block@2: // create_route_L67 + let tmp%3#0: uint64 = (txn OnCompletion) + let tmp%4#0: uint64 = (shl 1u tmp%3#0) + let tmp%5#0: uint64 = (& tmp%4#0 3u) + (assert tmp%5#0) // OnCompletion is one of NoOp, OptIn + test_cases.arc_56.contract.Contract.create() + return 1u + block@3: // struct_arg_route_L75 + let tmp%6#0: uint64 = (txn OnCompletion) + let tmp%7#0: bool = (== tmp%6#0 NoOp) + (assert tmp%7#0) // OnCompletion is NoOp + let tmp%8#0: uint64 = (txn ApplicationID) + let tmp%9#0: bool = (!= tmp%8#0 0u) + (assert tmp%9#0) // is not creating + let tmp%10#0: bytes = (txna ApplicationArgs 1) + let tmp%11#0: bytes = (txna ApplicationArgs 2) + let to_encode%0#0: uint64 = test_cases.arc_56.contract.Contract.struct_arg(tmp%10#0, tmp%11#0) + let val_as_bytes%0#0: bytes = (itob to_encode%0#0) + let tmp%12#0: bytes = (concat 0x151f7c75 val_as_bytes%0#0) + (log tmp%12#0) + return 1u + block@4: // struct_return_route_L80 + let tmp%13#0: uint64 = (txn OnCompletion) + let tmp%14#0: bool = (== tmp%13#0 NoOp) + (assert tmp%14#0) // OnCompletion is NoOp + let tmp%15#0: uint64 = (txn ApplicationID) + let tmp%16#0: bool = (!= tmp%15#0 0u) + (assert tmp%16#0) // is not creating + let tmp%17#0: bytes = (txna ApplicationArgs 1) + let tmp%18#0: bytes = test_cases.arc_56.contract.Contract.struct_return(tmp%17#0) + let tmp%19#0: bytes = (concat 0x151f7c75 tmp%18#0) + (log tmp%19#0) + return 1u + block@5: // emits_error_route_L85 + let tmp%20#0: uint64 = (txn OnCompletion) + let tmp%21#0: bool = (== tmp%20#0 NoOp) + (assert tmp%21#0) // OnCompletion is NoOp + let tmp%22#0: uint64 = (txn ApplicationID) + let tmp%23#0: bool = (!= tmp%22#0 0u) + (assert tmp%23#0) // is not creating + let tmp%24#0: bytes = (txna ApplicationArgs 1) + test_cases.arc_56.contract.Contract.errors(tmp%24#0) + return 1u + block@6: // emitter_route_L89 + let tmp%25#0: uint64 = (txn OnCompletion) + let tmp%26#0: bool = (== tmp%25#0 NoOp) + (assert tmp%26#0) // OnCompletion is NoOp + let tmp%27#0: uint64 = (txn ApplicationID) + let tmp%28#0: bool = (!= tmp%27#0 0u) + (assert tmp%28#0) // is not creating + test_cases.arc_56.contract.Contract.emitter() + return 1u + block@7: // conditional_emit_route_L99 + let tmp%29#0: uint64 = (txn OnCompletion) + let tmp%30#0: bool = (== tmp%29#0 NoOp) + (assert tmp%30#0) // OnCompletion is NoOp + let tmp%31#0: uint64 = (txn ApplicationID) + let tmp%32#0: bool = (!= tmp%31#0 0u) + (assert tmp%32#0) // is not creating + let tmp%33#0: bytes = (txna ApplicationArgs 1) + let tmp%34#0: bool = (getbit tmp%33#0 0u) + test_cases.arc_56.contract.Contract.conditional_emit(tmp%34#0) + return 1u + block@8: // template_value_route_L108 + let tmp%35#0: uint64 = (txn OnCompletion) + let tmp%36#0: bool = (== tmp%35#0 NoOp) + (assert tmp%36#0) // OnCompletion is NoOp + let tmp%37#0: uint64 = (txn ApplicationID) + let tmp%38#0: bool = (!= tmp%37#0 0u) + (assert tmp%38#0) // is not creating + let (elements_to_encode%0#0: bytes, elements_to_encode%1#0: uint64, elements_to_encode%2#0: bytes, elements_to_encode%3#0: bytes) = test_cases.arc_56.contract.Contract.template_value() + let val_as_bytes%1#0: bytes = (itob elements_to_encode%1#0) + let length%0#0: uint64 = (len elements_to_encode%2#0) + let as_bytes%0#0: bytes = (itob length%0#0) + let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) + let encoded_value%0#0: bytes = (concat length_uint16%0#0 elements_to_encode%2#0) + let as_bytes%1#0: bytes = (itob 13u) + let offset_as_uint16%0#0: bytes = ((extract 6 2) as_bytes%1#0) + let encoded_tuple_buffer%1#0: bytes = (concat 0x offset_as_uint16%0#0) + let data_length%0#0: uint64 = (len elements_to_encode%0#0) + let current_tail_offset%1#0: uint64 = (+ 13u data_length%0#0) + let encoded_tuple_buffer%2#0: bytes = (concat encoded_tuple_buffer%1#0 val_as_bytes%1#0) + let as_bytes%2#0: bytes = (itob current_tail_offset%1#0) + let offset_as_uint16%1#0: bytes = ((extract 6 2) as_bytes%2#0) + let encoded_tuple_buffer%3#0: bytes = (concat encoded_tuple_buffer%2#0 offset_as_uint16%1#0) + let encoded_tuple_buffer%4#0: bytes = (concat encoded_tuple_buffer%3#0 elements_to_encode%3#0) + let encoded_tuple_buffer%5#0: bytes = (concat encoded_tuple_buffer%4#0 elements_to_encode%0#0) + let encoded_tuple_buffer%6#0: bytes = (concat encoded_tuple_buffer%5#0 encoded_value%0#0) + let tmp%39#0: bytes = (concat 0x151f7c75 encoded_tuple_buffer%6#0) + (log tmp%39#0) + return 1u + block@9: // switch_case_default_L41 + goto block@10 + block@10: // switch_case_next_L41 + goto block@16 + block@11: // bare_routing_L41 + let tmp%40#0: uint64 = (txn OnCompletion) + switch tmp%40#0 {0u => block@12, 1u => block@12, 5u => block@13, * => block@14} + block@12: // bare_create_L63 + test_cases.arc_56.contract.Contract.bare_create() + return 1u + block@13: // transient_L71 + let tmp%41#0: uint64 = (txn ApplicationID) + let tmp%42#0: bool = (== tmp%41#0 0u) + (assert tmp%42#0) // is creating + test_cases.arc_56.contract.Contract.transient() + return 1u + block@14: // switch_case_default_L41 + goto block@15 + block@15: // switch_case_next_L41 + goto block@16 + block@16: // after_if_else_L41 + return 0u + + subroutine test_cases.arc_56.contract.Contract.create() -> void: + block@0: // L67 + return + + subroutine test_cases.arc_56.contract.Contract.struct_arg(arg: bytes, shared: bytes) -> uint64: + block@0: // L75 + let item_start_offset%0#0: uint64 = (extract_uint16 arg#0 10u) + let item_end_offset%0#0: uint64 = (len arg#0) + let tmp%0#0: bytes = (substring3 arg#0 item_start_offset%0#0 item_end_offset%0#0) + let tmp%1#0: bool = (== tmp%0#0 shared#0) + (assert tmp%1#0) // this might error + return 42u + + subroutine test_cases.arc_56.contract.Contract.struct_return(arg: bytes) -> bytes: + block@0: // L80 + let item_start_offset%0#0: uint64 = (extract_uint16 arg#0 10u) + let item_end_offset%0#0: uint64 = (len arg#0) + let tmp%0#0: bytes = (substring3 arg#0 item_start_offset%0#0 item_end_offset%0#0) + let item_start_offset%1#0: uint64 = (extract_uint16 arg#0 10u) + let item_end_offset%1#0: uint64 = (len arg#0) + let tmp%1#0: bytes = (substring3 arg#0 item_start_offset%1#0 item_end_offset%1#0) + let (echo%0#0: bytes, echo%1#0: bytes) = test_cases.arc_56.contract.echo(tmp%1#0) + let tmp%2#0: bool = (== tmp%0#0 echo%0#0) + (assert tmp%2#0) // this won't error + let item_start_offset%2#0: uint64 = (extract_uint16 arg#0 10u) + let item_end_offset%2#0: uint64 = (len arg#0) + let tmp%3#0: bytes = (substring3 arg#0 item_start_offset%2#0 item_end_offset%2#0) + return tmp%3#0 + + subroutine test_cases.arc_56.contract.echo(s: bytes) -> : + block@0: // L118 + return s#0 s#0 + + subroutine test_cases.arc_56.contract.Contract.errors(arg: bytes) -> void: + block@0: // L85 + let tmp%0#0: bytes = (extract3 arg#0 0u 8u) // on error: Index access is out of bounds + let tmp%1#0: bool = (== tmp%0#0 0x00) + (assert tmp%1#0) // this will error + return + + subroutine test_cases.arc_56.contract.Contract.emitter() -> void: + block@0: // L89 + let length%0#0: uint64 = (len 0x68656c6c6f31) + let as_bytes%0#0: bytes = (itob length%0#0) + let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) + let encoded_value%0#0: bytes = (concat length_uint16%0#0 0x68656c6c6f31) + let as_bytes%1#0: bytes = (itob 3u) + let offset_as_uint16%0#0: bytes = ((extract 6 2) as_bytes%1#0) + let encoded_tuple_buffer%1#0: bytes = (concat 0x offset_as_uint16%0#0) + let encoded_tuple_buffer%2#0: bytes = (concat encoded_tuple_buffer%1#0 0x2a) + let encoded_tuple_buffer%3#0: bytes = (concat encoded_tuple_buffer%2#0 encoded_value%0#0) + let event%0#0: bytes = (concat method "SharedStruct(byte[],uint8)" encoded_tuple_buffer%3#0) + (log event%0#0) + let length%1#0: uint64 = (len "hello") + let as_bytes%2#0: bytes = (itob length%1#0) + let length_uint16%1#0: bytes = ((extract 6 2) as_bytes%2#0) + let encoded_value%1#0: bytes = (concat length_uint16%1#0 "hello") + let length%2#0: uint64 = (len 0x68656c6c6f32) + let as_bytes%3#0: bytes = (itob length%2#0) + let length_uint16%2#0: bytes = ((extract 6 2) as_bytes%3#0) + let encoded_value%2#0: bytes = (concat length_uint16%2#0 0x68656c6c6f32) + let as_bytes%4#0: bytes = (itob 3u) + let offset_as_uint16%1#0: bytes = ((extract 6 2) as_bytes%4#0) + let encoded_tuple_buffer%5#0: bytes = (concat 0x offset_as_uint16%1#0) + let encoded_tuple_buffer%6#0: bytes = (concat encoded_tuple_buffer%5#0 0x2a) + let encoded_tuple_buffer%7#0: bytes = (concat encoded_tuple_buffer%6#0 encoded_value%2#0) + let as_bytes%5#0: bytes = (itob 4u) + let offset_as_uint16%2#0: bytes = ((extract 6 2) as_bytes%5#0) + let encoded_tuple_buffer%9#0: bytes = (concat 0x offset_as_uint16%2#0) + let data_length%2#0: uint64 = (len encoded_value%1#0) + let current_tail_offset%5#0: uint64 = (+ 4u data_length%2#0) + let as_bytes%6#0: bytes = (itob current_tail_offset%5#0) + let offset_as_uint16%3#0: bytes = ((extract 6 2) as_bytes%6#0) + let encoded_tuple_buffer%10#0: bytes = (concat encoded_tuple_buffer%9#0 offset_as_uint16%3#0) + let encoded_tuple_buffer%11#0: bytes = (concat encoded_tuple_buffer%10#0 encoded_value%1#0) + let encoded_tuple_buffer%12#0: bytes = (concat encoded_tuple_buffer%11#0 encoded_tuple_buffer%7#0) + let event%1#0: bytes = (concat method "Anonymous(string,(byte[],uint8))" encoded_tuple_buffer%12#0) + (log event%1#0) + return + + subroutine test_cases.arc_56.contract.Contract.conditional_emit(should_emit: bool) -> void: + block@0: // L99 + goto should_emit#0 ? block@1 : block@2 + block@1: // if_body_L102 + let encoded_tuple_buffer%1#0: bytes = (concat 0x 0x000000000000002a) + let encoded_tuple_buffer%2#0: bytes = (concat encoded_tuple_buffer%1#0 0x000000000000002b) + let length%0#0: uint64 = (len 0x68656c6c6f33) + let as_bytes%0#0: bytes = (itob length%0#0) + let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) + let encoded_value%0#0: bytes = (concat length_uint16%0#0 0x68656c6c6f33) + let as_bytes%1#0: bytes = (itob 3u) + let offset_as_uint16%0#0: bytes = ((extract 6 2) as_bytes%1#0) + let encoded_tuple_buffer%4#0: bytes = (concat 0x offset_as_uint16%0#0) + let encoded_tuple_buffer%5#0: bytes = (concat encoded_tuple_buffer%4#0 0x2a) + let encoded_tuple_buffer%6#0: bytes = (concat encoded_tuple_buffer%5#0 encoded_value%0#0) + let encoded_tuple_buffer%8#0: bytes = (concat 0x encoded_tuple_buffer%2#0) + let as_bytes%2#0: bytes = (itob 18u) + let offset_as_uint16%1#0: bytes = ((extract 6 2) as_bytes%2#0) + let encoded_tuple_buffer%9#0: bytes = (concat encoded_tuple_buffer%8#0 offset_as_uint16%1#0) + let encoded_tuple_buffer%10#0: bytes = (concat encoded_tuple_buffer%9#0 encoded_tuple_buffer%6#0) + let event%0#0: bytes = (concat method "Anonymous2((uint64,uint64),(byte[],uint8))" encoded_tuple_buffer%10#0) + (log event%0#0) + goto block@2 + block@2: // after_if_else_L101 + return + + subroutine test_cases.arc_56.contract.Contract.template_value() -> : + block@0: // L108 + return TemplateVar[bytes](TMPL_STRUCT) TemplateVar[uint64](TMPL_AVM_UINT64) TemplateVar[bytes](TMPL_AVM_STRING) TemplateVar[bytes](TMPL_ARC4_UINT8) + + subroutine test_cases.arc_56.contract.Contract.bare_create() -> void: + block@0: // L63 + return + + subroutine test_cases.arc_56.contract.Contract.transient() -> void: + block@0: // L71 + return + + subroutine test_cases.arc_56.contract.Contract.__init__() -> void: + block@0: // L43 + return + + program clear-state: + subroutine algopy.arc4.ARC4Contract.clear_state_program() -> bool: + block@0: // L1 + return 1u \ No newline at end of file diff --git a/test_cases/arc_56/puya.log b/test_cases/arc_56/puya.log new file mode 100644 index 0000000000..f41b568533 --- /dev/null +++ b/test_cases/arc_56/puya.log @@ -0,0 +1,2317 @@ +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={'STRUCT': b'/x00/x02/xff/x00/x02Hi', 'AVM_UINT64': 123, 'AVM_STRING': b'Hello', 'ARC4_UINT8': b'/xff'}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['arc_56'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +info: Found python prefix: /.venv +info: writing arc_56/out/module.awst +debug: Sealing block@0: // L12 +debug: Terminated block@0: // L12 +debug: Looking for 'required_budget_with_buffer' in an unsealed block creating an incomplete Phi: block@1: // while_top_L20 +debug: Created Phi assignment: let required_budget_with_buffer#1: uint64 = undefined while trying to resolve 'required_budget_with_buffer' in block@1: // while_top_L20 +debug: Terminated block@1: // while_top_L20 +debug: Sealing block@2: // while_body_L21 +debug: Looking for 'fee_source' in an unsealed block creating an incomplete Phi: block@1: // while_top_L20 +debug: Created Phi assignment: let fee_source#1: uint64 = undefined while trying to resolve 'fee_source' in block@1: // while_top_L20 +debug: Terminated block@2: // while_body_L21 +debug: Sealing block@3: // switch_case_0_L28 +debug: Terminated block@3: // switch_case_0_L28 +debug: Sealing block@4: // switch_case_1_L30 +debug: Terminated block@4: // switch_case_1_L30 +debug: Sealing block@5: // switch_case_default_L26 +debug: Terminated block@5: // switch_case_default_L26 +debug: Sealing block@6: // switch_case_next_L26 +debug: Terminated block@6: // switch_case_next_L26 +debug: Sealing block@1: // while_top_L20 +debug: Added required_budget_with_buffer#0 to Phi node: let required_budget_with_buffer#1: uint64 = φ(required_budget_with_buffer#0 <- block@0) in block@0: // L12 +debug: Created Phi assignment: let required_budget_with_buffer#2: uint64 = undefined while trying to resolve 'required_budget_with_buffer' in block@6: // switch_case_next_L26 +debug: Added required_budget_with_buffer#1 to Phi node: let required_budget_with_buffer#2: uint64 = φ(required_budget_with_buffer#1 <- block@3) in block@3: // switch_case_0_L28 +debug: Added required_budget_with_buffer#1 to Phi node: let required_budget_with_buffer#2: uint64 = φ(required_budget_with_buffer#1 <- block@3, required_budget_with_buffer#1 <- block@4) in block@4: // switch_case_1_L30 +debug: Added required_budget_with_buffer#1 to Phi node: let required_budget_with_buffer#2: uint64 = φ(required_budget_with_buffer#1 <- block@3, required_budget_with_buffer#1 <- block@4, required_budget_with_buffer#1 <- block@5) in block@5: // switch_case_default_L26 +debug: Replacing trivial Phi node: let required_budget_with_buffer#2: uint64 = φ(required_budget_with_buffer#1 <- block@3, required_budget_with_buffer#1 <- block@4, required_budget_with_buffer#1 <- block@5) (required_budget_with_buffer#2) with required_budget_with_buffer#1 +debug: Deleting Phi assignment: let required_budget_with_buffer#2: uint64 = φ(required_budget_with_buffer#1 <- block@3, required_budget_with_buffer#1 <- block@4, required_budget_with_buffer#1 <- block@5) +debug: Replaced trivial Phi node: let required_budget_with_buffer#2: uint64 = φ(required_budget_with_buffer#1 <- block@3, required_budget_with_buffer#1 <- block@4, required_budget_with_buffer#1 <- block@5) (required_budget_with_buffer#2) with required_budget_with_buffer#1 in current definition for 1 blocks +debug: Added required_budget_with_buffer#1 to Phi node: let required_budget_with_buffer#1: uint64 = φ(required_budget_with_buffer#0 <- block@0, required_budget_with_buffer#1 <- block@6) in block@6: // switch_case_next_L26 +debug: Replacing trivial Phi node: let required_budget_with_buffer#1: uint64 = φ(required_budget_with_buffer#0 <- block@0, required_budget_with_buffer#1 <- block@6) (required_budget_with_buffer#1) with required_budget_with_buffer#0 +debug: Deleting Phi assignment: let required_budget_with_buffer#1: uint64 = φ(required_budget_with_buffer#0 <- block@0, required_budget_with_buffer#1 <- block@6) +debug: Replaced trivial Phi node: let required_budget_with_buffer#1: uint64 = φ(required_budget_with_buffer#0 <- block@0, required_budget_with_buffer#1 <- block@6) (required_budget_with_buffer#1) with required_budget_with_buffer#0 in current definition for 6 blocks +debug: Added fee_source#0 to Phi node: let fee_source#1: uint64 = φ(fee_source#0 <- block@0) in block@0: // L12 +debug: Created Phi assignment: let fee_source#2: uint64 = undefined while trying to resolve 'fee_source' in block@6: // switch_case_next_L26 +debug: Added fee_source#1 to Phi node: let fee_source#2: uint64 = φ(fee_source#1 <- block@3) in block@3: // switch_case_0_L28 +debug: Added fee_source#1 to Phi node: let fee_source#2: uint64 = φ(fee_source#1 <- block@3, fee_source#1 <- block@4) in block@4: // switch_case_1_L30 +debug: Added fee_source#1 to Phi node: let fee_source#2: uint64 = φ(fee_source#1 <- block@3, fee_source#1 <- block@4, fee_source#1 <- block@5) in block@5: // switch_case_default_L26 +debug: Replacing trivial Phi node: let fee_source#2: uint64 = φ(fee_source#1 <- block@3, fee_source#1 <- block@4, fee_source#1 <- block@5) (fee_source#2) with fee_source#1 +debug: Deleting Phi assignment: let fee_source#2: uint64 = φ(fee_source#1 <- block@3, fee_source#1 <- block@4, fee_source#1 <- block@5) +debug: Replaced trivial Phi node: let fee_source#2: uint64 = φ(fee_source#1 <- block@3, fee_source#1 <- block@4, fee_source#1 <- block@5) (fee_source#2) with fee_source#1 in current definition for 1 blocks +debug: Added fee_source#1 to Phi node: let fee_source#1: uint64 = φ(fee_source#0 <- block@0, fee_source#1 <- block@6) in block@6: // switch_case_next_L26 +debug: Replacing trivial Phi node: let fee_source#1: uint64 = φ(fee_source#0 <- block@0, fee_source#1 <- block@6) (fee_source#1) with fee_source#0 +debug: Deleting Phi assignment: let fee_source#1: uint64 = φ(fee_source#0 <- block@0, fee_source#1 <- block@6) +debug: Replaced trivial Phi node: let fee_source#1: uint64 = φ(fee_source#0 <- block@0, fee_source#1 <- block@6) (fee_source#1) with fee_source#0 in current definition for 6 blocks +debug: Sealing block@7: // after_while_L20 +debug: Terminated block@7: // after_while_L20 +debug: Sealing block@0: // L4 +debug: Terminated block@0: // L4 +debug: Looking for 'start' in an unsealed block creating an incomplete Phi: block@1: // while_top_L11 +debug: Created Phi assignment: let start#1: uint64 = undefined while trying to resolve 'start' in block@1: // while_top_L11 +debug: Looking for 'item' in an unsealed block creating an incomplete Phi: block@1: // while_top_L11 +debug: Created Phi assignment: let item#1: bytes = undefined while trying to resolve 'item' in block@1: // while_top_L11 +debug: Looking for 'sequence' in an unsealed block creating an incomplete Phi: block@1: // while_top_L11 +debug: Created Phi assignment: let sequence#1: bytes = undefined while trying to resolve 'sequence' in block@1: // while_top_L11 +debug: Terminated block@1: // while_top_L11 +debug: Sealing block@2: // while_body_L12 +debug: Terminated block@2: // while_body_L12 +debug: Sealing block@3: // if_body_L13 +debug: Terminated block@3: // if_body_L13 +debug: Sealing block@4: // after_if_else_L12 +debug: Terminated block@4: // after_if_else_L12 +debug: Sealing block@1: // while_top_L11 +debug: Added start#0 to Phi node: let start#1: uint64 = φ(start#0 <- block@0) in block@0: // L4 +debug: Added start#2 to Phi node: let start#1: uint64 = φ(start#0 <- block@0, start#2 <- block@4) in block@4: // after_if_else_L12 +debug: Added item#0 to Phi node: let item#1: bytes = φ(item#0 <- block@0) in block@0: // L4 +debug: Added item#1 to Phi node: let item#1: bytes = φ(item#0 <- block@0, item#1 <- block@4) in block@4: // after_if_else_L12 +debug: Replacing trivial Phi node: let item#1: bytes = φ(item#0 <- block@0, item#1 <- block@4) (item#1) with item#0 +debug: Deleting Phi assignment: let item#1: bytes = φ(item#0 <- block@0, item#1 <- block@4) +debug: Replaced trivial Phi node: let item#1: bytes = φ(item#0 <- block@0, item#1 <- block@4) (item#1) with item#0 in current definition for 3 blocks +debug: Added sequence#0 to Phi node: let sequence#1: bytes = φ(sequence#0 <- block@0) in block@0: // L4 +debug: Added sequence#1 to Phi node: let sequence#1: bytes = φ(sequence#0 <- block@0, sequence#1 <- block@4) in block@4: // after_if_else_L12 +debug: Replacing trivial Phi node: let sequence#1: bytes = φ(sequence#0 <- block@0, sequence#1 <- block@4) (sequence#1) with sequence#0 +debug: Deleting Phi assignment: let sequence#1: bytes = φ(sequence#0 <- block@0, sequence#1 <- block@4) +debug: Replaced trivial Phi node: let sequence#1: bytes = φ(sequence#0 <- block@0, sequence#1 <- block@4) (sequence#1) with sequence#0 in current definition for 3 blocks +debug: Sealing block@5: // after_while_L11 +debug: Terminated block@5: // after_while_L11 +debug: Sealing block@0: // L25 +debug: Terminated block@0: // L25 +debug: Sealing block@0: // L44 +debug: Terminated block@0: // L44 +debug: Sealing block@0: // L62 +debug: Terminated block@0: // L62 +debug: Sealing block@0: // L92 +debug: Terminated block@0: // L92 +debug: Looking for 'head_offset' in an unsealed block creating an incomplete Phi: block@1: // for_header_L110 +debug: Created Phi assignment: let head_offset#1: uint64 = undefined while trying to resolve 'head_offset' in block@1: // for_header_L110 +debug: Terminated block@1: // for_header_L110 +debug: Sealing block@2: // for_body_L111 +debug: Looking for 'head_and_tail' in an unsealed block creating an incomplete Phi: block@1: // for_header_L110 +debug: Created Phi assignment: let head_and_tail#1: bytes = undefined while trying to resolve 'head_and_tail' in block@1: // for_header_L110 +debug: Looking for 'new_head' in an unsealed block creating an incomplete Phi: block@1: // for_header_L110 +debug: Created Phi assignment: let new_head#1: bytes = undefined while trying to resolve 'new_head' in block@1: // for_header_L110 +debug: Terminated block@2: // for_body_L111 +debug: Sealing block@3: // for_footer_L110 +debug: Terminated block@3: // for_footer_L110 +debug: Sealing block@1: // for_header_L110 +debug: Added head_offset#0 to Phi node: let head_offset#1: uint64 = φ(head_offset#0 <- block@0) in block@0: // L92 +debug: Added head_offset#2 to Phi node: let head_offset#1: uint64 = φ(head_offset#0 <- block@0, head_offset#2 <- block@3) in block@3: // for_footer_L110 +debug: Added head_and_tail#0 to Phi node: let head_and_tail#1: bytes = φ(head_and_tail#0 <- block@0) in block@0: // L92 +debug: Added head_and_tail#1 to Phi node: let head_and_tail#1: bytes = φ(head_and_tail#0 <- block@0, head_and_tail#1 <- block@3) in block@3: // for_footer_L110 +debug: Replacing trivial Phi node: let head_and_tail#1: bytes = φ(head_and_tail#0 <- block@0, head_and_tail#1 <- block@3) (head_and_tail#1) with head_and_tail#0 +debug: Deleting Phi assignment: let head_and_tail#1: bytes = φ(head_and_tail#0 <- block@0, head_and_tail#1 <- block@3) +debug: Replaced trivial Phi node: let head_and_tail#1: bytes = φ(head_and_tail#0 <- block@0, head_and_tail#1 <- block@3) (head_and_tail#1) with head_and_tail#0 in current definition for 3 blocks +debug: Added new_head#0 to Phi node: let new_head#1: bytes = φ(new_head#0 <- block@0) in block@0: // L92 +debug: Added new_head#2 to Phi node: let new_head#1: bytes = φ(new_head#0 <- block@0, new_head#2 <- block@3) in block@3: // for_footer_L110 +debug: Sealing block@4: // after_for_L110 +debug: Created Phi assignment: let length_minus_1#1: uint64 = undefined while trying to resolve 'length_minus_1' in block@1: // for_header_L110 +debug: Added length_minus_1#0 to Phi node: let length_minus_1#1: uint64 = φ(length_minus_1#0 <- block@0) in block@0: // L92 +debug: Added length_minus_1#1 to Phi node: let length_minus_1#1: uint64 = φ(length_minus_1#0 <- block@0, length_minus_1#1 <- block@3) in block@3: // for_footer_L110 +debug: Replacing trivial Phi node: let length_minus_1#1: uint64 = φ(length_minus_1#0 <- block@0, length_minus_1#1 <- block@3) (length_minus_1#1) with length_minus_1#0 +debug: Deleting Phi assignment: let length_minus_1#1: uint64 = φ(length_minus_1#0 <- block@0, length_minus_1#1 <- block@3) +debug: Replaced trivial Phi node: let length_minus_1#1: uint64 = φ(length_minus_1#0 <- block@0, length_minus_1#1 <- block@3) (length_minus_1#1) with length_minus_1#0 in current definition for 3 blocks +debug: Created Phi assignment: let popped_header_offset#1: uint64 = undefined while trying to resolve 'popped_header_offset' in block@1: // for_header_L110 +debug: Added popped_header_offset#0 to Phi node: let popped_header_offset#1: uint64 = φ(popped_header_offset#0 <- block@0) in block@0: // L92 +debug: Added popped_header_offset#1 to Phi node: let popped_header_offset#1: uint64 = φ(popped_header_offset#0 <- block@0, popped_header_offset#1 <- block@3) in block@3: // for_footer_L110 +debug: Replacing trivial Phi node: let popped_header_offset#1: uint64 = φ(popped_header_offset#0 <- block@0, popped_header_offset#1 <- block@3) (popped_header_offset#1) with popped_header_offset#0 +debug: Deleting Phi assignment: let popped_header_offset#1: uint64 = φ(popped_header_offset#0 <- block@0, popped_header_offset#1 <- block@3) +debug: Replaced trivial Phi node: let popped_header_offset#1: uint64 = φ(popped_header_offset#0 <- block@0, popped_header_offset#1 <- block@3) (popped_header_offset#1) with popped_header_offset#0 in current definition for 3 blocks +debug: Created Phi assignment: let popped_offset#1: uint64 = undefined while trying to resolve 'popped_offset' in block@1: // for_header_L110 +debug: Added popped_offset#0 to Phi node: let popped_offset#1: uint64 = φ(popped_offset#0 <- block@0) in block@0: // L92 +debug: Added popped_offset#1 to Phi node: let popped_offset#1: uint64 = φ(popped_offset#0 <- block@0, popped_offset#1 <- block@3) in block@3: // for_footer_L110 +debug: Replacing trivial Phi node: let popped_offset#1: uint64 = φ(popped_offset#0 <- block@0, popped_offset#1 <- block@3) (popped_offset#1) with popped_offset#0 +debug: Deleting Phi assignment: let popped_offset#1: uint64 = φ(popped_offset#0 <- block@0, popped_offset#1 <- block@3) +debug: Replaced trivial Phi node: let popped_offset#1: uint64 = φ(popped_offset#0 <- block@0, popped_offset#1 <- block@3) (popped_offset#1) with popped_offset#0 in current definition for 3 blocks +debug: Created Phi assignment: let popped#1: bytes = undefined while trying to resolve 'popped' in block@1: // for_header_L110 +debug: Added popped#0 to Phi node: let popped#1: bytes = φ(popped#0 <- block@0) in block@0: // L92 +debug: Added popped#1 to Phi node: let popped#1: bytes = φ(popped#0 <- block@0, popped#1 <- block@3) in block@3: // for_footer_L110 +debug: Replacing trivial Phi node: let popped#1: bytes = φ(popped#0 <- block@0, popped#1 <- block@3) (popped#1) with popped#0 +debug: Deleting Phi assignment: let popped#1: bytes = φ(popped#0 <- block@0, popped#1 <- block@3) +debug: Replaced trivial Phi node: let popped#1: bytes = φ(popped#0 <- block@0, popped#1 <- block@3) (popped#1) with popped#0 in current definition for 3 blocks +debug: Terminated block@4: // after_for_L110 +debug: Sealing block@0: // L124 +debug: Terminated block@0: // L124 +debug: Sealing block@1: // if_body_L147 +debug: Terminated block@1: // if_body_L147 +debug: Sealing block@2: // after_if_else_L146 +debug: Created Phi assignment: let array_length#1: uint64 = undefined while trying to resolve 'array_length' in block@2: // after_if_else_L146 +debug: Added array_length#0 to Phi node: let array_length#1: uint64 = φ(array_length#0 <- block@0) in block@0: // L124 +debug: Added array_length#0 to Phi node: let array_length#1: uint64 = φ(array_length#0 <- block@0, array_length#0 <- block@1) in block@1: // if_body_L147 +debug: Replacing trivial Phi node: let array_length#1: uint64 = φ(array_length#0 <- block@0, array_length#0 <- block@1) (array_length#1) with array_length#0 +debug: Deleting Phi assignment: let array_length#1: uint64 = φ(array_length#0 <- block@0, array_length#0 <- block@1) +debug: Replaced trivial Phi node: let array_length#1: uint64 = φ(array_length#0 <- block@0, array_length#0 <- block@1) (array_length#1) with array_length#0 in current definition for 1 blocks +debug: Created Phi assignment: let is_packed#1: bool = undefined while trying to resolve 'is_packed' in block@2: // after_if_else_L146 +debug: Added is_packed#0 to Phi node: let is_packed#1: bool = φ(is_packed#0 <- block@0) in block@0: // L124 +debug: Added is_packed#0 to Phi node: let is_packed#1: bool = φ(is_packed#0 <- block@0, is_packed#0 <- block@1) in block@1: // if_body_L147 +debug: Replacing trivial Phi node: let is_packed#1: bool = φ(is_packed#0 <- block@0, is_packed#0 <- block@1) (is_packed#1) with is_packed#0 +debug: Deleting Phi assignment: let is_packed#1: bool = φ(is_packed#0 <- block@0, is_packed#0 <- block@1) +debug: Replaced trivial Phi node: let is_packed#1: bool = φ(is_packed#0 <- block@0, is_packed#0 <- block@1) (is_packed#1) with is_packed#0 in current definition for 1 blocks +debug: Created Phi assignment: let new_items_count#1: uint64 = undefined while trying to resolve 'new_items_count' in block@2: // after_if_else_L146 +debug: Added new_items_count#0 to Phi node: let new_items_count#1: uint64 = φ(new_items_count#0 <- block@0) in block@0: // L124 +debug: Added new_items_count#0 to Phi node: let new_items_count#1: uint64 = φ(new_items_count#0 <- block@0, new_items_count#0 <- block@1) in block@1: // if_body_L147 +debug: Replacing trivial Phi node: let new_items_count#1: uint64 = φ(new_items_count#0 <- block@0, new_items_count#0 <- block@1) (new_items_count#1) with new_items_count#0 +debug: Deleting Phi assignment: let new_items_count#1: uint64 = φ(new_items_count#0 <- block@0, new_items_count#0 <- block@1) +debug: Replaced trivial Phi node: let new_items_count#1: uint64 = φ(new_items_count#0 <- block@0, new_items_count#0 <- block@1) (new_items_count#1) with new_items_count#0 in current definition for 1 blocks +debug: Terminated block@2: // after_if_else_L146 +debug: Looking for 'i' in an unsealed block creating an incomplete Phi: block@3: // for_header_L150 +debug: Created Phi assignment: let i#1: uint64 = undefined while trying to resolve 'i' in block@3: // for_header_L150 +debug: Terminated block@3: // for_header_L150 +debug: Sealing block@4: // for_body_L151 +debug: Looking for 'result' in an unsealed block creating an incomplete Phi: block@3: // for_header_L150 +debug: Created Phi assignment: let result#2: bytes = undefined while trying to resolve 'result' in block@3: // for_header_L150 +debug: Looking for 'write_offset' in an unsealed block creating an incomplete Phi: block@3: // for_header_L150 +debug: Created Phi assignment: let write_offset#1: uint64 = undefined while trying to resolve 'write_offset' in block@3: // for_header_L150 +debug: Looking for 'new_items_bytes' in an unsealed block creating an incomplete Phi: block@3: // for_header_L150 +debug: Created Phi assignment: let new_items_bytes#1: bytes = undefined while trying to resolve 'new_items_bytes' in block@3: // for_header_L150 +debug: Terminated block@4: // for_body_L151 +debug: Sealing block@5: // for_footer_L150 +debug: Terminated block@5: // for_footer_L150 +debug: Sealing block@3: // for_header_L150 +debug: Added i#0 to Phi node: let i#1: uint64 = φ(i#0 <- block@2) in block@2: // after_if_else_L146 +debug: Added i#2 to Phi node: let i#1: uint64 = φ(i#0 <- block@2, i#2 <- block@5) in block@5: // for_footer_L150 +debug: Created Phi assignment: let result#4: bytes = undefined while trying to resolve 'result' in block@2: // after_if_else_L146 +debug: Added result#0 to Phi node: let result#4: bytes = φ(result#0 <- block@0) in block@0: // L124 +debug: Added result#1 to Phi node: let result#4: bytes = φ(result#0 <- block@0, result#1 <- block@1) in block@1: // if_body_L147 +debug: Added result#4 to Phi node: let result#2: bytes = φ(result#4 <- block@2) in block@2: // after_if_else_L146 +debug: Added result#3 to Phi node: let result#2: bytes = φ(result#4 <- block@2, result#3 <- block@5) in block@5: // for_footer_L150 +debug: Added write_offset#0 to Phi node: let write_offset#1: uint64 = φ(write_offset#0 <- block@2) in block@2: // after_if_else_L146 +debug: Added write_offset#2 to Phi node: let write_offset#1: uint64 = φ(write_offset#0 <- block@2, write_offset#2 <- block@5) in block@5: // for_footer_L150 +debug: Created Phi assignment: let new_items_bytes#2: bytes = undefined while trying to resolve 'new_items_bytes' in block@2: // after_if_else_L146 +debug: Added new_items_bytes#0 to Phi node: let new_items_bytes#2: bytes = φ(new_items_bytes#0 <- block@0) in block@0: // L124 +debug: Added new_items_bytes#0 to Phi node: let new_items_bytes#2: bytes = φ(new_items_bytes#0 <- block@0, new_items_bytes#0 <- block@1) in block@1: // if_body_L147 +debug: Replacing trivial Phi node: let new_items_bytes#2: bytes = φ(new_items_bytes#0 <- block@0, new_items_bytes#0 <- block@1) (new_items_bytes#2) with new_items_bytes#0 +debug: Deleting Phi assignment: let new_items_bytes#2: bytes = φ(new_items_bytes#0 <- block@0, new_items_bytes#0 <- block@1) +debug: Replaced trivial Phi node: let new_items_bytes#2: bytes = φ(new_items_bytes#0 <- block@0, new_items_bytes#0 <- block@1) (new_items_bytes#2) with new_items_bytes#0 in current definition for 1 blocks +debug: Added new_items_bytes#0 to Phi node: let new_items_bytes#1: bytes = φ(new_items_bytes#0 <- block@2) in block@2: // after_if_else_L146 +debug: Added new_items_bytes#1 to Phi node: let new_items_bytes#1: bytes = φ(new_items_bytes#0 <- block@2, new_items_bytes#1 <- block@5) in block@5: // for_footer_L150 +debug: Replacing trivial Phi node: let new_items_bytes#1: bytes = φ(new_items_bytes#0 <- block@2, new_items_bytes#1 <- block@5) (new_items_bytes#1) with new_items_bytes#0 +debug: Deleting Phi assignment: let new_items_bytes#1: bytes = φ(new_items_bytes#0 <- block@2, new_items_bytes#1 <- block@5) +debug: Replaced trivial Phi node: let new_items_bytes#1: bytes = φ(new_items_bytes#0 <- block@2, new_items_bytes#1 <- block@5) (new_items_bytes#1) with new_items_bytes#0 in current definition for 3 blocks +debug: Sealing block@6: // after_for_L150 +debug: Terminated block@6: // after_for_L150 +debug: Sealing block@0: // L157 +debug: Terminated block@0: // L157 +debug: Sealing block@0: // L189 +debug: Terminated block@0: // L189 +debug: Looking for 'head_offset' in an unsealed block creating an incomplete Phi: block@1: // for_header_L199 +debug: Created Phi assignment: let head_offset#1: uint64 = undefined while trying to resolve 'head_offset' in block@1: // for_header_L199 +debug: Terminated block@1: // for_header_L199 +debug: Sealing block@2: // for_body_L200 +debug: Looking for 'array_head_and_tail' in an unsealed block creating an incomplete Phi: block@1: // for_header_L199 +debug: Created Phi assignment: let array_head_and_tail#1: bytes = undefined while trying to resolve 'array_head_and_tail' in block@1: // for_header_L199 +debug: Looking for 'new_head' in an unsealed block creating an incomplete Phi: block@1: // for_header_L199 +debug: Created Phi assignment: let new_head#1: bytes = undefined while trying to resolve 'new_head' in block@1: // for_header_L199 +debug: Looking for 'item_offset_adjustment' in an unsealed block creating an incomplete Phi: block@1: // for_header_L199 +debug: Created Phi assignment: let item_offset_adjustment#1: uint64 = undefined while trying to resolve 'item_offset_adjustment' in block@1: // for_header_L199 +debug: Terminated block@2: // for_body_L200 +debug: Sealing block@3: // for_footer_L199 +debug: Terminated block@3: // for_footer_L199 +debug: Sealing block@1: // for_header_L199 +debug: Added head_offset#0 to Phi node: let head_offset#1: uint64 = φ(head_offset#0 <- block@0) in block@0: // L189 +debug: Added head_offset#2 to Phi node: let head_offset#1: uint64 = φ(head_offset#0 <- block@0, head_offset#2 <- block@3) in block@3: // for_footer_L199 +debug: Added array_head_and_tail#0 to Phi node: let array_head_and_tail#1: bytes = φ(array_head_and_tail#0 <- block@0) in block@0: // L189 +debug: Added array_head_and_tail#1 to Phi node: let array_head_and_tail#1: bytes = φ(array_head_and_tail#0 <- block@0, array_head_and_tail#1 <- block@3) in block@3: // for_footer_L199 +debug: Replacing trivial Phi node: let array_head_and_tail#1: bytes = φ(array_head_and_tail#0 <- block@0, array_head_and_tail#1 <- block@3) (array_head_and_tail#1) with array_head_and_tail#0 +debug: Deleting Phi assignment: let array_head_and_tail#1: bytes = φ(array_head_and_tail#0 <- block@0, array_head_and_tail#1 <- block@3) +debug: Replaced trivial Phi node: let array_head_and_tail#1: bytes = φ(array_head_and_tail#0 <- block@0, array_head_and_tail#1 <- block@3) (array_head_and_tail#1) with array_head_and_tail#0 in current definition for 3 blocks +debug: Added new_head#0 to Phi node: let new_head#1: bytes = φ(new_head#0 <- block@0) in block@0: // L189 +debug: Added new_head#2 to Phi node: let new_head#1: bytes = φ(new_head#0 <- block@0, new_head#2 <- block@3) in block@3: // for_footer_L199 +debug: Added item_offset_adjustment#0 to Phi node: let item_offset_adjustment#1: uint64 = φ(item_offset_adjustment#0 <- block@0) in block@0: // L189 +debug: Added item_offset_adjustment#1 to Phi node: let item_offset_adjustment#1: uint64 = φ(item_offset_adjustment#0 <- block@0, item_offset_adjustment#1 <- block@3) in block@3: // for_footer_L199 +debug: Replacing trivial Phi node: let item_offset_adjustment#1: uint64 = φ(item_offset_adjustment#0 <- block@0, item_offset_adjustment#1 <- block@3) (item_offset_adjustment#1) with item_offset_adjustment#0 +debug: Deleting Phi assignment: let item_offset_adjustment#1: uint64 = φ(item_offset_adjustment#0 <- block@0, item_offset_adjustment#1 <- block@3) +debug: Replaced trivial Phi node: let item_offset_adjustment#1: uint64 = φ(item_offset_adjustment#0 <- block@0, item_offset_adjustment#1 <- block@3) (item_offset_adjustment#1) with item_offset_adjustment#0 in current definition for 3 blocks +debug: Sealing block@4: // after_for_L199 +debug: Created Phi assignment: let new_items_count#1: uint64 = undefined while trying to resolve 'new_items_count' in block@1: // for_header_L199 +debug: Added new_items_count#0 to Phi node: let new_items_count#1: uint64 = φ(new_items_count#0 <- block@0) in block@0: // L189 +debug: Added new_items_count#1 to Phi node: let new_items_count#1: uint64 = φ(new_items_count#0 <- block@0, new_items_count#1 <- block@3) in block@3: // for_footer_L199 +debug: Replacing trivial Phi node: let new_items_count#1: uint64 = φ(new_items_count#0 <- block@0, new_items_count#1 <- block@3) (new_items_count#1) with new_items_count#0 +debug: Deleting Phi assignment: let new_items_count#1: uint64 = φ(new_items_count#0 <- block@0, new_items_count#1 <- block@3) +debug: Replaced trivial Phi node: let new_items_count#1: uint64 = φ(new_items_count#0 <- block@0, new_items_count#1 <- block@3) (new_items_count#1) with new_items_count#0 in current definition for 3 blocks +debug: Terminated block@4: // after_for_L199 +debug: Looking for 'head_offset' in an unsealed block creating an incomplete Phi: block@5: // for_header_L204 +debug: Created Phi assignment: let head_offset#4: uint64 = undefined while trying to resolve 'head_offset' in block@5: // for_header_L204 +debug: Terminated block@5: // for_header_L204 +debug: Sealing block@6: // for_body_L205 +debug: Looking for 'new_head_and_tail' in an unsealed block creating an incomplete Phi: block@5: // for_header_L204 +debug: Created Phi assignment: let new_head_and_tail#1: bytes = undefined while trying to resolve 'new_head_and_tail' in block@5: // for_header_L204 +debug: Looking for 'new_head' in an unsealed block creating an incomplete Phi: block@5: // for_header_L204 +debug: Created Phi assignment: let new_head#3: bytes = undefined while trying to resolve 'new_head' in block@5: // for_header_L204 +debug: Looking for 'item_offset_adjustment' in an unsealed block creating an incomplete Phi: block@5: // for_header_L204 +debug: Created Phi assignment: let item_offset_adjustment#3: uint64 = undefined while trying to resolve 'item_offset_adjustment' in block@5: // for_header_L204 +debug: Terminated block@6: // for_body_L205 +debug: Sealing block@7: // for_footer_L204 +debug: Terminated block@7: // for_footer_L204 +debug: Sealing block@5: // for_header_L204 +debug: Added head_offset#3 to Phi node: let head_offset#4: uint64 = φ(head_offset#3 <- block@4) in block@4: // after_for_L199 +debug: Added head_offset#5 to Phi node: let head_offset#4: uint64 = φ(head_offset#3 <- block@4, head_offset#5 <- block@7) in block@7: // for_footer_L204 +debug: Created Phi assignment: let new_head_and_tail#2: bytes = undefined while trying to resolve 'new_head_and_tail' in block@1: // for_header_L199 +debug: Added new_head_and_tail#0 to Phi node: let new_head_and_tail#2: bytes = φ(new_head_and_tail#0 <- block@0) in block@0: // L189 +debug: Added new_head_and_tail#2 to Phi node: let new_head_and_tail#2: bytes = φ(new_head_and_tail#0 <- block@0, new_head_and_tail#2 <- block@3) in block@3: // for_footer_L199 +debug: Replacing trivial Phi node: let new_head_and_tail#2: bytes = φ(new_head_and_tail#0 <- block@0, new_head_and_tail#2 <- block@3) (new_head_and_tail#2) with new_head_and_tail#0 +debug: Deleting Phi assignment: let new_head_and_tail#2: bytes = φ(new_head_and_tail#0 <- block@0, new_head_and_tail#2 <- block@3) +debug: Replaced trivial Phi node: let new_head_and_tail#2: bytes = φ(new_head_and_tail#0 <- block@0, new_head_and_tail#2 <- block@3) (new_head_and_tail#2) with new_head_and_tail#0 in current definition for 3 blocks +debug: Added new_head_and_tail#0 to Phi node: let new_head_and_tail#1: bytes = φ(new_head_and_tail#0 <- block@4) in block@4: // after_for_L199 +debug: Added new_head_and_tail#1 to Phi node: let new_head_and_tail#1: bytes = φ(new_head_and_tail#0 <- block@4, new_head_and_tail#1 <- block@7) in block@7: // for_footer_L204 +debug: Replacing trivial Phi node: let new_head_and_tail#1: bytes = φ(new_head_and_tail#0 <- block@4, new_head_and_tail#1 <- block@7) (new_head_and_tail#1) with new_head_and_tail#0 +debug: Deleting Phi assignment: let new_head_and_tail#1: bytes = φ(new_head_and_tail#0 <- block@4, new_head_and_tail#1 <- block@7) +debug: Replaced trivial Phi node: let new_head_and_tail#1: bytes = φ(new_head_and_tail#0 <- block@4, new_head_and_tail#1 <- block@7) (new_head_and_tail#1) with new_head_and_tail#0 in current definition for 3 blocks +debug: Added new_head#1 to Phi node: let new_head#3: bytes = φ(new_head#1 <- block@4) in block@4: // after_for_L199 +debug: Added new_head#4 to Phi node: let new_head#3: bytes = φ(new_head#1 <- block@4, new_head#4 <- block@7) in block@7: // for_footer_L204 +debug: Added item_offset_adjustment#2 to Phi node: let item_offset_adjustment#3: uint64 = φ(item_offset_adjustment#2 <- block@4) in block@4: // after_for_L199 +debug: Added item_offset_adjustment#3 to Phi node: let item_offset_adjustment#3: uint64 = φ(item_offset_adjustment#2 <- block@4, item_offset_adjustment#3 <- block@7) in block@7: // for_footer_L204 +debug: Replacing trivial Phi node: let item_offset_adjustment#3: uint64 = φ(item_offset_adjustment#2 <- block@4, item_offset_adjustment#3 <- block@7) (item_offset_adjustment#3) with item_offset_adjustment#2 +debug: Deleting Phi assignment: let item_offset_adjustment#3: uint64 = φ(item_offset_adjustment#2 <- block@4, item_offset_adjustment#3 <- block@7) +debug: Replaced trivial Phi node: let item_offset_adjustment#3: uint64 = φ(item_offset_adjustment#2 <- block@4, item_offset_adjustment#3 <- block@7) (item_offset_adjustment#3) with item_offset_adjustment#2 in current definition for 3 blocks +debug: Sealing block@8: // after_for_L204 +debug: Created Phi assignment: let array_items_count#1: uint64 = undefined while trying to resolve 'array_items_count' in block@5: // for_header_L204 +debug: Created Phi assignment: let array_items_count#2: uint64 = undefined while trying to resolve 'array_items_count' in block@1: // for_header_L199 +debug: Added array_items_count#0 to Phi node: let array_items_count#2: uint64 = φ(array_items_count#0 <- block@0) in block@0: // L189 +debug: Added array_items_count#2 to Phi node: let array_items_count#2: uint64 = φ(array_items_count#0 <- block@0, array_items_count#2 <- block@3) in block@3: // for_footer_L199 +debug: Replacing trivial Phi node: let array_items_count#2: uint64 = φ(array_items_count#0 <- block@0, array_items_count#2 <- block@3) (array_items_count#2) with array_items_count#0 +debug: Deleting Phi assignment: let array_items_count#2: uint64 = φ(array_items_count#0 <- block@0, array_items_count#2 <- block@3) +debug: Replaced trivial Phi node: let array_items_count#2: uint64 = φ(array_items_count#0 <- block@0, array_items_count#2 <- block@3) (array_items_count#2) with array_items_count#0 in current definition for 3 blocks +debug: Added array_items_count#0 to Phi node: let array_items_count#1: uint64 = φ(array_items_count#0 <- block@4) in block@4: // after_for_L199 +debug: Added array_items_count#1 to Phi node: let array_items_count#1: uint64 = φ(array_items_count#0 <- block@4, array_items_count#1 <- block@7) in block@7: // for_footer_L204 +debug: Replacing trivial Phi node: let array_items_count#1: uint64 = φ(array_items_count#0 <- block@4, array_items_count#1 <- block@7) (array_items_count#1) with array_items_count#0 +debug: Deleting Phi assignment: let array_items_count#1: uint64 = φ(array_items_count#0 <- block@4, array_items_count#1 <- block@7) +debug: Replaced trivial Phi node: let array_items_count#1: uint64 = φ(array_items_count#0 <- block@4, array_items_count#1 <- block@7) (array_items_count#1) with array_items_count#0 in current definition for 3 blocks +debug: Created Phi assignment: let new_items_count#2: uint64 = undefined while trying to resolve 'new_items_count' in block@5: // for_header_L204 +debug: Added new_items_count#0 to Phi node: let new_items_count#2: uint64 = φ(new_items_count#0 <- block@4) in block@4: // after_for_L199 +debug: Added new_items_count#2 to Phi node: let new_items_count#2: uint64 = φ(new_items_count#0 <- block@4, new_items_count#2 <- block@7) in block@7: // for_footer_L204 +debug: Replacing trivial Phi node: let new_items_count#2: uint64 = φ(new_items_count#0 <- block@4, new_items_count#2 <- block@7) (new_items_count#2) with new_items_count#0 +debug: Deleting Phi assignment: let new_items_count#2: uint64 = φ(new_items_count#0 <- block@4, new_items_count#2 <- block@7) +debug: Replaced trivial Phi node: let new_items_count#2: uint64 = φ(new_items_count#0 <- block@4, new_items_count#2 <- block@7) (new_items_count#2) with new_items_count#0 in current definition for 3 blocks +debug: Created Phi assignment: let array_head_and_tail#2: bytes = undefined while trying to resolve 'array_head_and_tail' in block@5: // for_header_L204 +debug: Added array_head_and_tail#0 to Phi node: let array_head_and_tail#2: bytes = φ(array_head_and_tail#0 <- block@4) in block@4: // after_for_L199 +debug: Added array_head_and_tail#2 to Phi node: let array_head_and_tail#2: bytes = φ(array_head_and_tail#0 <- block@4, array_head_and_tail#2 <- block@7) in block@7: // for_footer_L204 +debug: Replacing trivial Phi node: let array_head_and_tail#2: bytes = φ(array_head_and_tail#0 <- block@4, array_head_and_tail#2 <- block@7) (array_head_and_tail#2) with array_head_and_tail#0 +debug: Deleting Phi assignment: let array_head_and_tail#2: bytes = φ(array_head_and_tail#0 <- block@4, array_head_and_tail#2 <- block@7) +debug: Replaced trivial Phi node: let array_head_and_tail#2: bytes = φ(array_head_and_tail#0 <- block@4, array_head_and_tail#2 <- block@7) (array_head_and_tail#2) with array_head_and_tail#0 in current definition for 3 blocks +debug: Terminated block@8: // after_for_L204 +debug: Sealing block@0: // L217 +debug: Terminated block@0: // L217 +debug: Sealing block@0: // L240 +debug: Terminated block@0: // L240 +debug: Sealing block@0: // L252 +debug: Terminated block@0: // L252 +debug: Looking for 'head_offset' in an unsealed block creating an incomplete Phi: block@1: // for_header_L269 +debug: Created Phi assignment: let head_offset#1: uint64 = undefined while trying to resolve 'head_offset' in block@1: // for_header_L269 +debug: Terminated block@1: // for_header_L269 +debug: Sealing block@2: // for_body_L270 +debug: Looking for 'new_head_and_tail' in an unsealed block creating an incomplete Phi: block@1: // for_header_L269 +debug: Created Phi assignment: let new_head_and_tail#1: bytes = undefined while trying to resolve 'new_head_and_tail' in block@1: // for_header_L269 +debug: Looking for 'new_item_length' in an unsealed block creating an incomplete Phi: block@1: // for_header_L269 +debug: Created Phi assignment: let new_item_length#1: uint64 = undefined while trying to resolve 'new_item_length' in block@1: // for_header_L269 +debug: Looking for 'original_item_length' in an unsealed block creating an incomplete Phi: block@1: // for_header_L269 +debug: Created Phi assignment: let original_item_length#1: uint64 = undefined while trying to resolve 'original_item_length' in block@1: // for_header_L269 +debug: Terminated block@2: // for_body_L270 +debug: Sealing block@3: // for_footer_L269 +debug: Terminated block@3: // for_footer_L269 +debug: Sealing block@1: // for_header_L269 +debug: Added head_offset#0 to Phi node: let head_offset#1: uint64 = φ(head_offset#0 <- block@0) in block@0: // L252 +debug: Added head_offset#2 to Phi node: let head_offset#1: uint64 = φ(head_offset#0 <- block@0, head_offset#2 <- block@3) in block@3: // for_footer_L269 +debug: Added new_head_and_tail#0 to Phi node: let new_head_and_tail#1: bytes = φ(new_head_and_tail#0 <- block@0) in block@0: // L252 +debug: Added new_head_and_tail#2 to Phi node: let new_head_and_tail#1: bytes = φ(new_head_and_tail#0 <- block@0, new_head_and_tail#2 <- block@3) in block@3: // for_footer_L269 +debug: Added new_item_length#0 to Phi node: let new_item_length#1: uint64 = φ(new_item_length#0 <- block@0) in block@0: // L252 +debug: Added new_item_length#1 to Phi node: let new_item_length#1: uint64 = φ(new_item_length#0 <- block@0, new_item_length#1 <- block@3) in block@3: // for_footer_L269 +debug: Replacing trivial Phi node: let new_item_length#1: uint64 = φ(new_item_length#0 <- block@0, new_item_length#1 <- block@3) (new_item_length#1) with new_item_length#0 +debug: Deleting Phi assignment: let new_item_length#1: uint64 = φ(new_item_length#0 <- block@0, new_item_length#1 <- block@3) +debug: Replaced trivial Phi node: let new_item_length#1: uint64 = φ(new_item_length#0 <- block@0, new_item_length#1 <- block@3) (new_item_length#1) with new_item_length#0 in current definition for 3 blocks +debug: Added original_item_length#0 to Phi node: let original_item_length#1: uint64 = φ(original_item_length#0 <- block@0) in block@0: // L252 +debug: Added original_item_length#1 to Phi node: let original_item_length#1: uint64 = φ(original_item_length#0 <- block@0, original_item_length#1 <- block@3) in block@3: // for_footer_L269 +debug: Replacing trivial Phi node: let original_item_length#1: uint64 = φ(original_item_length#0 <- block@0, original_item_length#1 <- block@3) (original_item_length#1) with original_item_length#0 +debug: Deleting Phi assignment: let original_item_length#1: uint64 = φ(original_item_length#0 <- block@0, original_item_length#1 <- block@3) +debug: Replaced trivial Phi node: let original_item_length#1: uint64 = φ(original_item_length#0 <- block@0, original_item_length#1 <- block@3) (original_item_length#1) with original_item_length#0 in current definition for 3 blocks +debug: Sealing block@4: // after_for_L269 +debug: Terminated block@4: // after_for_L269 +debug: Sealing block@0: // L278 +debug: Terminated block@0: // L278 +debug: Sealing block@0: // L306 +debug: Terminated block@0: // L306 +debug: Looking for 'head_offset' in an unsealed block creating an incomplete Phi: block@1: // for_header_L327 +debug: Created Phi assignment: let head_offset#1: uint64 = undefined while trying to resolve 'head_offset' in block@1: // for_header_L327 +debug: Terminated block@1: // for_header_L327 +debug: Sealing block@2: // for_body_L328 +debug: Looking for 'tail_offset' in an unsealed block creating an incomplete Phi: block@1: // for_header_L327 +debug: Created Phi assignment: let tail_offset#1: uint64 = undefined while trying to resolve 'tail_offset' in block@1: // for_header_L327 +debug: Looking for 'array_head_and_tail' in an unsealed block creating an incomplete Phi: block@1: // for_header_L327 +debug: Created Phi assignment: let array_head_and_tail#1: bytes = undefined while trying to resolve 'array_head_and_tail' in block@1: // for_header_L327 +debug: Terminated block@2: // for_body_L328 +debug: Sealing block@3: // for_footer_L327 +debug: Terminated block@3: // for_footer_L327 +debug: Sealing block@1: // for_header_L327 +debug: Added head_offset#0 to Phi node: let head_offset#1: uint64 = φ(head_offset#0 <- block@0) in block@0: // L306 +debug: Added head_offset#3 to Phi node: let head_offset#1: uint64 = φ(head_offset#0 <- block@0, head_offset#3 <- block@3) in block@3: // for_footer_L327 +debug: Added tail_offset#0 to Phi node: let tail_offset#1: uint64 = φ(tail_offset#0 <- block@0) in block@0: // L306 +debug: Added tail_offset#2 to Phi node: let tail_offset#1: uint64 = φ(tail_offset#0 <- block@0, tail_offset#2 <- block@3) in block@3: // for_footer_L327 +debug: Added array_head_and_tail#0 to Phi node: let array_head_and_tail#1: bytes = φ(array_head_and_tail#0 <- block@0) in block@0: // L306 +debug: Added array_head_and_tail#2 to Phi node: let array_head_and_tail#1: bytes = φ(array_head_and_tail#0 <- block@0, array_head_and_tail#2 <- block@3) in block@3: // for_footer_L327 +debug: Sealing block@4: // after_for_L327 +debug: Terminated block@4: // after_for_L327 +debug: Sealing block@0: // L41 +debug: Terminated block@0: // L41 +debug: Sealing block@1: // abi_routing_L41 +debug: Terminated block@1: // abi_routing_L41 +debug: Sealing block@2: // create_route_L67 +debug: Terminated block@2: // create_route_L67 +debug: Sealing block@3: // struct_arg_route_L75 +debug: Terminated block@3: // struct_arg_route_L75 +debug: Sealing block@4: // struct_return_route_L80 +debug: Terminated block@4: // struct_return_route_L80 +debug: Sealing block@5: // emits_error_route_L85 +debug: Terminated block@5: // emits_error_route_L85 +debug: Sealing block@6: // emitter_route_L89 +debug: Terminated block@6: // emitter_route_L89 +debug: Sealing block@7: // conditional_emit_route_L99 +debug: Terminated block@7: // conditional_emit_route_L99 +debug: Sealing block@8: // template_value_route_L108 +debug: Terminated block@8: // template_value_route_L108 +debug: Sealing block@9: // switch_case_default_L41 +debug: Terminated block@9: // switch_case_default_L41 +debug: Sealing block@10: // switch_case_next_L41 +debug: Terminated block@10: // switch_case_next_L41 +debug: Sealing block@11: // bare_routing_L41 +debug: Terminated block@11: // bare_routing_L41 +debug: Sealing block@12: // bare_create_L63 +debug: Terminated block@12: // bare_create_L63 +debug: Sealing block@13: // transient_L71 +debug: Terminated block@13: // transient_L71 +debug: Sealing block@14: // switch_case_default_L41 +debug: Terminated block@14: // switch_case_default_L41 +debug: Sealing block@15: // switch_case_next_L41 +debug: Terminated block@15: // switch_case_next_L41 +debug: Sealing block@16: // after_if_else_L41 +debug: Terminated block@16: // after_if_else_L41 +debug: Sealing block@0: // L67 +debug: Terminated block@0: // L67 +debug: Sealing block@0: // L75 +debug: Terminated block@0: // L75 +debug: Sealing block@0: // L80 +debug: Terminated block@0: // L80 +debug: Sealing block@0: // L118 +debug: Terminated block@0: // L118 +debug: Sealing block@0: // L85 +debug: Terminated block@0: // L85 +debug: Sealing block@0: // L89 +debug: Terminated block@0: // L89 +debug: Sealing block@0: // L99 +debug: Terminated block@0: // L99 +debug: Sealing block@1: // if_body_L102 +debug: Terminated block@1: // if_body_L102 +debug: Sealing block@2: // after_if_else_L101 +debug: Terminated block@2: // after_if_else_L101 +debug: Sealing block@0: // L108 +debug: Terminated block@0: // L108 +debug: Sealing block@0: // L63 +debug: Terminated block@0: // L63 +debug: Sealing block@0: // L71 +debug: Terminated block@0: // L71 +debug: Sealing block@0: // L43 +debug: Terminated block@0: // L43 +debug: Sealing block@0: // L1 +debug: Terminated block@0: // L1 +debug: Sealing block@1: // on_create_L43 +debug: Terminated block@1: // on_create_L43 +debug: Sealing block@2: // entrypoint_L43 +debug: Terminated block@2: // entrypoint_L43 +debug: Sealing block@0: // L1 +debug: Terminated block@0: // L1 +debug: Output IR to arc_56/out/Contract.ssa.ir +info: optimizing test_cases.arc_56.contract.Contract at level 1 +debug: Begin optimization pass 1/100 +debug: Optimizing subroutine algopy.arc4.ARC4Contract.approval_program +debug: Splitting parallel copies prior to optimization +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.__puya_arc4_router__ +debug: Splitting parallel copies prior to optimization +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Simplified (== tmp%6#0 NoOp) to (! tmp%6#0) +debug: Simplified (== tmp%13#0 NoOp) to (! tmp%13#0) +debug: Simplified (== tmp%20#0 NoOp) to (! tmp%20#0) +debug: Simplified (== tmp%25#0 NoOp) to (! tmp%25#0) +debug: Simplified (== tmp%29#0 NoOp) to (! tmp%29#0) +debug: Simplified (== tmp%35#0 NoOp) to (! tmp%35#0) +debug: Simplified ((extract 6 2) as_bytes%1#0) to 0x000d +debug: Simplified (concat 0x offset_as_uint16%0#0) to offset_as_uint16%0#0 +debug: Simplified (== tmp%41#0 0u) to (! tmp%41#0) +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable tmp%1#0 +debug: Removing unused variable tmp%9#0 +debug: Removing unused variable tmp%16#0 +debug: Removing unused variable tmp%23#0 +debug: Removing unused variable tmp%28#0 +debug: Removing unused variable tmp%32#0 +debug: Removing unused variable tmp%38#0 +debug: Removing unused variable current_tail_offset%0#0 +debug: Removing unused variable encoded_tuple_buffer%0#0 +debug: Removing unused variable as_bytes%1#0 +debug: Removing unused variable current_tail_offset%2#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: inlining the default target of a switch/goto nth +debug: adding block@1: // abi_routing_L41 as a predecessor of block@10: // switch_case_next_L41 due to inlining of block@9: // switch_case_default_L41 +debug: simplified terminator of block@1: // abi_routing_L41 from switch tmp%2#0 {method "create()void" => block@2, method "struct_arg((uint64,string,(byte[],uint8)),(byte[],uint8))uint64" => block@3, method "struct_return((uint64,string,(byte[],uint8)))(byte[],uint8)" => block@4, method "emits_error((uint64,string,(byte[],uint8)))void" => block@5, method "emitter()void" => block@6, method "conditional_emit(bool)void" => block@7, method "template_value()((byte[],uint8),uint64,string,uint8)" => block@8, * => block@9} to switch tmp%2#0 {method "create()void" => block@2, method "struct_arg((uint64,string,(byte[],uint8)),(byte[],uint8))uint64" => block@3, method "struct_return((uint64,string,(byte[],uint8)))(byte[],uint8)" => block@4, method "emits_error((uint64,string,(byte[],uint8)))void" => block@5, method "emitter()void" => block@6, method "conditional_emit(bool)void" => block@7, method "template_value()((byte[],uint8),uint64,string,uint8)" => block@8, * => block@10} +debug: simplifying a switch with constants into goto nth +debug: simplified terminator of block@11: // bare_routing_L41 from switch tmp%40#0 {0u => block@12, 1u => block@12, 5u => block@13, * => block@14} to goto_nth [block@12, block@12, block@14, block@14, block@14, block@13][tmp%40#0] else goto block@14 +debug: inlining the default target of a switch/goto nth +debug: adding block@1: // abi_routing_L41 as a predecessor of block@16: // after_if_else_L41 due to inlining of block@10: // switch_case_next_L41 +debug: simplified terminator of block@1: // abi_routing_L41 from switch tmp%2#0 {method "create()void" => block@2, method "struct_arg((uint64,string,(byte[],uint8)),(byte[],uint8))uint64" => block@3, method "struct_return((uint64,string,(byte[],uint8)))(byte[],uint8)" => block@4, method "emits_error((uint64,string,(byte[],uint8)))void" => block@5, method "emitter()void" => block@6, method "conditional_emit(bool)void" => block@7, method "template_value()((byte[],uint8),uint64,string,uint8)" => block@8, * => block@10} to switch tmp%2#0 {method "create()void" => block@2, method "struct_arg((uint64,string,(byte[],uint8)),(byte[],uint8))uint64" => block@3, method "struct_return((uint64,string,(byte[],uint8)))(byte[],uint8)" => block@4, method "emits_error((uint64,string,(byte[],uint8)))void" => block@5, method "emitter()void" => block@6, method "conditional_emit(bool)void" => block@7, method "template_value()((byte[],uint8),uint64,string,uint8)" => block@8, * => block@16} +debug: inlining the default target of a switch/goto nth +debug: adding block@11: // bare_routing_L41 as a predecessor of block@15: // switch_case_next_L41 due to inlining of block@14: // switch_case_default_L41 +debug: simplified terminator of block@11: // bare_routing_L41 from goto_nth [block@12, block@12, block@14, block@14, block@14, block@13][tmp%40#0] else goto block@14 to goto_nth [block@12, block@12, block@14, block@14, block@14, block@13][tmp%40#0] else goto block@15 +debug: inlining the default target of a switch/goto nth +debug: simplified terminator of block@1: // abi_routing_L41 from switch tmp%2#0 {method "create()void" => block@2, method "struct_arg((uint64,string,(byte[],uint8)),(byte[],uint8))uint64" => block@3, method "struct_return((uint64,string,(byte[],uint8)))(byte[],uint8)" => block@4, method "emits_error((uint64,string,(byte[],uint8)))void" => block@5, method "emitter()void" => block@6, method "conditional_emit(bool)void" => block@7, method "template_value()((byte[],uint8),uint64,string,uint8)" => block@8, * => block@16} to switch tmp%2#0 {method "create()void" => block@2, method "struct_arg((uint64,string,(byte[],uint8)),(byte[],uint8))uint64" => block@3, method "struct_return((uint64,string,(byte[],uint8)))(byte[],uint8)" => block@4, method "emits_error((uint64,string,(byte[],uint8)))void" => block@5, method "emitter()void" => block@6, method "conditional_emit(bool)void" => block@7, method "template_value()((byte[],uint8),uint64,string,uint8)" => block@8, * => return 0u} +debug: inlining the default target of a switch/goto nth +debug: adding block@11: // bare_routing_L41 as a predecessor of block@16: // after_if_else_L41 due to inlining of block@15: // switch_case_next_L41 +debug: simplified terminator of block@11: // bare_routing_L41 from goto_nth [block@12, block@12, block@14, block@14, block@14, block@13][tmp%40#0] else goto block@15 to goto_nth [block@12, block@12, block@14, block@14, block@14, block@13][tmp%40#0] else goto block@16 +debug: inlining the default target of a switch/goto nth +debug: simplified terminator of block@11: // bare_routing_L41 from goto_nth [block@12, block@12, block@14, block@14, block@14, block@13][tmp%40#0] else goto block@16 to goto_nth [block@12, block@12, block@14, block@14, block@14, block@13][tmp%40#0] else return 0u +debug: Optimizer: Remove Linear Jump +debug: Replaced predecessor block@10: // switch_case_next_L41 with block@9: // switch_case_default_L41 in block@16: // after_if_else_L41 +debug: Merged linear block@10: // switch_case_next_L41 into block@9: // switch_case_default_L41 +debug: Replaced predecessor block@15: // switch_case_next_L41 with block@14: // switch_case_default_L41 in block@16: // after_if_else_L41 +debug: Merged linear block@15: // switch_case_next_L41 into block@14: // switch_case_default_L41 +debug: Optimizer: Remove Empty Blocks +debug: Removed empty block: block@9: // switch_case_default_L41 +debug: Removed empty block: block@14: // switch_case_default_L41 +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.create +debug: Splitting parallel copies prior to optimization +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.struct_arg +debug: Splitting parallel copies prior to optimization +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.struct_return +debug: Splitting parallel copies prior to optimization +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Found equivalence set: echo%1#0, tmp%1#1 +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Replacing redundant declaration let item_start_offset%1#0: uint64 = (extract_uint16 arg#0 10u) with copy of existing registers (Register(source_location=arc_56/contract.py:82:15-25, ir_type=uint64, name='item_start_offset%0', version=0),) +debug: Replacing redundant declaration let item_end_offset%1#0: uint64 = (len arg#0) with copy of existing registers (Register(source_location=arc_56/contract.py:82:15-25, ir_type=uint64, name='item_end_offset%0', version=0),) +debug: Replacing redundant declaration let item_start_offset%2#0: uint64 = (extract_uint16 arg#0 10u) with copy of existing registers (Register(source_location=arc_56/contract.py:82:15-25, ir_type=uint64, name='item_start_offset%0', version=0),) +debug: Replacing redundant declaration let item_end_offset%2#0: uint64 = (len arg#0) with copy of existing registers (Register(source_location=arc_56/contract.py:82:15-25, ir_type=uint64, name='item_end_offset%0', version=0),) +debug: Found equivalence set: item_start_offset%0#0, item_start_offset%1#0, item_start_offset%2#0 +debug: Replacing {item_start_offset%1#0, item_start_offset%2#0} with item_start_offset%0#0 made 2 modifications +debug: Found equivalence set: item_end_offset%0#0, item_end_offset%1#0, item_end_offset%2#0 +debug: Replacing {item_end_offset%1#0, item_end_offset%2#0} with item_end_offset%0#0 made 2 modifications +debug: Replacing redundant declaration let tmp%1#0: bytes = (substring3 arg#0 item_start_offset%0#0 item_end_offset%0#0) with copy of existing registers (Register(source_location=arc_56/contract.py:82:15-25, ir_type=bytes, name='tmp%0', version=0),) +debug: Replacing redundant declaration let tmp%3#0: bytes = (substring3 arg#0 item_start_offset%0#0 item_end_offset%0#0) with copy of existing registers (Register(source_location=arc_56/contract.py:82:15-25, ir_type=bytes, name='tmp%0', version=0),) +debug: Found equivalence set: tmp%0#0, tmp%1#0, tmp%3#0 +debug: Replacing {tmp%1#0, tmp%3#0} with tmp%0#0 made 2 modifications +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.echo +debug: Splitting parallel copies prior to optimization +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.errors +debug: Splitting parallel copies prior to optimization +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Simplified (extract3 arg#0 0u 8u) // on error: Index access is out of bounds to ((extract 0 8) arg#0) // on error: Index access is out of bounds +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.emitter +debug: Splitting parallel copies prior to optimization +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Simplified (len 0x68656c6c6f31) to 6u +debug: Simplified ((extract 6 2) as_bytes%1#0) to 0x0003 +debug: Simplified (concat 0x offset_as_uint16%0#0) to offset_as_uint16%0#0 +debug: Simplified (len "hello") to 5u +debug: Simplified (len 0x68656c6c6f32) to 6u +debug: Simplified ((extract 6 2) as_bytes%4#0) to 0x0003 +debug: Simplified (concat 0x offset_as_uint16%1#0) to offset_as_uint16%1#0 +debug: Simplified ((extract 6 2) as_bytes%5#0) to 0x0004 +debug: Simplified (concat 0x offset_as_uint16%2#0) to offset_as_uint16%2#0 +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable current_tail_offset%0#0 +debug: Removing unused variable encoded_tuple_buffer%0#0 +debug: Removing unused variable as_bytes%1#0 +debug: Removing unused variable current_tail_offset%1#0 +debug: Removing unused variable current_tail_offset%2#0 +debug: Removing unused variable encoded_tuple_buffer%4#0 +debug: Removing unused variable as_bytes%4#0 +debug: Removing unused variable current_tail_offset%3#0 +debug: Removing unused variable current_tail_offset%4#0 +debug: Removing unused variable encoded_tuple_buffer%8#0 +debug: Removing unused variable as_bytes%5#0 +debug: Removing unused variable current_tail_offset%6#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.conditional_emit +debug: Splitting parallel copies prior to optimization +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Simplified (concat 0x 0x000000000000002a) to 0x000000000000002a +debug: Simplified (len 0x68656c6c6f33) to 6u +debug: Simplified ((extract 6 2) as_bytes%1#0) to 0x0003 +debug: Simplified (concat 0x offset_as_uint16%0#0) to offset_as_uint16%0#0 +debug: Simplified (concat 0x encoded_tuple_buffer%2#0) to encoded_tuple_buffer%2#0 +debug: Simplified ((extract 6 2) as_bytes%2#0) to 0x0012 +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable current_tail_offset%0#0 +debug: Removing unused variable encoded_tuple_buffer%0#0 +debug: Removing unused variable current_tail_offset%1#0 +debug: Removing unused variable encoded_tuple_buffer%3#0 +debug: Removing unused variable as_bytes%1#0 +debug: Removing unused variable current_tail_offset%2#0 +debug: Removing unused variable current_tail_offset%3#0 +debug: Removing unused variable encoded_tuple_buffer%7#0 +debug: Removing unused variable as_bytes%2#0 +debug: Removing unused variable current_tail_offset%4#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.template_value +debug: Splitting parallel copies prior to optimization +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.bare_create +debug: Splitting parallel copies prior to optimization +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.transient +debug: Splitting parallel copies prior to optimization +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.__init__ +debug: Splitting parallel copies prior to optimization +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine algopy.arc4.ARC4Contract.clear_state_program +debug: Splitting parallel copies prior to optimization +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Output IR to arc_56/out/Contract.ssa.opt_pass_1.ir +debug: Begin optimization pass 2/100 +debug: Optimizing subroutine algopy.arc4.ARC4Contract.approval_program +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: replaced goto app_id%0#0 ? block@2 : block@2 with goto block@2 +debug: Removed empty block: block@1: // on_create_L43 +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.__puya_arc4_router__ +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable offset_as_uint16%0#0 +debug: Removing unused variable encoded_tuple_buffer%1#0 +debug: Removing unused variable data_length%1#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.struct_arg +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.struct_return +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.echo +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.errors +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.emitter +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Simplified ((extract 6 2) as_bytes%0#0) to 0x0006 +debug: Simplified (concat 0x0003 0x2a) to 0x00032a +debug: Simplified ((extract 6 2) as_bytes%2#0) to 0x0005 +debug: Simplified ((extract 6 2) as_bytes%3#0) to 0x0006 +debug: Simplified (concat 0x0003 0x2a) to 0x00032a +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable length%0#0 +debug: Removing unused variable as_bytes%0#0 +debug: Removing unused variable offset_as_uint16%0#0 +debug: Removing unused variable encoded_tuple_buffer%1#0 +debug: Removing unused variable data_length%0#0 +debug: Removing unused variable length%1#0 +debug: Removing unused variable as_bytes%2#0 +debug: Removing unused variable length%2#0 +debug: Removing unused variable as_bytes%3#0 +debug: Removing unused variable offset_as_uint16%1#0 +debug: Removing unused variable encoded_tuple_buffer%5#0 +debug: Removing unused variable data_length%1#0 +debug: Removing unused variable offset_as_uint16%2#0 +debug: Removing unused variable encoded_tuple_buffer%9#0 +debug: Removing unused variable data_length%3#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.conditional_emit +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Found equivalence set: encoded_tuple_buffer%2#0, encoded_tuple_buffer%8#0 +debug: Replacing {encoded_tuple_buffer%8#0} with encoded_tuple_buffer%2#0 made 1 modifications +debug: Optimizer: Intrinsic Simplifier +debug: Simplified (concat 0x000000000000002a 0x000000000000002b) to 0x000000000000002a000000000000002b +debug: Simplified ((extract 6 2) as_bytes%0#0) to 0x0006 +debug: Simplified (concat 0x0003 0x2a) to 0x00032a +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable encoded_tuple_buffer%1#0 +debug: Removing unused variable length%0#0 +debug: Removing unused variable as_bytes%0#0 +debug: Removing unused variable offset_as_uint16%0#0 +debug: Removing unused variable encoded_tuple_buffer%4#0 +debug: Removing unused variable data_length%0#0 +debug: Removing unused variable offset_as_uint16%1#0 +debug: Removing unused variable data_length%1#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.template_value +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine algopy.arc4.ARC4Contract.clear_state_program +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Output IR to arc_56/out/Contract.ssa.opt_pass_2.ir +debug: Begin optimization pass 3/100 +debug: Optimizing subroutine algopy.arc4.ARC4Contract.approval_program +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable app_id%0#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Merged linear block@2: // entrypoint_L43 into block@0: // L1 +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.__puya_arc4_router__ +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.struct_arg +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.struct_return +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.echo +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.errors +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.emitter +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Simplified (concat 0x0006 0x68656c6c6f31) to 0x000668656c6c6f31 +debug: Simplified (concat 0x0005 "hello") to 0x000568656c6c6f +debug: Simplified (concat 0x0006 0x68656c6c6f32) to 0x000668656c6c6f32 +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable length_uint16%0#0 +debug: Removing unused variable encoded_tuple_buffer%2#0 +debug: Removing unused variable length_uint16%1#0 +debug: Removing unused variable length_uint16%2#0 +debug: Removing unused variable encoded_tuple_buffer%6#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.conditional_emit +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Simplified (concat 0x0006 0x68656c6c6f33) to 0x000668656c6c6f33 +debug: Simplified (concat 0x000000000000002a000000000000002b 0x0012) to 0x000000000000002a000000000000002b0012 +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable encoded_tuple_buffer%2#0 +debug: Removing unused variable length_uint16%0#0 +debug: Removing unused variable encoded_tuple_buffer%5#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.template_value +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine algopy.arc4.ARC4Contract.clear_state_program +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Output IR to arc_56/out/Contract.ssa.opt_pass_3.ir +debug: Begin optimization pass 4/100 +debug: Optimizing subroutine algopy.arc4.ARC4Contract.approval_program +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.__puya_arc4_router__ +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.struct_arg +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.struct_return +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.echo +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.errors +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.emitter +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Simplified (concat 0x00032a 0x000668656c6c6f31) to 0x00032a000668656c6c6f31 +debug: Simplified (concat 0x00032a 0x000668656c6c6f32) to 0x00032a000668656c6c6f32 +debug: Simplified (len 0x000568656c6c6f) to 7u +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable encoded_value%0#0 +debug: Removing unused variable encoded_value%1#0 +debug: Removing unused variable encoded_value%2#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.conditional_emit +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Simplified (concat 0x00032a 0x000668656c6c6f33) to 0x00032a000668656c6c6f33 +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable encoded_value%0#0 +debug: Removing unused variable encoded_tuple_buffer%9#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.template_value +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine algopy.arc4.ARC4Contract.clear_state_program +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Output IR to arc_56/out/Contract.ssa.opt_pass_4.ir +debug: Begin optimization pass 5/100 +debug: Optimizing subroutine algopy.arc4.ARC4Contract.approval_program +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.__puya_arc4_router__ +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.struct_arg +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.struct_return +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.echo +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.errors +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.emitter +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Simplified (+ 4u 7u) to 11u +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable encoded_tuple_buffer%3#0 +debug: Removing unused variable encoded_tuple_buffer%7#0 +debug: Removing unused variable data_length%2#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.conditional_emit +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Simplified (concat 0x000000000000002a000000000000002b0012 0x00032a000668656c6c6f33) to 0x000000000000002a000000000000002b001200032a000668656c6c6f33 +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable encoded_tuple_buffer%6#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.template_value +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine algopy.arc4.ARC4Contract.clear_state_program +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Output IR to arc_56/out/Contract.ssa.opt_pass_5.ir +debug: Begin optimization pass 6/100 +debug: Optimizing subroutine algopy.arc4.ARC4Contract.approval_program +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.__puya_arc4_router__ +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.struct_arg +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.struct_return +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.echo +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.errors +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.emitter +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Simplified ((extract 6 2) as_bytes%6#0) to 0x000b +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable current_tail_offset%5#0 +debug: Removing unused variable as_bytes%6#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.conditional_emit +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable encoded_tuple_buffer%10#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.template_value +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine algopy.arc4.ARC4Contract.clear_state_program +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Output IR to arc_56/out/Contract.ssa.opt_pass_6.ir +debug: Begin optimization pass 7/100 +debug: Optimizing subroutine algopy.arc4.ARC4Contract.approval_program +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.__puya_arc4_router__ +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.struct_arg +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.struct_return +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.echo +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.errors +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.emitter +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Simplified (concat 0x0004 0x000b) to 0x0004000b +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable offset_as_uint16%3#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.conditional_emit +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.template_value +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine algopy.arc4.ARC4Contract.clear_state_program +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Output IR to arc_56/out/Contract.ssa.opt_pass_7.ir +debug: Begin optimization pass 8/100 +debug: Optimizing subroutine algopy.arc4.ARC4Contract.approval_program +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.__puya_arc4_router__ +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.struct_arg +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.struct_return +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.echo +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.errors +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.emitter +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Simplified (concat 0x0004000b 0x000568656c6c6f) to 0x0004000b000568656c6c6f +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable encoded_tuple_buffer%10#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.conditional_emit +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.template_value +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine algopy.arc4.ARC4Contract.clear_state_program +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Output IR to arc_56/out/Contract.ssa.opt_pass_8.ir +debug: Begin optimization pass 9/100 +debug: Optimizing subroutine algopy.arc4.ARC4Contract.approval_program +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.__puya_arc4_router__ +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.struct_arg +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.struct_return +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.echo +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.errors +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.emitter +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Simplified (concat 0x0004000b000568656c6c6f 0x00032a000668656c6c6f32) to 0x0004000b000568656c6c6f00032a000668656c6c6f32 +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable encoded_tuple_buffer%11#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.conditional_emit +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.template_value +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine algopy.arc4.ARC4Contract.clear_state_program +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Output IR to arc_56/out/Contract.ssa.opt_pass_9.ir +debug: Begin optimization pass 10/100 +debug: Optimizing subroutine algopy.arc4.ARC4Contract.approval_program +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.__puya_arc4_router__ +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.struct_arg +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.struct_return +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.echo +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.errors +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.emitter +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Removing unused variable encoded_tuple_buffer%12#0 +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.conditional_emit +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.template_value +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine algopy.arc4.ARC4Contract.clear_state_program +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Output IR to arc_56/out/Contract.ssa.opt_pass_10.ir +debug: Begin optimization pass 11/100 +debug: Optimizing subroutine algopy.arc4.ARC4Contract.approval_program +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.__puya_arc4_router__ +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.struct_arg +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.struct_return +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.echo +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.errors +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.emitter +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.conditional_emit +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine test_cases.arc_56.contract.Contract.template_value +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: Optimizing subroutine algopy.arc4.ARC4Contract.clear_state_program +debug: Optimizer: Constant Replacer +debug: Optimizer: Copy Propagation +debug: Optimizer: Intrinsic Simplifier +debug: Optimizer: Remove Unused Variables +debug: Optimizer: Inner Txn Field Replacer +debug: Optimizer: Replace Compiled References +debug: Optimizer: Simplify Control Ops +debug: Optimizer: Remove Linear Jump +debug: Optimizer: Remove Empty Blocks +debug: Optimizer: Remove Unreachable Blocks +debug: Optimizer: Repeated Expression Elimination +debug: Optimizer: Remove Calls To No Op Subroutines +debug: No optimizations performed in pass 11, ending loop +debug: Removing Phis from algopy.arc4.ARC4Contract.approval_program +debug: Removing Phis from test_cases.arc_56.contract.Contract.__puya_arc4_router__ +debug: Removing Phis from test_cases.arc_56.contract.Contract.struct_arg +debug: Removing Phis from test_cases.arc_56.contract.Contract.struct_return +debug: Removing Phis from test_cases.arc_56.contract.echo +debug: Removing Phis from test_cases.arc_56.contract.Contract.errors +debug: Removing Phis from test_cases.arc_56.contract.Contract.emitter +debug: Removing Phis from test_cases.arc_56.contract.Contract.conditional_emit +debug: Removing Phis from test_cases.arc_56.contract.Contract.template_value +debug: Removing Phis from algopy.arc4.ARC4Contract.clear_state_program +debug: Coalescing local variables in algopy.arc4.ARC4Contract.approval_program using strategy RootOperandGrouping +debug: Coalescing resulted in 0 replacement/s +debug: Coalescing local variables in test_cases.arc_56.contract.Contract.__puya_arc4_router__ using strategy RootOperandGrouping +debug: Coalescing resulted in 0 replacement/s +debug: Coalescing local variables in test_cases.arc_56.contract.Contract.struct_arg using strategy RootOperandGrouping +debug: Coalescing resulted in 0 replacement/s +debug: Coalescing local variables in test_cases.arc_56.contract.Contract.struct_return using strategy RootOperandGrouping +debug: Coalescing resulted in 0 replacement/s +debug: Coalescing local variables in test_cases.arc_56.contract.echo using strategy RootOperandGrouping +debug: Coalescing resulted in 0 replacement/s +debug: Coalescing local variables in test_cases.arc_56.contract.Contract.errors using strategy RootOperandGrouping +debug: Coalescing resulted in 0 replacement/s +debug: Coalescing local variables in test_cases.arc_56.contract.Contract.emitter using strategy RootOperandGrouping +debug: Coalescing resulted in 0 replacement/s +debug: Coalescing local variables in test_cases.arc_56.contract.Contract.conditional_emit using strategy RootOperandGrouping +debug: Coalescing resulted in 0 replacement/s +debug: Coalescing local variables in test_cases.arc_56.contract.Contract.template_value using strategy RootOperandGrouping +debug: Coalescing resulted in 0 replacement/s +debug: Coalescing local variables in algopy.arc4.ARC4Contract.clear_state_program using strategy RootOperandGrouping +debug: Coalescing resulted in 0 replacement/s +debug: Sequentializing parallel copies in algopy.arc4.ARC4Contract.approval_program +debug: Sequentializing parallel copies in test_cases.arc_56.contract.Contract.__puya_arc4_router__ +debug: Sequentializing parallel copies in test_cases.arc_56.contract.Contract.struct_arg +debug: Sequentializing parallel copies in test_cases.arc_56.contract.Contract.struct_return +debug: Sequentializing parallel copies in test_cases.arc_56.contract.echo +debug: Sequentializing parallel copies in test_cases.arc_56.contract.Contract.errors +debug: Sequentializing parallel copies in test_cases.arc_56.contract.Contract.emitter +debug: Sequentializing parallel copies in test_cases.arc_56.contract.Contract.conditional_emit +debug: Sequentializing parallel copies in test_cases.arc_56.contract.Contract.template_value +debug: Sequentializing parallel copies in algopy.arc4.ARC4Contract.clear_state_program +debug: Performing post-SSA optimizations +debug: Output IR to arc_56/out/Contract.destructured.ir +debug: Inserted main_block@0.ops[1]: 'l-store-copy tmp%0#0 0' +debug: Replaced main_block@0.ops[3]: 'v-load tmp%0#0' with 'l-load tmp%0#0' +debug: Inserted __puya_arc4_router___block@0.ops[1]: 'l-store-copy tmp%0#0 0' +debug: Replaced __puya_arc4_router___block@0.ops[3]: 'v-load tmp%0#0' with 'l-load tmp%0#0' +debug: Inserted __puya_arc4_router___abi_routing@1.ops[1]: 'l-store-copy tmp%2#0 0' +debug: Replaced __puya_arc4_router___abi_routing@1.ops[10]: 'v-load tmp%2#0' with 'l-load tmp%2#0' +debug: Inserted __puya_arc4_router___create_route@2.ops[5]: 'l-store-copy tmp%4#0 0' +debug: Replaced __puya_arc4_router___create_route@2.ops[7]: 'v-load tmp%4#0' with 'l-load tmp%4#0' +debug: Inserted __puya_arc4_router___create_route@2.ops[10]: 'l-store-copy tmp%5#0 0' +debug: Replaced __puya_arc4_router___create_route@2.ops[12]: 'v-load tmp%5#0' with 'l-load tmp%5#0' +debug: Inserted __puya_arc4_router___create_route@2.ops[1]: 'l-store-copy tmp%3#0 0' +debug: Replaced __puya_arc4_router___create_route@2.ops[4]: 'v-load tmp%3#0' with 'l-load tmp%3#0' +debug: Inserted __puya_arc4_router___struct_arg_route@3.ops[1]: 'l-store-copy tmp%6#0 0' +debug: Replaced __puya_arc4_router___struct_arg_route@3.ops[3]: 'v-load tmp%6#0' with 'l-load tmp%6#0' +debug: Inserted __puya_arc4_router___struct_arg_route@3.ops[5]: 'l-store-copy tmp%7#0 0' +debug: Replaced __puya_arc4_router___struct_arg_route@3.ops[7]: 'v-load tmp%7#0' with 'l-load tmp%7#0' +debug: Inserted __puya_arc4_router___struct_arg_route@3.ops[10]: 'l-store-copy tmp%8#0 0' +debug: Replaced __puya_arc4_router___struct_arg_route@3.ops[12]: 'v-load tmp%8#0' with 'l-load tmp%8#0' +debug: Inserted __puya_arc4_router___struct_arg_route@3.ops[21]: 'l-store-copy to_encode%0#0 0' +debug: Replaced __puya_arc4_router___struct_arg_route@3.ops[23]: 'v-load to_encode%0#0' with 'l-load to_encode%0#0' +debug: Inserted __puya_arc4_router___struct_arg_route@3.ops[29]: 'l-store-copy tmp%12#0 0' +debug: Replaced __puya_arc4_router___struct_arg_route@3.ops[31]: 'v-load tmp%12#0' with 'l-load tmp%12#0' +debug: Inserted __puya_arc4_router___struct_arg_route@3.ops[17]: 'l-store-copy tmp%11#0 0' +debug: Replaced __puya_arc4_router___struct_arg_route@3.ops[20]: 'v-load tmp%11#0' with 'l-load tmp%11#0' +debug: Inserted __puya_arc4_router___struct_arg_route@3.ops[26]: 'l-store-copy val_as_bytes%0#0 0' +debug: Replaced __puya_arc4_router___struct_arg_route@3.ops[29]: 'v-load val_as_bytes%0#0' with 'l-load val_as_bytes%0#0' +debug: Inserted __puya_arc4_router___struct_arg_route@3.ops[15]: 'l-store-copy tmp%10#0 0' +debug: Replaced __puya_arc4_router___struct_arg_route@3.ops[20]: 'v-load tmp%10#0' with 'l-load tmp%10#0' +debug: Inserted __puya_arc4_router___struct_return_route@4.ops[1]: 'l-store-copy tmp%13#0 0' +debug: Replaced __puya_arc4_router___struct_return_route@4.ops[3]: 'v-load tmp%13#0' with 'l-load tmp%13#0' +debug: Inserted __puya_arc4_router___struct_return_route@4.ops[5]: 'l-store-copy tmp%14#0 0' +debug: Replaced __puya_arc4_router___struct_return_route@4.ops[7]: 'v-load tmp%14#0' with 'l-load tmp%14#0' +debug: Inserted __puya_arc4_router___struct_return_route@4.ops[10]: 'l-store-copy tmp%15#0 0' +debug: Replaced __puya_arc4_router___struct_return_route@4.ops[12]: 'v-load tmp%15#0' with 'l-load tmp%15#0' +debug: Inserted __puya_arc4_router___struct_return_route@4.ops[15]: 'l-store-copy tmp%17#0 0' +debug: Replaced __puya_arc4_router___struct_return_route@4.ops[17]: 'v-load tmp%17#0' with 'l-load tmp%17#0' +debug: Inserted __puya_arc4_router___struct_return_route@4.ops[23]: 'l-store-copy tmp%19#0 0' +debug: Replaced __puya_arc4_router___struct_return_route@4.ops[25]: 'v-load tmp%19#0' with 'l-load tmp%19#0' +debug: Inserted __puya_arc4_router___struct_return_route@4.ops[19]: 'l-store-copy tmp%18#0 0' +debug: Replaced __puya_arc4_router___struct_return_route@4.ops[22]: 'v-load tmp%18#0' with 'l-load tmp%18#0' +debug: Inserted __puya_arc4_router___emits_error_route@5.ops[1]: 'l-store-copy tmp%20#0 0' +debug: Replaced __puya_arc4_router___emits_error_route@5.ops[3]: 'v-load tmp%20#0' with 'l-load tmp%20#0' +debug: Inserted __puya_arc4_router___emits_error_route@5.ops[5]: 'l-store-copy tmp%21#0 0' +debug: Replaced __puya_arc4_router___emits_error_route@5.ops[7]: 'v-load tmp%21#0' with 'l-load tmp%21#0' +debug: Inserted __puya_arc4_router___emits_error_route@5.ops[10]: 'l-store-copy tmp%22#0 0' +debug: Replaced __puya_arc4_router___emits_error_route@5.ops[12]: 'v-load tmp%22#0' with 'l-load tmp%22#0' +debug: Inserted __puya_arc4_router___emits_error_route@5.ops[15]: 'l-store-copy tmp%24#0 0' +debug: Replaced __puya_arc4_router___emits_error_route@5.ops[17]: 'v-load tmp%24#0' with 'l-load tmp%24#0' +debug: Inserted __puya_arc4_router___emitter_route@6.ops[1]: 'l-store-copy tmp%25#0 0' +debug: Replaced __puya_arc4_router___emitter_route@6.ops[3]: 'v-load tmp%25#0' with 'l-load tmp%25#0' +debug: Inserted __puya_arc4_router___emitter_route@6.ops[5]: 'l-store-copy tmp%26#0 0' +debug: Replaced __puya_arc4_router___emitter_route@6.ops[7]: 'v-load tmp%26#0' with 'l-load tmp%26#0' +debug: Inserted __puya_arc4_router___emitter_route@6.ops[10]: 'l-store-copy tmp%27#0 0' +debug: Replaced __puya_arc4_router___emitter_route@6.ops[12]: 'v-load tmp%27#0' with 'l-load tmp%27#0' +debug: Inserted __puya_arc4_router___conditional_emit_route@7.ops[1]: 'l-store-copy tmp%29#0 0' +debug: Replaced __puya_arc4_router___conditional_emit_route@7.ops[3]: 'v-load tmp%29#0' with 'l-load tmp%29#0' +debug: Inserted __puya_arc4_router___conditional_emit_route@7.ops[5]: 'l-store-copy tmp%30#0 0' +debug: Replaced __puya_arc4_router___conditional_emit_route@7.ops[7]: 'v-load tmp%30#0' with 'l-load tmp%30#0' +debug: Inserted __puya_arc4_router___conditional_emit_route@7.ops[10]: 'l-store-copy tmp%31#0 0' +debug: Replaced __puya_arc4_router___conditional_emit_route@7.ops[12]: 'v-load tmp%31#0' with 'l-load tmp%31#0' +debug: Inserted __puya_arc4_router___conditional_emit_route@7.ops[15]: 'l-store-copy tmp%33#0 0' +debug: Replaced __puya_arc4_router___conditional_emit_route@7.ops[17]: 'v-load tmp%33#0' with 'l-load tmp%33#0' +debug: Inserted __puya_arc4_router___conditional_emit_route@7.ops[20]: 'l-store-copy tmp%34#0 0' +debug: Replaced __puya_arc4_router___conditional_emit_route@7.ops[22]: 'v-load tmp%34#0' with 'l-load tmp%34#0' +debug: Inserted __puya_arc4_router___template_value_route@8.ops[1]: 'l-store-copy tmp%35#0 0' +debug: Replaced __puya_arc4_router___template_value_route@8.ops[3]: 'v-load tmp%35#0' with 'l-load tmp%35#0' +debug: Inserted __puya_arc4_router___template_value_route@8.ops[5]: 'l-store-copy tmp%36#0 0' +debug: Replaced __puya_arc4_router___template_value_route@8.ops[7]: 'v-load tmp%36#0' with 'l-load tmp%36#0' +debug: Inserted __puya_arc4_router___template_value_route@8.ops[10]: 'l-store-copy tmp%37#0 0' +debug: Replaced __puya_arc4_router___template_value_route@8.ops[12]: 'v-load tmp%37#0' with 'l-load tmp%37#0' +debug: Inserted __puya_arc4_router___template_value_route@8.ops[24]: 'l-store-copy length%0#0 0' +debug: Replaced __puya_arc4_router___template_value_route@8.ops[26]: 'v-load length%0#0' with 'l-load length%0#0' +debug: Inserted __puya_arc4_router___template_value_route@8.ops[28]: 'l-store-copy as_bytes%0#0 0' +debug: Replaced __puya_arc4_router___template_value_route@8.ops[30]: 'v-load as_bytes%0#0' with 'l-load as_bytes%0#0' +debug: Inserted __puya_arc4_router___template_value_route@8.ops[32]: 'l-store-copy length_uint16%0#0 0' +debug: Replaced __puya_arc4_router___template_value_route@8.ops[34]: 'v-load length_uint16%0#0' with 'l-load length_uint16%0#0' +debug: Inserted __puya_arc4_router___template_value_route@8.ops[51]: 'l-store-copy as_bytes%2#0 0' +debug: Replaced __puya_arc4_router___template_value_route@8.ops[53]: 'v-load as_bytes%2#0' with 'l-load as_bytes%2#0' +debug: Inserted __puya_arc4_router___template_value_route@8.ops[59]: 'l-store-copy encoded_tuple_buffer%3#0 0' +debug: Replaced __puya_arc4_router___template_value_route@8.ops[61]: 'v-load encoded_tuple_buffer%3#0' with 'l-load encoded_tuple_buffer%3#0' +debug: Inserted __puya_arc4_router___template_value_route@8.ops[64]: 'l-store-copy encoded_tuple_buffer%4#0 0' +debug: Replaced __puya_arc4_router___template_value_route@8.ops[66]: 'v-load encoded_tuple_buffer%4#0' with 'l-load encoded_tuple_buffer%4#0' +debug: Inserted __puya_arc4_router___template_value_route@8.ops[69]: 'l-store-copy encoded_tuple_buffer%5#0 0' +debug: Replaced __puya_arc4_router___template_value_route@8.ops[71]: 'v-load encoded_tuple_buffer%5#0' with 'l-load encoded_tuple_buffer%5#0' +debug: Inserted __puya_arc4_router___template_value_route@8.ops[78]: 'l-store-copy tmp%39#0 0' +debug: Replaced __puya_arc4_router___template_value_route@8.ops[80]: 'v-load tmp%39#0' with 'l-load tmp%39#0' +debug: Inserted __puya_arc4_router___template_value_route@8.ops[17]: 'l-store-copy elements_to_encode%1#0 1' +debug: Replaced __puya_arc4_router___template_value_route@8.ops[20]: 'v-load elements_to_encode%1#0' with 'l-load elements_to_encode%1#0' +debug: Inserted __puya_arc4_router___template_value_route@8.ops[41]: 'l-store-copy data_length%0#0 0' +debug: Replaced __puya_arc4_router___template_value_route@8.ops[44]: 'v-load data_length%0#0' with 'l-load data_length%0#0' +debug: Inserted __puya_arc4_router___template_value_route@8.ops[57]: 'l-store-copy offset_as_uint16%1#0 0' +debug: Replaced __puya_arc4_router___template_value_route@8.ops[60]: 'v-load offset_as_uint16%1#0' with 'l-load offset_as_uint16%1#0' +debug: Inserted __puya_arc4_router___template_value_route@8.ops[77]: 'l-store-copy encoded_tuple_buffer%6#0 0' +debug: Replaced __puya_arc4_router___template_value_route@8.ops[80]: 'v-load encoded_tuple_buffer%6#0' with 'l-load encoded_tuple_buffer%6#0' +debug: Inserted __puya_arc4_router___template_value_route@8.ops[46]: 'l-store-copy current_tail_offset%1#0 0' +debug: Replaced __puya_arc4_router___template_value_route@8.ops[52]: 'v-load current_tail_offset%1#0' with 'l-load current_tail_offset%1#0' +debug: Inserted __puya_arc4_router___template_value_route@8.ops[16]: 'l-store-copy elements_to_encode%2#0 2' +debug: Replaced __puya_arc4_router___template_value_route@8.ops[24]: 'v-load elements_to_encode%2#0' with 'l-load elements_to_encode%2#0' +debug: Inserted __puya_arc4_router___template_value_route@8.ops[52]: 'l-store-copy encoded_tuple_buffer%2#0 1' +debug: Replaced __puya_arc4_router___template_value_route@8.ops[62]: 'v-load encoded_tuple_buffer%2#0' with 'l-load encoded_tuple_buffer%2#0' +debug: Inserted __puya_arc4_router___template_value_route@8.ops[25]: 'l-store-copy elements_to_encode%2#0 0' +debug: Replaced __puya_arc4_router___template_value_route@8.ops[38]: 'v-load elements_to_encode%2#0' with 'l-load elements_to_encode%2#0' +debug: Inserted __puya_arc4_router___template_value_route@8.ops[20]: 'l-store-copy elements_to_encode%0#0 2' +debug: Replaced __puya_arc4_router___template_value_route@8.ops[42]: 'v-load elements_to_encode%0#0' with 'l-load elements_to_encode%0#0' +debug: Inserted __puya_arc4_router___template_value_route@8.ops[24]: 'l-store-copy val_as_bytes%1#0 2' +debug: Replaced __puya_arc4_router___template_value_route@8.ops[53]: 'v-load val_as_bytes%1#0' with 'l-load val_as_bytes%1#0' +debug: Inserted __puya_arc4_router___template_value_route@8.ops[44]: 'l-store-copy elements_to_encode%0#0 1' +debug: Replaced __puya_arc4_router___template_value_route@8.ops[77]: 'v-load elements_to_encode%0#0' with 'l-load elements_to_encode%0#0' +debug: Inserted __puya_arc4_router___template_value_route@8.ops[42]: 'l-store-copy encoded_value%0#0 2' +debug: Replaced __puya_arc4_router___template_value_route@8.ops[83]: 'v-load encoded_value%0#0' with 'l-load encoded_value%0#0' +debug: Inserted __puya_arc4_router___template_value_route@8.ops[15]: 'l-store-copy elements_to_encode%3#0 3' +debug: Replaced __puya_arc4_router___template_value_route@8.ops[74]: 'v-load elements_to_encode%3#0' with 'l-load elements_to_encode%3#0' +debug: Inserted __puya_arc4_router___bare_routing@11.ops[1]: 'l-store-copy tmp%40#0 0' +debug: Replaced __puya_arc4_router___bare_routing@11.ops[3]: 'v-load tmp%40#0' with 'l-load tmp%40#0' +debug: Inserted __puya_arc4_router___transient@13.ops[1]: 'l-store-copy tmp%41#0 0' +debug: Replaced __puya_arc4_router___transient@13.ops[3]: 'v-load tmp%41#0' with 'l-load tmp%41#0' +debug: Inserted __puya_arc4_router___transient@13.ops[5]: 'l-store-copy tmp%42#0 0' +debug: Replaced __puya_arc4_router___transient@13.ops[7]: 'v-load tmp%42#0' with 'l-load tmp%42#0' +debug: Inserted struct_arg_block@0.ops[11]: 'l-store-copy tmp%0#0 0' +debug: Replaced struct_arg_block@0.ops[13]: 'v-load tmp%0#0' with 'l-load tmp%0#0' +debug: Inserted struct_arg_block@0.ops[16]: 'l-store-copy tmp%1#0 0' +debug: Replaced struct_arg_block@0.ops[18]: 'v-load tmp%1#0' with 'l-load tmp%1#0' +debug: Inserted struct_arg_block@0.ops[6]: 'l-store-copy item_end_offset%0#0 0' +debug: Replaced struct_arg_block@0.ops[10]: 'v-load item_end_offset%0#0' with 'l-load item_end_offset%0#0' +debug: Inserted struct_arg_block@0.ops[3]: 'l-store-copy item_start_offset%0#0 0' +debug: Replaced struct_arg_block@0.ops[10]: 'v-load item_start_offset%0#0' with 'l-load item_start_offset%0#0' +debug: Inserted struct_return_block@0.ops[11]: 'l-store-copy tmp%0#0 0' +debug: Replaced struct_return_block@0.ops[13]: 'v-load tmp%0#0' with 'l-load tmp%0#0' +debug: Inserted struct_return_block@0.ops[20]: 'l-store-copy tmp%2#0 0' +debug: Replaced struct_return_block@0.ops[22]: 'v-load tmp%2#0' with 'l-load tmp%2#0' +debug: Inserted struct_return_block@0.ops[16]: 'l-store-copy echo%0#0 0' +debug: Replaced struct_return_block@0.ops[19]: 'v-load echo%0#0' with 'l-load echo%0#0' +debug: Inserted struct_return_block@0.ops[6]: 'l-store-copy item_end_offset%0#0 0' +debug: Replaced struct_return_block@0.ops[10]: 'v-load item_end_offset%0#0' with 'l-load item_end_offset%0#0' +debug: Inserted struct_return_block@0.ops[15]: 'l-store-copy tmp%0#0 0' +debug: Replaced struct_return_block@0.ops[20]: 'v-load tmp%0#0' with 'l-load tmp%0#0' +debug: Inserted struct_return_block@0.ops[3]: 'l-store-copy item_start_offset%0#0 0' +debug: Replaced struct_return_block@0.ops[10]: 'v-load item_start_offset%0#0' with 'l-load item_start_offset%0#0' +debug: Inserted struct_return_block@0.ops[22]: 'l-store-copy tmp%0#0 1' +debug: Replaced struct_return_block@0.ops[29]: 'v-load tmp%0#0' with 'l-load tmp%0#0' +debug: Inserted errors_block@0.ops[2]: 'l-store-copy tmp%0#0 0' +debug: Replaced errors_block@0.ops[4]: 'v-load tmp%0#0' with 'l-load tmp%0#0' +debug: Inserted errors_block@0.ops[7]: 'l-store-copy tmp%1#0 0' +debug: Replaced errors_block@0.ops[9]: 'v-load tmp%1#0' with 'l-load tmp%1#0' +debug: Inserted emitter_block@0.ops[3]: 'l-store-copy event%0#0 0' +debug: Replaced emitter_block@0.ops[5]: 'v-load event%0#0' with 'l-load event%0#0' +debug: Inserted emitter_block@0.ops[10]: 'l-store-copy event%1#0 0' +debug: Replaced emitter_block@0.ops[12]: 'v-load event%1#0' with 'l-load event%1#0' +debug: Inserted conditional_emit_if_body@1.ops[3]: 'l-store-copy event%0#0 0' +debug: Replaced conditional_emit_if_body@1.ops[5]: 'v-load event%0#0' with 'l-load event%0#0' +debug: Found 3 edge set/s for test_cases.arc_56.contract.Contract.__puya_arc4_router__ +debug: Found 1 edge set/s for test_cases.arc_56.contract.Contract.conditional_emit +info: Writing arc_56/out/Contract.arc32.json +info: Writing arc_56/out/Contract.arc56.json +info: Writing arc_56/out/Contract.approval.teal +info: Writing arc_56/out/Contract.clear.teal +info: Writing arc_56/out/Contract.approval.bin +info: Writing arc_56/out/Contract.clear.bin +info: Writing arc_56/out/Contract.approval.puya.map +info: Writing arc_56/out/Contract.clear.puya.map +info: writing arc_56/out/client_Contract.py \ No newline at end of file diff --git a/test_cases/arc_56/template.vars b/test_cases/arc_56/template.vars new file mode 100644 index 0000000000..a0b67d25fd --- /dev/null +++ b/test_cases/arc_56/template.vars @@ -0,0 +1,4 @@ +STRUCT=0x0002FF00024869 +AVM_UINT64=123 +AVM_STRING="Hello" +ARC4_UINT8=0xFF diff --git a/test_cases/asset/puya.log b/test_cases/asset/puya.log index d783608dac..9e69b3527f 100644 --- a/test_cases/asset/puya.log +++ b/test_cases/asset/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['asset'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['asset'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing asset/out/module.awst debug: Sealing block@0: // L12 diff --git a/test_cases/augmented_assignment/puya.log b/test_cases/augmented_assignment/puya.log index 83e4d96f52..9e878c6b7a 100644 --- a/test_cases/augmented_assignment/puya.log +++ b/test_cases/augmented_assignment/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['augmented_assignment'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['augmented_assignment'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing augmented_assignment/out/module.awst debug: Sealing block@0: // L12 diff --git a/test_cases/avm_types_in_abi/out/TestContract.arc56.json b/test_cases/avm_types_in_abi/out/TestContract.arc56.json new file mode 100644 index 0000000000..0da45c2ee6 --- /dev/null +++ b/test_cases/avm_types_in_abi/out/TestContract.arc56.json @@ -0,0 +1,153 @@ +{ + "arcs": [ + 22, + 28 + ], + "name": "TestContract", + "structs": {}, + "methods": [ + { + "name": "create", + "args": [ + { + "type": "bool", + "name": "bool_param" + }, + { + "type": "uint64", + "name": "uint64_param" + }, + { + "type": "byte[]", + "name": "bytes_param" + }, + { + "type": "uint512", + "name": "biguint_param" + }, + { + "type": "string", + "name": "string_param" + }, + { + "type": "(bool,uint64,byte[],uint512,string)", + "name": "tuple_param" + } + ], + "returns": { + "type": "(bool,uint64,byte[],uint512,string)" + }, + "actions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "tuple_of_arc4", + "args": [ + { + "type": "(uint8,address)", + "name": "args" + } + ], + "returns": { + "type": "(uint8,address)" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [], + "call": [] + }, + "events": [], + "templateVariables": {}, + "networks": {}, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 53, + 221 + ], + "errorMessage": "OnCompletion is NoOp" + }, + { + "pc": [ + 57 + ], + "errorMessage": "is creating" + }, + { + "pc": [ + 224 + ], + "errorMessage": "is not creating" + }, + { + "pc": [ + 165 + ], + "errorMessage": "overflow" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLmF2bV90eXBlc19pbl9hYmkuY29udHJhY3QuVGVzdENvbnRyYWN0LmFwcHJvdmFsX3Byb2dyYW06CiAgICBpbnRjYmxvY2sgMCAxIDY0CiAgICBieXRlY2Jsb2NrIDB4MDAgMHgxNTFmN2M3NQogICAgY2FsbHN1YiBfX3B1eWFfYXJjNF9yb3V0ZXJfXwogICAgcmV0dXJuCgoKLy8gdGVzdF9jYXNlcy5hdm1fdHlwZXNfaW5fYWJpLmNvbnRyYWN0LlRlc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gIC8vIGF2bV90eXBlc19pbl9hYmkvY29udHJhY3QucHk6MjQKICAgIC8vIGFzc2VydCBhcmdzWzFdLmJ5dGVzLmxlbmd0aCA9PSAzMgogICAgZnJhbWVfZGlnIC0xCiAgICBsZW4KICAgIHB1c2hpbnQgMzIgLy8gMzIKICAgID09CiAgICBhc3NlcnQKICAgIC8vIGF2bV90eXBlc19pbl9hYmkvY29udHJhY3QucHk6MjUKICAgIC8vIHJldHVybiBhcmdzCiAgICBmcmFtZV9kaWcgLTIKICAgIGZyYW1lX2RpZyAtMQogICAgcmV0c3ViCg==", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLmF2bV90eXBlc19pbl9hYmkuY29udHJhY3QuVGVzdENvbnRyYWN0LmNsZWFyX3N0YXRlX3Byb2dyYW06CiAgICBwdXNoaW50IDEgLy8gMQogICAgcmV0dXJuCg==" + }, + "byteCode": { + "approval": "CiADAAFAJgIBAAQVH3x1iAABQ4oAATEbQQDbggIE+3FmUgR+pkB4NhoAjgIAAgCqIokxGRREMRgURDYaASJTNhoCFzYaA1cCADYaBDYaBVcCADYaBkkiUygiTwJUIlNLAVcBCBdLAoEJWUsDgUtZSwRPAksCUlcCAEsEVwtASwUVTwZPBE8CUlcCAIgAaigiTwZUTwQWSwQVFlcGAk8FUEsEFSQORCSvTwWrSwQVFlcGAk8FUE8ETwRQgAIATVBLAxWBTQhMTwNQTBZXBgJQTwJQTFApTFCwI4kxGRREMRhENhoBSVcAAUxXASCIADVQKUxQsCOJIomKCgWL9ov7Eov3i/wSEIv4i/0SEIv5i/6oEIv6i/8SEESL9ov3i/iL+Yv6iYoCAov+FSMSRIv/FYEgEkSL/ov/iQ==", + "clear": "CoEBQw==" + }, + "compilerInfo": { + "compiler": "puya", + "compilerVersion": { + "major": 99, + "minor": 99, + "patch": 99 + } + } +} \ No newline at end of file diff --git a/test_cases/avm_types_in_abi/puya.log b/test_cases/avm_types_in_abi/puya.log index d90e36326b..d8b71dbb5c 100644 --- a/test_cases/avm_types_in_abi/puya.log +++ b/test_cases/avm_types_in_abi/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['avm_types_in_abi'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['avm_types_in_abi'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing avm_types_in_abi/out/module.awst debug: Sealing block@0: // L12 @@ -849,6 +849,7 @@ debug: Inserted tuple_of_arc4_block@0.ops[18]: 'l-store-copy tmp%3#0 0' debug: Replaced tuple_of_arc4_block@0.ops[20]: 'v-load tmp%3#0' with 'l-load tmp%3#0' debug: Found 2 edge set/s for test_cases.avm_types_in_abi.contract.TestContract.__puya_arc4_router__ info: Writing avm_types_in_abi/out/TestContract.arc32.json +info: Writing avm_types_in_abi/out/TestContract.arc56.json info: Writing avm_types_in_abi/out/TestContract.approval.teal info: Writing avm_types_in_abi/out/TestContract.clear.teal info: Writing avm_types_in_abi/out/TestContract.approval.bin diff --git a/test_cases/biguint_binary_ops/puya.log b/test_cases/biguint_binary_ops/puya.log index f9568df33d..78b89be454 100644 --- a/test_cases/biguint_binary_ops/puya.log +++ b/test_cases/biguint_binary_ops/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['biguint_binary_ops'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['biguint_binary_ops'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing biguint_binary_ops/out/module.awst debug: Sealing block@0: // L12 diff --git a/test_cases/boolean_binary_ops/puya.log b/test_cases/boolean_binary_ops/puya.log index 22093463ee..85dd023a55 100644 --- a/test_cases/boolean_binary_ops/puya.log +++ b/test_cases/boolean_binary_ops/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['boolean_binary_ops'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['boolean_binary_ops'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv boolean_binary_ops/contract.py:97:12 warning: expression is always True boolean_binary_ops/contract.py:98:12 warning: expression is always True diff --git a/test_cases/bug_load_store_load_store/puya.log b/test_cases/bug_load_store_load_store/puya.log index ccebe83f9b..f6d25dba6c 100644 --- a/test_cases/bug_load_store_load_store/puya.log +++ b/test_cases/bug_load_store_load_store/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['bug_load_store_load_store'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['bug_load_store_load_store'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing bug_load_store_load_store/out/module.awst debug: Sealing block@0: // L12 diff --git a/test_cases/bytes_ops/puya.log b/test_cases/bytes_ops/puya.log index 6806fc1482..78133fb974 100644 --- a/test_cases/bytes_ops/puya.log +++ b/test_cases/bytes_ops/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['bytes_ops'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['bytes_ops'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing bytes_ops/out/module.awst debug: Sealing block@0: // L12 diff --git a/test_cases/callsub/puya.log b/test_cases/callsub/puya.log index b1de9342bb..b1e0fc66e4 100644 --- a/test_cases/callsub/puya.log +++ b/test_cases/callsub/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['callsub'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['callsub'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing callsub/out/module.awst debug: Sealing block@0: // L12 diff --git a/test_cases/chained_assignment/puya.log b/test_cases/chained_assignment/puya.log index e1a055dfee..6385ce2c07 100644 --- a/test_cases/chained_assignment/puya.log +++ b/test_cases/chained_assignment/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['chained_assignment'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['chained_assignment'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing chained_assignment/out/module.awst debug: Sealing block@0: // L12 diff --git a/test_cases/compile/out/Hello.arc56.json b/test_cases/compile/out/Hello.arc56.json new file mode 100644 index 0000000000..5d38b0687a --- /dev/null +++ b/test_cases/compile/out/Hello.arc56.json @@ -0,0 +1,165 @@ +{ + "arcs": [ + 22, + 28 + ], + "name": "Hello", + "structs": {}, + "methods": [ + { + "name": "create", + "args": [ + { + "type": "string", + "name": "greeting" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "delete", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "DeleteApplication" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "greet", + "args": [ + { + "type": "string", + "name": "name" + } + ], + "returns": { + "type": "string" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 1 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": { + "greeting": { + "keyType": "AVMString", + "valueType": "AVMString", + "key": "Z3JlZXRpbmc=" + } + }, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [], + "call": [ + "UpdateApplication" + ] + }, + "events": [], + "templateVariables": {}, + "networks": {}, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 90 + ], + "errorMessage": "OnCompletion is DeleteApplication" + }, + { + "pc": [ + 69, + 99 + ], + "errorMessage": "OnCompletion is NoOp" + }, + { + "pc": [ + 160 + ], + "errorMessage": "check self.greeting exists" + }, + { + "pc": [ + 73 + ], + "errorMessage": "is creating" + }, + { + "pc": [ + 93, + 102, + 143 + ], + "errorMessage": "is not creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLmNvbXBpbGUuYXBwcy5IZWxsby5hcHByb3ZhbF9wcm9ncmFtOgogICAgaW50Y2Jsb2NrIDEgMAogICAgYnl0ZWNibG9jayAiZ3JlZXRpbmciCiAgICB0eG4gQXBwbGljYXRpb25JRAogICAgYm56IG1haW5fZW50cnlwb2ludEAyCiAgICBjYWxsc3ViIF9faW5pdF9fCgptYWluX2VudHJ5cG9pbnRAMjoKICAgIGNhbGxzdWIgX19wdXlhX2FyYzRfcm91dGVyX18KICAgIHJldHVybgoKCi8vIHRlc3RfY2FzZXMuY29tcGlsZS5hcHBzLkhlbGxvLl9fcHV5YV9hcmM0X3JvdXRlcl9fKCkgLT4gdWludDY0OgpfX3B1eWFfYXJjNF9yb3V0ZXJfXzoKICAgIC8vIGNvbXBpbGUvYXBwcy5weTo1NAogICAgLy8gY2xhc3MgSGVsbG8oSGVsbG9CYXNlKToKICAgIHByb3RvIDAgMQogICAgdHhuIE51bUFwcEFyZ3MKICAgIGJ6IF9fcHV5YV9hcmM0X3JvdXRlcl9fX2JhcmVfcm91dGluZ0A3CiAgICBwdXNoYnl0ZXNzIDB4MjBkZjNhNTQgMHgyNDM3OGQzYyAweGQwYTI4MjAwIC8vIG1ldGhvZCAiY3JlYXRlKHN0cmluZyl2b2lkIiwgbWV0aG9kICJkZWxldGUoKXZvaWQiLCBtZXRob2QgImdyZWV0KHN0cmluZylzdHJpbmciCiAgICB0eG5hIEFwcGxpY2F0aW9uQXJncyAwCiAgICBtYXRjaCBfX3B1eWFfYXJjNF9yb3V0ZXJfX19jcmVhdGVfcm91dGVAMiBfX3B1eWFfYXJjNF9yb3V0ZXJfX19kZWxldGVfcm91dGVAMyBfX3B1eWFfYXJjNF9yb3V0ZXJfX19ncmVldF9yb3V0ZUA0CiAg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gIGFzc2VydCAvLyBjaGVjayBzZWxmLmdyZWV0aW5nIGV4aXN0cwogICAgcHVzaGJ5dGVzICIgIgogICAgY29uY2F0CiAgICBmcmFtZV9kaWcgLTEKICAgIGNvbmNhdAogICAgcmV0c3ViCgoKLy8gdGVzdF9jYXNlcy5jb21waWxlLmFwcHMuSGVsbG9CYXNlLl9faW5pdF9fKCkgLT4gdm9pZDoKX19pbml0X186CiAgICAvLyBjb21waWxlL2FwcHMucHk6MjIKICAgIC8vIGRlZiBfX2luaXRfXyhzZWxmKSAtPiBOb25lOgogICAgcHJvdG8gMCAwCiAgICAvLyBjb21waWxlL2FwcHMucHk6MjMKICAgIC8vIHNlbGYuZ3JlZXRpbmcgPSBTdHJpbmcoKQogICAgYnl0ZWNfMCAvLyAiZ3JlZXRpbmciCiAgICBwdXNoYnl0ZXMgIiIKICAgIGFwcF9nbG9iYWxfcHV0CiAgICByZXRzdWIK", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLmNvbXBpbGUuYXBwcy5IZWxsby5jbGVhcl9zdGF0ZV9wcm9ncmFtOgogICAgcHVzaGludCAxIC8vIDEKICAgIHJldHVybgo=" + }, + "byteCode": { + "approval": "CiACAQAmAQhncmVldGluZzEYQAADiACRiAABQ4oAATEbQQBfggMEIN86VAQkN408BNCiggA2GgCOAwACABUAICOJMRkURDEYFEQ2GgFXAgCIAD8iiTEZgQUSRDEYRCKJMRkURDEYRDYaAVcCAIgAKkkVFlcGAkxQgAQVH3x1TFCwIomBBDEZjgEAAiOJMRhEIomKAQAoi/9niYoBASMoZUSAASBQi/9QiYoAACiAAGeJ", + "clear": "CoEBQw==" + }, + "compilerInfo": { + "compiler": "puya", + "compilerVersion": { + "major": 99, + "minor": 99, + "patch": 99 + } + } +} \ No newline at end of file diff --git a/test_cases/compile/out/HelloBase.arc56.json b/test_cases/compile/out/HelloBase.arc56.json new file mode 100644 index 0000000000..d717836194 --- /dev/null +++ b/test_cases/compile/out/HelloBase.arc56.json @@ -0,0 +1,145 @@ +{ + "arcs": [ + 22, + 28 + ], + "name": "HelloBase", + "structs": {}, + "methods": [ + { + "name": "delete", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "DeleteApplication" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "greet", + "args": [ + { + "type": "string", + "name": "name" + } + ], + "returns": { + "type": "string" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 1 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": { + "greeting": { + "keyType": "AVMString", + "valueType": "AVMString", + "key": "Z3JlZXRpbmc=" + } + }, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [ + "UpdateApplication" + ] + }, + "events": [], + "templateVariables": {}, + "networks": {}, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 64 + ], + "errorMessage": "OnCompletion is DeleteApplication" + }, + { + "pc": [ + 73 + ], + "errorMessage": "OnCompletion is NoOp" + }, + { + "pc": [ + 135 + ], + "errorMessage": "check self.greeting exists" + }, + { + "pc": [ + 121 + ], + "errorMessage": "is creating" + }, + { + "pc": [ + 67, + 76, + 126 + ], + "errorMessage": "is not creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLmNvbXBpbGUuYXBwcy5IZWxsb0Jhc2UuYXBwcm92YWxfcHJvZ3JhbToKICAgIGludGNibG9jayAwIDEKICAgIGJ5dGVjYmxvY2sgImdyZWV0aW5nIgogICAgdHhuIEFwcGxpY2F0aW9uSUQKICAgIGJueiBtYWluX2VudHJ5cG9pbnRAMg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ICJncmVldGluZyIKICAgIGFwcF9nbG9iYWxfZ2V0X2V4CiAgICBhc3NlcnQgLy8gY2hlY2sgc2VsZi5ncmVldGluZyBleGlzdHMKICAgIHB1c2hieXRlcyAiICIKICAgIGNvbmNhdAogICAgZnJhbWVfZGlnIC0xCiAgICBjb25jYXQKICAgIHJldHN1YgoKCi8vIHRlc3RfY2FzZXMuY29tcGlsZS5hcHBzLkhlbGxvQmFzZS5fX2luaXRfXygpIC0+IHZvaWQ6Cl9faW5pdF9fOgogICAgLy8gY29tcGlsZS9hcHBzLnB5OjIyCiAgICAvLyBkZWYgX19pbml0X18oc2VsZikgLT4gTm9uZToKICAgIHByb3RvIDAgMAogICAgLy8gY29tcGlsZS9hcHBzLnB5OjIzCiAgICAvLyBzZWxmLmdyZWV0aW5nID0gU3RyaW5nKCkKICAgIGJ5dGVjXzAgLy8gImdyZWV0aW5nIgogICAgcHVzaGJ5dGVzICIiCiAgICBhcHBfZ2xvYmFsX3B1dAogICAgcmV0c3ViCg==", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLmNvbXBpbGUuYXBwcy5IZWxsb0Jhc2UuY2xlYXJfc3RhdGVfcHJvZ3JhbToKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" + }, + "byteCode": { + "approval": "CiACAAEmAQhncmVldGluZzEYQAADiAB4iAABQ4oAATEbQQBFggIEJDeNPATQooIANhoAjgIAAgANIokxGYEFEkQxGEQjiTEZFEQxGEQ2GgFXAgCIACtJFRZXBgJMUIAEFR98dUxQsCOJIoEEMRmOAgACAAgiiTEYFEQjiTEYRCOJigEBIihlRIABIFCL/1CJigAAKIAAZ4k=", + "clear": "CoEBQw==" + }, + "compilerInfo": { + "compiler": "puya", + "compilerVersion": { + "major": 99, + "minor": 99, + "patch": 99 + } + } +} \ No newline at end of file diff --git a/test_cases/compile/out/HelloFactory.arc56.json b/test_cases/compile/out/HelloFactory.arc56.json new file mode 100644 index 0000000000..2df6230874 --- /dev/null +++ b/test_cases/compile/out/HelloFactory.arc56.json @@ -0,0 +1,317 @@ +{ + "arcs": [ + 22, + 28 + ], + "name": "HelloFactory", + "structs": {}, + "methods": [ + { + "name": "test_logicsig", + "args": [], + "returns": { + "type": "address" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "test_compile_contract", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "test_compile_contract_tmpl", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "test_compile_contract_prfx", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "test_compile_contract_large", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "test_arc4_create", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "test_arc4_create_tmpl", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "test_arc4_create_prfx", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "test_arc4_create_large", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "test_arc4_update", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "test_other_constants", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "test_abi_call_create_params", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "events": [], + "templateVariables": {}, + "networks": {}, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 4987, + 5080, + 5334, + 5422, + 5514, + 5608, + 5868, + 5960, + 6057, + 6117, + 6495, + 6638 + ], + "errorMessage": "ARC4 prefix is valid" + }, + { + "pc": [ + 4730, + 4746, + 4758, + 4770, + 4782, + 4794, + 4806, + 4818, + 4830, + 4842, + 4854, + 4866 + ], + "errorMessage": "OnCompletion is NoOp" + }, + { + "pc": [ + 4883 + ], + "errorMessage": "is creating" + }, + { + "pc": [ + 4733, + 4749, + 4761, + 4773, + 4785, + 4797, + 4809, + 4821, + 4833, + 4845, + 4857, + 4869 + ], + "errorMessage": "is not creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLmNvbXBpbGUuZmFjdG9yeS5IZWxsb0ZhY3RvcnkuYXBwcm92YWxfcHJvZ3JhbToKICAgIGludGNibG9jayAwIDYgMSA1CiAgICBieXRlY2Jsb2NrIDB4MTUxZjdjNzUgYmFzZTY0KENvRUJRdz09KSAweDI0Mzc4ZDNj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jb25zdGFudHM6CiAgICAvLyBjb21waWxlL2ZhY3RvcnkucHk6MjcwLTI3MQogICAgLy8gQGFyYzQuYWJpbWV0aG9kKCkKICAgIC8vIGRlZiB0ZXN0X290aGVyX2NvbnN0YW50cyhzZWxmKSAtPiBOb25lOgogICAgcHJvdG8gMCAwCiAgICAvLyBjb21waWxlL2ZhY3RvcnkucHk6MjcyLTI4NQogICAgLy8gYXBwID0gYXJjNC5hcmM0X2NyZWF0ZSgKICAgIC8vICAgICBIZWxsb090aGVyQ29uc3RhbnRzLAogICAgLy8gICAgIGNvbXBpbGVkPWNvbXBpbGVfY29udHJhY3QoCiAgICAvLyAgICAgICAgIEhlbGxvT3RoZXJDb25zdGFudHMsCiAgICAvLyAgICAgICAgIHRlbXBsYXRlX3ZhcnM9ewogICAgLy8gICAgICAgICAgICAgIk5VTSI6IEJpZ1VJbnQoNSksCiAgICAvLyAgICAgICAgICAgICAiR1JFRVRJTkciOiBTdHJpbmcoImhlbGxvIiksCiAgICAvLyAgICAgICAgICAgICAiQUNDT1VOVCI6IEFjY291bnQoCiAgICAvLyAgICAgICAgICAgICAgICAgIkFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFZNUhGS1EiCiAgICAvLyAgICAgICAgICAgICApLAogICAgLy8gICAgICAgICAgICAgIk1FVEhPRCI6IGFyYzQuYXJjNF9zaWduYXR1cmUoInNvbWV0aGluZygpdm9pZCIpLAogICAgLy8gICAgICAgICB9LAogICAgLy8gICAgICksCiAgICAvLyApLmNyZWF0ZWRfYXBwCiAgICBpdHhuX2JlZ2luCiAgICAvLyBjb21waWxlL2ZhY3RvcnkucHk6Mjc0LTI4NAogICAgLy8gY29tcGlsZWQ9Y29tcGlsZV9jb250cmFjdCgKICAgIC8vICAgICBIZWxsb090aGVyQ29uc3RhbnRzLAogICAgLy8gICAgIHRlbXBsYXRlX3ZhcnM9ewogICAgLy8gICAgICAgICAiTlVNIjog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rshonBLIaI7IQIrIBs7Q+SVcEAExXAAQoEkSxJbIZKrIaTLIYI7IQIrIBs4ANAAtoZWxsbyB3b3JsZBJEiYoAALEksjUpskInCLJAJwWyGiOyECKyAbO0PbFJshgrshonBLIaI7IQIrIBs7Q+SVcEAExXAAQoEkSxJbIZKrIaTLIYI7IQIrIBs4ALAAloZXkgd29ybGQSRImKAACxJLI1KbJCgKIBCiACAQAmAghncmVldGluZwJoaTEYQAADiACAiAABQ4oAATEbQQBWggMETFxhugQkN408BNCiggA2GgCOAwACAAwAFyOJMRkURDEYFEQiiTEZgQUSRDEYRCKJMRkURDEYRDYaAVcCAIgAIkkVFlcGAkxQgAQVH3x1TFCwIomBBDEZjgEAAiOJMRhEIomKAQEjKGVEgAEgUIv/UImKAAAoKWeJskAnBbIaI7IQIrIBs7Q9sUmyGCuyGicEshojshAisgGztD5JVwQATFcABCgSRLElshkqshpMshgjshAisgGzgAoACGhpIHdvcmxkEkSJigAAsYECsjgpskInC7JAJwyyQCOyECKyAbO0PbFJshgnDbIaI7IQIrIBs7Q+SVcEAExXAAQoEkSxJbIZKrIaTLIYI7IQIrIBs4AIAAAAAAAAEACoRImKAACxJLI1KbJCJwayQCcHshonCrIaI7IQIrIBs7Q9sUmyGCuyGicEshojshAisgGztD5JVwQATFcABCgSRFcCALElshlMshgqshojshAisgGzgAtoZWxsbyB3b3JsZBJEiYoAALEksjUpskInCLJAJwWyGiOyECKyAbO0PbFJshgrshonBLIaI7IQIrIBs7Q+SVcEAExXAAQoEkRXAgCxJbIZTLIYKrIaI7IQIrIBs4ALdG1wbDIgd29ybGQSRImKAACxJLI1KbJCgKUBCiACAQAmAghncmVldGluZwVwcmZ4MjEYQAADiACAiAABQ4oAATEbQQBWggMETFxhugQkN408BNCiggA2GgCOAwACAAwAFyOJMRkURDEYFEQiiTEZgQUSRDEYRCKJMRkURDEYRDYaAVcCAIgAIkkVFlcGAkxQgAQVH3x1TFCwIomBBDEZjgEAAiOJMRhEIomKAQEjKGVEgAEgUIv/UImKAAAoKWeJskAnBbIaI7IQIrIBs7Q9sUmyGCuyGicEshojshAisgGztD5JVwQATFcABCgSRFcCALElshlMshgqshojshAisgGzgAtwcmZ4MiB3b3JsZBJEiYoAALGBArI4KbJCJwuyQCcMskAjshAisgGztD2xSbIYJw2yGiOyECKyAbO0PklXBABMVwAEKBJEF4GAIBJEsSWyGbIYKrIaI7IQIrIBs4mKAACxgQKyNoECsjeBArI0gQKyNSSyOCmyQicIskAnBbIaI7IQIrIBs7Q9sUmyGCuyGicJshojshAisgGztD5JVwQATFcABCgSRFcCACcOEkSxKbJCJwayQIEEshlJshgjshAisgGzsUmyGCuyGicJshojshAisgGztD5JVwQATFcABCgSRFcCACcOEkSxJbIZshgqshojshAisgGziYoAALGBBLI1KbJCgJUCCiACAAEmCgNudW0EFR98dQEwCGdyZWV0aW5nB2FkZHJlc3MGbWV0aG9kBHRtcGwBQiAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAMRhAAAOIAKCIAAFDigABMRtBAFmCAwTZKFp0BCQ3jTwEWwwjdTYaAI4DAAIAFAAfIokxGRREMRgURIgAMhYpTFCwI4kxGYEFEkQxGEQjiTEZFEQxGEQ2GgFXAgCIABVJFRZXBgJMUClMULAjiSKJigABI4mKAQEiKGVEKqAVIwkiKGVEKqBLASMITE4CUiIrZUSAASBQi/9QTFAiJwRlRFAiJwVlRFCJigAAKycGZygnB2cnBCcIZycFJwlnibJAgATZKFp0shojshAisgGztD2xSbIYgARbDCN1shqACAAGSm9obm55shojshAisgGztD5JVwQATFcABCgSRFcCAIICLWhlbGxvIEpvaG5ueTUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARA4zUyUBJEsSWyGbIYKrIaI7IQIrIBs4mKAACxJLI1KbJCJwayQCcHshqABQADaGV5shojshAisgGztD2xSbIYK7IaJwmyGiOyECKyAbO0PklXBABMVwAEKBJEVwIAgAloZXkgdGhlcmUSRLElshmyGCqyGiOyECKyAbOJ", + "clear": "CoEBQw==" + }, + "compilerInfo": { + "compiler": "puya", + "compilerVersion": { + "major": 99, + "minor": 99, + "patch": 99 + } + } +} \ No newline at end of file diff --git a/test_cases/compile/out/HelloOtherConstants.arc56.json b/test_cases/compile/out/HelloOtherConstants.arc56.json new file mode 100644 index 0000000000..91780311f8 --- /dev/null +++ b/test_cases/compile/out/HelloOtherConstants.arc56.json @@ -0,0 +1,208 @@ +{ + "arcs": [ + 22, + 28 + ], + "name": "HelloOtherConstants", + "structs": {}, + "methods": [ + { + "name": "create", + "args": [], + "returns": { + "type": "uint64" + }, + "actions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "delete", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "DeleteApplication" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "greet", + "args": [ + { + "type": "string", + "name": "name" + } + ], + "returns": { + "type": "byte[]" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 4 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": { + "greeting": { + "keyType": "AVMString", + "valueType": "AVMString", + "key": "Z3JlZXRpbmc=" + }, + "num": { + "keyType": "AVMString", + "valueType": "AVMBytes", + "key": "bnVt" + }, + "address": { + "keyType": "AVMString", + "valueType": "AVMBytes", + "key": "YWRkcmVzcw==" + }, + "method": { + "keyType": "AVMString", + "valueType": "AVMBytes", + "key": "bWV0aG9k" + } + }, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [], + "call": [] + }, + "events": [], + "templateVariables": { + "TMPL_GREETING": { + "type": "AVMString", + "value": "dG1wbA==" + }, + "TMPL_NUM": { + "type": "AVMBytes", + "value": "Qg==" + }, + "TMPL_ACCOUNT": { + "type": "AVMBytes", + "value": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=" + }, + "TMPL_METHOD": { + "type": "AVMBytes", + "value": "AAAAAA==" + } + }, + "networks": {}, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 160 + ], + "errorMessage": "OnCompletion is DeleteApplication" + }, + { + "pc": [ + 140, + 169 + ], + "errorMessage": "OnCompletion is NoOp" + }, + { + "pc": [ + 246 + ], + "errorMessage": "check self.address exists" + }, + { + "pc": [ + 232 + ], + "errorMessage": "check self.greeting exists" + }, + { + "pc": [ + 252 + ], + "errorMessage": "check self.method exists" + }, + { + "pc": [ + 209, + 218 + ], + "errorMessage": "check self.num exists" + }, + { + "pc": [ + 144 + ], + "errorMessage": "is creating" + }, + { + "pc": [ + 163, + 172 + ], + "errorMessage": "is not creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLmNvbXBpbGUuYXBwcy5IZWxsb090aGVyQ29uc3RhbnRzLmFwcHJvdmFsX3Byb2dyYW06CiAgICBpbnRjYmxvY2sgMCAxCiAgICBieXRlY2Jsb2NrICJudW0iIDB4MTUxZjdjNzUgMHgzMCAiZ3JlZXRpbmciICJhZGRyZXNzIiAibWV0aG9kIiBUTVBMX0dSRUVUSU5HIFRNUExfTlVNIFRNUExfQUNDT1VOVCBUTVBMX01FVEhPRAogICAgdHhuIEFwcGxpY2F0aW9uSUQKICAgIGJueiBtYWluX2VudHJ5cG9pbnRAMgogICAgY2FsbHN1YiBfX2luaXRfXwoKbWFpbl9lbnRyeXBvaW50QDI6CiAgICBjYWxsc3ViIF9fcHV5YV9hcmM0X3JvdXRlcl9fCiAgICByZXR1cm4KCgovLyB0ZXN0X2Nhc2VzLmNvbXBpbGUuYXBwcy5IZWxsb090aGVyQ29uc3RhbnR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RlYyA5IC8vIFRNUExfTUVUSE9ECiAgICBhcHBfZ2xvYmFsX3B1dAogICAgcmV0c3ViCg==", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLmNvbXBpbGUuYXBwcy5IZWxsb090aGVyQ29uc3RhbnRzLmNsZWFyX3N0YXRlX3Byb2dyYW06CiAgICBwdXNoaW50IDEgLy8gMQogICAgcmV0dXJuCg==" + }, + "byteCode": { + "approval": "CiACAAEmCgNudW0EFR98dQEwCGdyZWV0aW5nB2FkZHJlc3MGbWV0aG9kBHRtcGwBQiAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAMRhAAAOIAKCIAAFDigABMRtBAFmCAwTZKFp0BCQ3jTwEWwwjdTYaAI4DAAIAFAAfIokxGRREMRgURIgAMhYpTFCwI4kxGYEFEkQxGEQjiTEZFEQxGEQ2GgFXAgCIABVJFRZXBgJMUClMULAjiSKJigABI4mKAQEiKGVEKqAVIwkiKGVEKqBLASMITE4CUiIrZUSAASBQi/9QTFAiJwRlRFAiJwVlRFCJigAAKycGZygnB2cnBCcIZycFJwlniQ==", + "clear": "CoEBQw==" + }, + "compilerInfo": { + "compiler": "puya", + "compilerVersion": { + "major": 99, + "minor": 99, + "patch": 99 + } + } +} \ No newline at end of file diff --git a/test_cases/compile/out/HelloPrfx.arc56.json b/test_cases/compile/out/HelloPrfx.arc56.json new file mode 100644 index 0000000000..ca5e32a1a0 --- /dev/null +++ b/test_cases/compile/out/HelloPrfx.arc56.json @@ -0,0 +1,165 @@ +{ + "arcs": [ + 22, + 28 + ], + "name": "HelloPrfx", + "structs": {}, + "methods": [ + { + "name": "create", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "delete", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "DeleteApplication" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "greet", + "args": [ + { + "type": "string", + "name": "name" + } + ], + "returns": { + "type": "string" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 1 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": { + "greeting": { + "keyType": "AVMString", + "valueType": "AVMString", + "key": "Z3JlZXRpbmc=" + } + }, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [], + "call": [ + "UpdateApplication" + ] + }, + "events": [], + "templateVariables": { + "PRFX_GREETING": { + "type": "AVMString", + "value": "cHJmeA==" + } + }, + "networks": {}, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 86 + ], + "errorMessage": "OnCompletion is DeleteApplication" + }, + { + "pc": [ + 74, + 95 + ], + "errorMessage": "OnCompletion is NoOp" + }, + { + "pc": [ + 148 + ], + "errorMessage": "check self.greeting exists" + }, + { + "pc": [ + 78 + ], + "errorMessage": "is creating" + }, + { + "pc": [ + 89, + 98, + 139 + ], + "errorMessage": "is not creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLmNvbXBpbGUuYXBwcy5IZWxsb1ByZnguYXBwcm92YWxfcHJvZ3JhbToKICAgIGludGNibG9jayAxIDAKICAgIGJ5dGVjYmxvY2sgImdyZWV0aW5nIiBQUkZYX0dSRUVUSU5HCiAgICB0eG4gQXBwbGljYXRpb25JRAogICAgYm56IG1haW5fZW50cnlwb2ludEAyCiAgICBjYWxsc3ViIF9faW5pdF9fCgptYWluX2VudHJ5cG9pbnRAMjoKICAgIGNhbGxzdWIgX19wdXlhX2FyYzRfcm91dGVyX18KICAgIHJldHVybgoK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NlcnQgLy8gY2hlY2sgc2VsZi5ncmVldGluZyBleGlzdHMKICAgIHB1c2hieXRlcyAiICIKICAgIGNvbmNhdAogICAgZnJhbWVfZGlnIC0xCiAgICBjb25jYXQKICAgIHJldHN1YgoKCi8vIHRlc3RfY2FzZXMuY29tcGlsZS5hcHBzLkhlbGxvUHJmeC5fX2luaXRfXygpIC0+IHZvaWQ6Cl9faW5pdF9fOgogICAgLy8gY29tcGlsZS9hcHBzLnB5OjczCiAgICAvLyBkZWYgX19pbml0X18oc2VsZikgLT4gTm9uZToKICAgIHByb3RvIDAgMAogICAgLy8gY29tcGlsZS9hcHBzLnB5Ojc0CiAgICAvLyBzZWxmLmdyZWV0aW5nID0gVGVtcGxhdGVWYXJbU3RyaW5nXSgiR1JFRVRJTkciLCBwcmVmaXg9IlBSRlhfIikKICAgIGJ5dGVjXzAgLy8gImdyZWV0aW5nIgogICAgYnl0ZWNfMSAvLyBQUkZYX0dSRUVUSU5HCiAgICBhcHBfZ2xvYmFsX3B1dAogICAgcmV0c3ViCg==", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLmNvbXBpbGUuYXBwcy5IZWxsb1ByZnguY2xlYXJfc3RhdGVfcHJvZ3JhbToKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" + }, + "byteCode": { + "approval": "CiACAQAmAghncmVldGluZwRwcmZ4MRhAAAOIAICIAAFDigABMRtBAFaCAwRMXGG6BCQ3jTwE0KKCADYaAI4DAAIADAAXI4kxGRREMRgURCKJMRmBBRJEMRhEIokxGRREMRhENhoBVwIAiAAiSRUWVwYCTFCABBUffHVMULAiiYEEMRmOAQACI4kxGEQiiYoBASMoZUSAASBQi/9QiYoAACgpZ4k=", + "clear": "CoEBQw==" + }, + "compilerInfo": { + "compiler": "puya", + "compilerVersion": { + "major": 99, + "minor": 99, + "patch": 99 + } + } +} \ No newline at end of file diff --git a/test_cases/compile/out/HelloTmpl.arc56.json b/test_cases/compile/out/HelloTmpl.arc56.json new file mode 100644 index 0000000000..1a36e3df45 --- /dev/null +++ b/test_cases/compile/out/HelloTmpl.arc56.json @@ -0,0 +1,165 @@ +{ + "arcs": [ + 22, + 28 + ], + "name": "HelloTmpl", + "structs": {}, + "methods": [ + { + "name": "create", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "delete", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "DeleteApplication" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "greet", + "args": [ + { + "type": "string", + "name": "name" + } + ], + "returns": { + "type": "string" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 1 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": { + "greeting": { + "keyType": "AVMString", + "valueType": "AVMString", + "key": "Z3JlZXRpbmc=" + } + }, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [], + "call": [ + "UpdateApplication" + ] + }, + "events": [], + "templateVariables": { + "TMPL_GREETING": { + "type": "AVMString", + "value": "dG1wbA==" + } + }, + "networks": {}, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 86 + ], + "errorMessage": "OnCompletion is DeleteApplication" + }, + { + "pc": [ + 74, + 95 + ], + "errorMessage": "OnCompletion is NoOp" + }, + { + "pc": [ + 148 + ], + "errorMessage": "check self.greeting exists" + }, + { + "pc": [ + 78 + ], + "errorMessage": "is creating" + }, + { + "pc": [ + 89, + 98, + 139 + ], + "errorMessage": "is not creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uID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AgIC8vIGNvbXBpbGUvYXBwcy5weTozMy0zNAogICAgLy8gQGFyYzQuYWJpbWV0aG9kKCkKICAgIC8vIGRlZiBncmVldChzZWxmLCBuYW1lOiBTdHJpbmcpIC0+IFN0cmluZzoKICAgIHByb3RvIDEgMQogICAgLy8gY29tcGlsZS9hcHBzLnB5OjM1CiAgICAvLyByZXR1cm4gc2VsZi5ncmVldGluZyArICIgIiArIG5hbWUKICAgIGludGNfMSAvLyAwCiAgICBieXRlY18wIC8vICJncmVldGluZyIKICAgIGFwcF9nbG9iYWxfZ2V0X2V4CiAgICBhc3NlcnQgLy8gY2hlY2sgc2VsZi5ncmVldGluZyBleGlzdHMKICAgIHB1c2hieXRlcyAiICIKICAgIGNvbmNhdAogICAgZnJhbWVfZGlnIC0xCiAgICBjb25jYXQKICAgIHJldHN1YgoKCi8vIHRlc3RfY2FzZXMuY29tcGlsZS5hcHBzLkhlbGxvVG1wbC5fX2luaXRfXygpIC0+IHZvaWQ6Cl9faW5pdF9fOgogICAgLy8gY29tcGlsZS9hcHBzLnB5OjYzCiAgICAvLyBkZWYgX19pbml0X18oc2VsZikgLT4gTm9uZToKICAgIHByb3RvIDAgMAogICAgLy8gY29tcGlsZS9hcHBzLnB5OjY0CiAgICAvLyBzZWxmLmdyZWV0aW5nID0gVGVtcGxhdGVWYXJbU3RyaW5nXSgiR1JFRVRJTkciKQogICAgYnl0ZWNfMCAvLyAiZ3JlZXRpbmciCiAgICBieXRlY18xIC8vIFRNUExfR1JFRVRJTkcKICAgIGFwcF9nbG9iYWxfcHV0CiAgICByZXRzdWIK", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLmNvbXBpbGUuYXBwcy5IZWxsb1RtcGwuY2xlYXJfc3RhdGVfcHJvZ3JhbToKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" + }, + "byteCode": { + "approval": "CiACAQAmAghncmVldGluZwR0bXBsMRhAAAOIAICIAAFDigABMRtBAFaCAwRMXGG6BCQ3jTwE0KKCADYaAI4DAAIADAAXI4kxGRREMRgURCKJMRmBBRJEMRhEIokxGRREMRhENhoBVwIAiAAiSRUWVwYCTFCABBUffHVMULAiiYEEMRmOAQACI4kxGEQiiYoBASMoZUSAASBQi/9QiYoAACgpZ4k=", + "clear": "CoEBQw==" + }, + "compilerInfo": { + "compiler": "puya", + "compilerVersion": { + "major": 99, + "minor": 99, + "patch": 99 + } + } +} \ No newline at end of file diff --git a/test_cases/compile/out/LargeProgram.arc56.json b/test_cases/compile/out/LargeProgram.arc56.json new file mode 100644 index 0000000000..2465f8a82e --- /dev/null +++ b/test_cases/compile/out/LargeProgram.arc56.json @@ -0,0 +1,125 @@ +{ + "arcs": [ + 22, + 28 + ], + "name": "LargeProgram", + "structs": {}, + "methods": [ + { + "name": "get_big_bytes_length", + "args": [], + "returns": { + "type": "uint64" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "delete", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "DeleteApplication" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "events": [], + "templateVariables": {}, + "networks": {}, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 67 + ], + "errorMessage": "OnCompletion is DeleteApplication" + }, + { + "pc": [ + 43 + ], + "errorMessage": "OnCompletion is NoOp" + }, + { + "pc": [ + 81 + ], + "errorMessage": "is creating" + }, + { + "pc": [ + 46, + 70 + ], + "errorMessage": "is not creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, +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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACJ", + "clear": "CoEBQw==" + }, + "compilerInfo": { + "compiler": "puya", + "compilerVersion": { + "major": 99, + "minor": 99, + "patch": 99 + } + } +} \ No newline at end of file diff --git a/test_cases/compile/puya.log b/test_cases/compile/puya.log index a3d073510b..3c1a9acdd9 100644 --- a/test_cases/compile/puya.log +++ b/test_cases/compile/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={'TMPL_GREETING': b'tmpl', 'PRFX_GREETING': b'prfx', 'TMPL_NUM': b'B', 'TMPL_ACCOUNT': b'/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00', 'TMPL_METHOD': b'/x00/x00/x00/x00'}, template_vars_prefix='', locals_coalescing_strategy=, paths=['compile'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={'TMPL_GREETING': b'tmpl', 'PRFX_GREETING': b'prfx', 'TMPL_NUM': b'B', 'TMPL_ACCOUNT': b'/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00', 'TMPL_METHOD': b'/x00/x00/x00/x00'}, template_vars_prefix='', locals_coalescing_strategy=, paths=['compile'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing compile/out/module.awst debug: Sealing block@0: // L12 @@ -7087,6 +7087,7 @@ info: Writing compile/out/always_approve_sig.teal info: Writing compile/out/always_approve_sig.bin info: Writing compile/out/always_approve_sig.puya.map info: Writing compile/out/HelloBase.arc32.json +info: Writing compile/out/HelloBase.arc56.json info: Writing compile/out/HelloBase.approval.teal info: Writing compile/out/HelloBase.clear.teal info: Writing compile/out/HelloBase.approval.bin @@ -7094,6 +7095,7 @@ info: Writing compile/out/HelloBase.clear.bin info: Writing compile/out/HelloBase.approval.puya.map info: Writing compile/out/HelloBase.clear.puya.map info: Writing compile/out/LargeProgram.arc32.json +info: Writing compile/out/LargeProgram.arc56.json info: Writing compile/out/LargeProgram.approval.teal info: Writing compile/out/LargeProgram.clear.teal info: Writing compile/out/LargeProgram.approval.bin @@ -7101,6 +7103,7 @@ info: Writing compile/out/LargeProgram.clear.bin info: Writing compile/out/LargeProgram.approval.puya.map info: Writing compile/out/LargeProgram.clear.puya.map info: Writing compile/out/Hello.arc32.json +info: Writing compile/out/Hello.arc56.json info: Writing compile/out/Hello.approval.teal info: Writing compile/out/Hello.clear.teal info: Writing compile/out/Hello.approval.bin @@ -7108,6 +7111,7 @@ info: Writing compile/out/Hello.clear.bin info: Writing compile/out/Hello.approval.puya.map info: Writing compile/out/Hello.clear.puya.map info: Writing compile/out/HelloTmpl.arc32.json +info: Writing compile/out/HelloTmpl.arc56.json info: Writing compile/out/HelloTmpl.approval.teal info: Writing compile/out/HelloTmpl.clear.teal info: Writing compile/out/HelloTmpl.approval.bin @@ -7115,6 +7119,7 @@ info: Writing compile/out/HelloTmpl.clear.bin info: Writing compile/out/HelloTmpl.approval.puya.map info: Writing compile/out/HelloTmpl.clear.puya.map info: Writing compile/out/HelloPrfx.arc32.json +info: Writing compile/out/HelloPrfx.arc56.json info: Writing compile/out/HelloPrfx.approval.teal info: Writing compile/out/HelloPrfx.clear.teal info: Writing compile/out/HelloPrfx.approval.bin @@ -7122,6 +7127,7 @@ info: Writing compile/out/HelloPrfx.clear.bin info: Writing compile/out/HelloPrfx.approval.puya.map info: Writing compile/out/HelloPrfx.clear.puya.map info: Writing compile/out/HelloOtherConstants.arc32.json +info: Writing compile/out/HelloOtherConstants.arc56.json info: Writing compile/out/HelloOtherConstants.approval.teal info: Writing compile/out/HelloOtherConstants.clear.teal info: Writing compile/out/HelloOtherConstants.approval.bin @@ -7129,6 +7135,7 @@ info: Writing compile/out/HelloOtherConstants.clear.bin info: Writing compile/out/HelloOtherConstants.approval.puya.map info: Writing compile/out/HelloOtherConstants.clear.puya.map info: Writing compile/out/HelloFactory.arc32.json +info: Writing compile/out/HelloFactory.arc56.json info: Writing compile/out/HelloFactory.approval.teal info: Writing compile/out/HelloFactory.clear.teal info: Writing compile/out/HelloFactory.approval.bin diff --git a/test_cases/conditional_execution/puya.log b/test_cases/conditional_execution/puya.log index df22a3ff44..5eaa939b5b 100644 --- a/test_cases/conditional_execution/puya.log +++ b/test_cases/conditional_execution/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['conditional_execution'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['conditional_execution'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv conditional_execution/contract.py:11:9 warning: expression result is ignored conditional_execution/contract.py:17:9 warning: expression result is ignored diff --git a/test_cases/conditional_expressions/puya.log b/test_cases/conditional_expressions/puya.log index b6b37bbf45..e2034a50e9 100644 --- a/test_cases/conditional_expressions/puya.log +++ b/test_cases/conditional_expressions/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['conditional_expressions'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['conditional_expressions'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing conditional_expressions/out/module.awst debug: Sealing block@0: // L12 diff --git a/test_cases/constants/puya.log b/test_cases/constants/puya.log index a40af6c311..994cddcb2c 100644 --- a/test_cases/constants/puya.log +++ b/test_cases/constants/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['constants'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['constants'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv constants/non_utf8.py:1 warning: UH OH SPAGHETTI-O's, darn tootin' non-utf8(?!) encoded file encountered: constants/non_utf8.py encoded as iso-8859-7 info: writing constants/out/module.awst diff --git a/test_cases/contains/puya.log b/test_cases/contains/puya.log index b876b4ad9c..b3dc49a4b2 100644 --- a/test_cases/contains/puya.log +++ b/test_cases/contains/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['contains'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['contains'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing contains/out/module.awst debug: Sealing block@0: // L12 diff --git a/test_cases/control_op_simplification/puya.log b/test_cases/control_op_simplification/puya.log index a5163b8d28..6bad601747 100644 --- a/test_cases/control_op_simplification/puya.log +++ b/test_cases/control_op_simplification/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['control_op_simplification'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['control_op_simplification'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing control_op_simplification/out/module.awst debug: Sealing block@0: // L12 diff --git a/test_cases/debug/out/DebugContract.arc56.json b/test_cases/debug/out/DebugContract.arc56.json new file mode 100644 index 0000000000..ab54d3a2b2 --- /dev/null +++ b/test_cases/debug/out/DebugContract.arc56.json @@ -0,0 +1,120 @@ +{ + "arcs": [ + 22, + 28 + ], + "name": "DebugContract", + "structs": {}, + "methods": [ + { + "name": "test", + "args": [ + { + "type": "uint64", + "name": "x" + }, + { + "type": "uint64", + "name": "y" + }, + { + "type": "uint64", + "name": "z" + } + ], + "returns": { + "type": "uint64" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "events": [], + "templateVariables": { + "A_MULT": { + "type": "AVMUint64", + "value": "AAAAAAAAAAE=" + } + }, + "networks": {}, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 52 + ], + "errorMessage": "OnCompletion is NoOp" + }, + { + "pc": [ + 91 + ], + "errorMessage": "is creating" + }, + { + "pc": [ + 55 + ], + "errorMessage": "is not creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLmRlYnVnLmNvbnRyYWN0LkRlYnVnQ29udHJhY3QuYXBwcm92YWxfcHJvZ3JhbToKICAgIGludGNibG9jayAxIDAgMTAgVE1QTF9BX01VTFQKICAgIGJ5dGVjYmxv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bnRyYWN0LkRlYnVnQ29udHJhY3QuY2xlYXJfc3RhdGVfcHJvZ3JhbToKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" + }, + "byteCode": { + "approval": "CiAEAQAKASYCASAKMDEyMzQ1Njc4OYgAAUOKAAExG0EAMYAEU1dL/zYaAI4BAAIjiTEZFEQxGEQ2GgEXNhoCFzYaAxeIABkWgAQVH3x1TFCwIokxGUAABjEYFEQiiSOJigMBI0mAAEmL/SULi/2L/ghHAov/C0lOAgxBAAqLBIv+CIwEQgA7iwSLBgxBAAqLBIv/CIwEQgApiwWLBAxBAAqLBIEDC4wEQgAXiwVJiwQNTIwDQQAHiwWLBAiMA4sDjAWLBIsFCIsGDEEADosESYv+iAB8C4wEQgALiwVJi/+IAG4LjAWLBUmIAJOMAIsESU8CCEmMBkmIAISMAUsBDUyMAkEAB4sEiwYIjAKLAkmMBEmLBQxMjAJBAAeLBIsFCIwCiwJJjASLBYsGCEsBDUyMAkEAB4sEi/8LjAKLAkmIADwoUIsAUChQiwFQsIwAiYoCAYv+i/8IjP6L/4v+C4z/i/6L/whJjP6BAgtJjP6L/wiL/ov/C0oMTE4CTYmKAQGL/yQMQQALi/8iCCmL/08CUomL/yQKiP/ki/8kGEkiCClOAlJQiQ==", + "clear": "CoEBQw==" + }, + "compilerInfo": { + "compiler": "puya", + "compilerVersion": { + "major": 99, + "minor": 99, + "patch": 99 + } + } +} \ No newline at end of file diff --git a/test_cases/debug/puya.log b/test_cases/debug/puya.log index 567c9b84f4..7228313f8e 100644 --- a/test_cases/debug/puya.log +++ b/test_cases/debug/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={'A_MULT': 1}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['debug'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={'A_MULT': 1}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['debug'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing debug/out/module.awst debug: Sealing block@0: // L12 @@ -1160,6 +1160,7 @@ debug: Found 1 edge set/s for test_cases.debug.contract.itoa debug: test_cases.debug.contract.DebugContract.test f-stack entry: ['bee#0', 'cea#0', 'a#30', 'b#10'] debug: test_cases.debug.contract.DebugContract.test f-stack on first store: ['a#0', 'b#0', 'c#0'] info: Writing debug/out/DebugContract.arc32.json +info: Writing debug/out/DebugContract.arc56.json info: Writing debug/out/DebugContract.approval.teal info: Writing debug/out/DebugContract.clear.teal info: Writing debug/out/DebugContract.approval.bin diff --git a/test_cases/diamond_mro/out/Base1.arc56.json b/test_cases/diamond_mro/out/Base1.arc56.json new file mode 100644 index 0000000000..19e4a807d6 --- /dev/null +++ b/test_cases/diamond_mro/out/Base1.arc56.json @@ -0,0 +1,117 @@ +{ + "arcs": [ + 22, + 28 + ], + "name": "Base1", + "structs": {}, + "methods": [ + { + "name": "method", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "create", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [], + "call": [] + }, + "events": [], + "templateVariables": {}, + "networks": {}, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 51, + 63 + ], + "errorMessage": "OnCompletion is NoOp" + }, + { + "pc": [ + 67 + ], + "errorMessage": "is creating" + }, + { + "pc": [ + 54 + ], + "errorMessage": "is not creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLmRpYW1vbmRfbXJvLmJhc2UxLkJhc2UxLmFwcHJvdmFsX3Byb2dyYW06CiAgICBpbnRjYmxvY2sgMCAxCiAgICB0eG4gQXBwbGljYXRpb25JRAogICAgYm56IG1haW5fZW50cnlwb2ludEAyCiAgICBjYWxsc3ViIF9faW5pdF9fCgptYWluX2VudHJ5cG9pbnRAMjoKICAgIGNhbGxzdWIgX19wdXlhX2FyYzRfcm91dGVyX18KICAgIHJldHVybgoKCi8vIHRlc3RfY2FzZXMuZGlhbW9uZF9tcm8uYmFzZTEuQmFzZTEuX19wdXlhX2FyYzRfcm91dGVyX18oKSAtPiB1aW50NjQ6Cl9fcHV5YV9hcmM0X3JvdXRlcl9fOgogICAgLy8gZGlhbW9uZF9tcm8vYmFzZTEucHk6NgogICAgLy8gY2xhc3MgQmFzZTEoR1ApOgogICAgcHJvdG8gMCAxCiAgICB0eG4gTnVtQXBwQXJncwogICAgYnogX19wdXlhX2FyYzRfcm91dGVyX19fYWZ0ZXJfaWZfZWxzZUA3CiAgICBwdXNoYnl0ZXNzIDB4NGYwNDVkODQgMHg0YzVjNjFiYSAvLyBtZXRob2QgIm1ldGhvZCgpdm9pZCIsIG1ldGhvZCAiY3JlYXRlKCl2b2lkIgogICAgdHhuYSBBcHBsaWNhdGlvbkFyZ3MgMAogICAgbWF0Y2ggX19wdXlhX2FyYzRfcm91dGVyX19fbWV0aG9kX3JvdXRlQDIgX19wdXlhX2FyYzRfcm91dGVyX19fY3JlYXRlX3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XMuZGlhbW9uZF9tcm8uZ3AuR1AuX19pbml0X18KICAgIHJldHN1YgoKCi8vIHRlc3RfY2FzZXMuZGlhbW9uZF9tcm8uZ3AuR1AuX19pbml0X18oKSAtPiB2b2lkOgp0ZXN0X2Nhc2VzLmRpYW1vbmRfbXJvLmdwLkdQLl9faW5pdF9fOgogICAgLy8gZGlhbW9uZF9tcm8vZ3AucHk6NwogICAgLy8gZGVmIF9faW5pdF9fKHNlbGYpIC0+IE5vbmU6CiAgICBwcm90byAwIDAKICAgIC8vIGRpYW1vbmRfbXJvL2dwLnB5OjgKICAgIC8vIGxvZygiZ3AuX19pbml0X18iKQogICAgcHVzaGJ5dGVzICJncC5fX2luaXRfXyIKICAgIGxvZwogICAgcmV0c3ViCg==", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLmRpYW1vbmRfbXJvLmJhc2UxLkJhc2UxLmNsZWFyX3N0YXRlX3Byb2dyYW06CiAgICBwdXNoaW50IDEgLy8gMQogICAgcmV0dXJuCg==" + }, + "byteCode": { + "approval": "CiACAAExGEAAA4gAYYgAAUOKAAExG0EALYICBE8EXYQETFxhujYaAI4CAAIADiKJMRkURDEYRIgADiOJMRkURDEYFEQjiSKJigAAgAxiYXNlMS5tZXRob2SwiAABiYoAAIAJZ3AubWV0aG9ksImKAACADmJhc2UxLl9faW5pdF9fsIgAAYmKAACAC2dwLl9faW5pdF9fsIk=", + "clear": "CoEBQw==" + }, + "compilerInfo": { + "compiler": "puya", + "compilerVersion": { + "major": 99, + "minor": 99, + "patch": 99 + } + } +} \ No newline at end of file diff --git a/test_cases/diamond_mro/out/Base2.arc56.json b/test_cases/diamond_mro/out/Base2.arc56.json new file mode 100644 index 0000000000..076deb3996 --- /dev/null +++ b/test_cases/diamond_mro/out/Base2.arc56.json @@ -0,0 +1,117 @@ +{ + "arcs": [ + 22, + 28 + ], + "name": "Base2", + "structs": {}, + "methods": [ + { + "name": "method", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "create", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [], + "call": [] + }, + "events": [], + "templateVariables": {}, + "networks": {}, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 51, + 63 + ], + "errorMessage": "OnCompletion is NoOp" + }, + { + "pc": [ + 67 + ], + "errorMessage": "is creating" + }, + { + "pc": [ + 54 + ], + "errorMessage": "is not creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLmRpYW1vbmRfbXJvLmJhc2UyLkJhc2UyLmFwcHJvdmFsX3Byb2dyYW06CiAgICBpbnRjYmxvY2sgMCAxCiAgICB0eG4gQXBwbGljYXRpb25JRAogICAgYm56IG1haW5fZW50cnlwb2ludEAyCiAgICBjYWxsc3ViIF9faW5pdF9fCgptYWluX2VudHJ5cG9pbnRAMjoKICAgIGNhbGxzdWIgX19wdXlhX2FyYzRfcm91dGVyX18KICAgIHJldHVybgoKCi8vIHRlc3RfY2FzZXMuZGlhbW9uZF9tcm8uYmFzZTIuQmFzZTIuX19wdXlhX2FyYzRfcm91dGVyX18oKSAtPiB1aW50NjQ6Cl9fcHV5YV9hcmM0X3JvdXRlcl9fOgogICAgLy8gZGlhbW9uZF9tcm8vYmFzZTIucHk6NgogICAgLy8gY2xhc3MgQmFzZTIoR1ApOgogICAgcHJvdG8gMCAxCiAgICB0eG4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KAACAC2dwLl9faW5pdF9fsIk=", + "clear": "CoEBQw==" + }, + "compilerInfo": { + "compiler": "puya", + "compilerVersion": { + "major": 99, + "minor": 99, + "patch": 99 + } + } +} \ No newline at end of file diff --git a/test_cases/diamond_mro/out/Derived.arc56.json b/test_cases/diamond_mro/out/Derived.arc56.json new file mode 100644 index 0000000000..a57139ffb9 --- /dev/null +++ b/test_cases/diamond_mro/out/Derived.arc56.json @@ -0,0 +1,117 @@ +{ + "arcs": [ + 22, + 28 + ], + "name": "Derived", + "structs": {}, + "methods": [ + { + "name": "method", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "create", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [], + "call": [] + }, + "events": [], + "templateVariables": {}, + "networks": {}, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 51, + 63 + ], + "errorMessage": "OnCompletion is NoOp" + }, + { + "pc": [ + 67 + ], + "errorMessage": "is creating" + }, + { + "pc": [ + 54 + ], + "errorMessage": "is not creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLmRpYW1vbmRfbXJvLmRlcml2ZWQuRGVyaXZlZC5hcHByb3ZhbF9wcm9ncmFtOgogICAgaW50Y2Jsb2NrIDAgMQogICAgdHhuIEFwcGxpY2F0aW9uSUQKICAgIGJueiBtYWluX2VudHJ5cG9pbnRAMgog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gICAvLyBkaWFtb25kX21yby9ncC5weTo4CiAgICAvLyBsb2coImdwLl9faW5pdF9fIikKICAgIHB1c2hieXRlcyAiZ3AuX19pbml0X18iCiAgICBsb2cKICAgIHJldHN1Ygo=", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLmRpYW1vbmRfbXJvLmRlcml2ZWQuRGVyaXZlZC5jbGVhcl9zdGF0ZV9wcm9ncmFtOgogICAgcHVzaGludCAxIC8vIDEKICAgIHJldHVybgo=" + }, + "byteCode": { + "approval": "CiACAAExGEAAA4gAj4gAAUOKAAExG0EALYICBE8EXYQETFxhujYaAI4CAAIADiKJMRkURDEYRIgADiOJMRkURDEYFEQjiSKJigAAgA5kZXJpdmVkLm1ldGhvZLCIAAGJigAAgAxiYXNlMS5tZXRob2SwiAABiYoAAIAMYmFzZTIubWV0aG9ksIgAAYmKAACACWdwLm1ldGhvZLCJigAAgBBkZXJpdmVkLl9faW5pdF9fsIgAAYmKAACADmJhc2UxLl9faW5pdF9fsIgAAYmKAACADmJhc2UyLl9faW5pdF9fsIgAAYmKAACAC2dwLl9faW5pdF9fsIk=", + "clear": "CoEBQw==" + }, + "compilerInfo": { + "compiler": "puya", + "compilerVersion": { + "major": 99, + "minor": 99, + "patch": 99 + } + } +} \ No newline at end of file diff --git a/test_cases/diamond_mro/out/GP.arc56.json b/test_cases/diamond_mro/out/GP.arc56.json new file mode 100644 index 0000000000..f46f8adb13 --- /dev/null +++ b/test_cases/diamond_mro/out/GP.arc56.json @@ -0,0 +1,117 @@ +{ + "arcs": [ + 22, + 28 + ], + "name": "GP", + "structs": {}, + "methods": [ + { + "name": "create", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "method", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [], + "call": [] + }, + "events": [], + "templateVariables": {}, + "networks": {}, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 51, + 61 + ], + "errorMessage": "OnCompletion is NoOp" + }, + { + "pc": [ + 55 + ], + "errorMessage": "is creating" + }, + { + "pc": [ + 64 + ], + "errorMessage": "is not creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLmRpYW1vbmRfbXJvLmdwLkdQLmFwcHJvdmFsX3Byb2dyYW06CiAgICBpbnRjYmxvY2sgMCAxCiAgICB0eG4gQXBwbGljYXRpb25JRAogICAgYm56IG1haW5fZW50cnlwb2ludEAyCiAgICBjYWxsc3ViIF9faW5pdF9fCgptYWluX2VudHJ5cG9pbnRAMjoKICAgIGNhbGxzdWIgX19wdXlhX2FyYzRfcm91dGVyX18KICAgIHJldHVybgoKCi8vIHRlc3RfY2FzZXMuZGlhbW9uZF9tcm8uZ3AuR1AuX19wdXlhX2FyYzRfcm91dGVyX18oKSAtPiB1aW50NjQ6Cl9fcHV5YV9hcmM0X3JvdXRlcl9fOgogICAgLy8gZGlhbW9uZF9tcm8vZ3AucHk6NgogICAgLy8gY2xhc3MgR1AoQVJDNENvbnRyYWN0LCBhYmMuQUJDKToKICAgIHByb3RvIDAgMQogICAgdHhuIE51bUFwcEFyZ3MKICAgIGJ6IF9fcHV5YV9hcmM0X3JvdXRlcl9fX2FmdGVyX2lmX2Vsc2VANwogICAgcHVzaGJ5dGVzcyAweDRjNWM2MWJhIDB4NGYwNDVkODQgLy8gbWV0aG9kICJjcmVhdGUoKXZvaW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LkdQLm1ldGhvZCgpIC0+IHZvaWQ6Cm1ldGhvZDoKICAgIC8vIGRpYW1vbmRfbXJvL2dwLnB5OjE1LTE2CiAgICAvLyBAYXJjNC5hYmltZXRob2QKICAgIC8vIGRlZiBtZXRob2Qoc2VsZikgLT4gTm9uZToKICAgIHByb3RvIDAgMAogICAgLy8gZGlhbW9uZF9tcm8vZ3AucHk6MTcKICAgIC8vIGxvZygiZ3AubWV0aG9kIikKICAgIHB1c2hieXRlcyAiZ3AubWV0aG9kIgogICAgbG9nCiAgICByZXRzdWIKCgovLyB0ZXN0X2Nhc2VzLmRpYW1vbmRfbXJvLmdwLkdQLl9faW5pdF9fKCkgLT4gdm9pZDoKX19pbml0X186CiAgICAvLyBkaWFtb25kX21yby9ncC5weTo3CiAgICAvLyBkZWYgX19pbml0X18oc2VsZikgLT4gTm9uZToKICAgIHByb3RvIDAgMAogICAgLy8gZGlhbW9uZF9tcm8vZ3AucHk6OAogICAgLy8gbG9nKCJncC5fX2luaXRfXyIpCiAgICBwdXNoYnl0ZXMgImdwLl9faW5pdF9fIgogICAgbG9nCiAgICByZXRzdWIK", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLmRpYW1vbmRfbXJvLmdwLkdQLmNsZWFyX3N0YXRlX3Byb2dyYW06CiAgICBwdXNoaW50IDEgLy8gMQogICAgcmV0dXJuCg==" + }, + "byteCode": { + "approval": "CiACAAExGEAAA4gAS4gAAUOKAAExG0EALYICBExcYboETwRdhDYaAI4CAAIADCKJMRkURDEYFEQjiTEZFEQxGESIAAQjiSKJigAAgAlncC5tZXRob2SwiYoAAIALZ3AuX19pbml0X1+wiQ==", + "clear": "CoEBQw==" + }, + "compilerInfo": { + "compiler": "puya", + "compilerVersion": { + "major": 99, + "minor": 99, + "patch": 99 + } + } +} \ No newline at end of file diff --git a/test_cases/diamond_mro/puya.log b/test_cases/diamond_mro/puya.log index 85f26ef613..2d7b86bcf5 100644 --- a/test_cases/diamond_mro/puya.log +++ b/test_cases/diamond_mro/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['diamond_mro'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['diamond_mro'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing diamond_mro/out/module.awst debug: Sealing block@0: // L12 @@ -1673,6 +1673,7 @@ debug: Replaced __puya_arc4_router___create_route@3.ops[16]: 'v-load tmp%10#0' w debug: Found 1 edge set/s for test_cases.diamond_mro.derived.Derived.approval_program debug: Found 2 edge set/s for test_cases.diamond_mro.derived.Derived.__puya_arc4_router__ info: Writing diamond_mro/out/GP.arc32.json +info: Writing diamond_mro/out/GP.arc56.json info: Writing diamond_mro/out/GP.approval.teal info: Writing diamond_mro/out/GP.clear.teal info: Writing diamond_mro/out/GP.approval.bin @@ -1680,6 +1681,7 @@ info: Writing diamond_mro/out/GP.clear.bin info: Writing diamond_mro/out/GP.approval.puya.map info: Writing diamond_mro/out/GP.clear.puya.map info: Writing diamond_mro/out/Base2.arc32.json +info: Writing diamond_mro/out/Base2.arc56.json info: Writing diamond_mro/out/Base2.approval.teal info: Writing diamond_mro/out/Base2.clear.teal info: Writing diamond_mro/out/Base2.approval.bin @@ -1687,6 +1689,7 @@ info: Writing diamond_mro/out/Base2.clear.bin info: Writing diamond_mro/out/Base2.approval.puya.map info: Writing diamond_mro/out/Base2.clear.puya.map info: Writing diamond_mro/out/Base1.arc32.json +info: Writing diamond_mro/out/Base1.arc56.json info: Writing diamond_mro/out/Base1.approval.teal info: Writing diamond_mro/out/Base1.clear.teal info: Writing diamond_mro/out/Base1.approval.bin @@ -1694,6 +1697,7 @@ info: Writing diamond_mro/out/Base1.clear.bin info: Writing diamond_mro/out/Base1.approval.puya.map info: Writing diamond_mro/out/Base1.clear.puya.map info: Writing diamond_mro/out/Derived.arc32.json +info: Writing diamond_mro/out/Derived.arc56.json info: Writing diamond_mro/out/Derived.approval.teal info: Writing diamond_mro/out/Derived.clear.teal info: Writing diamond_mro/out/Derived.approval.bin diff --git a/test_cases/dup2_optimization_bug/puya.log b/test_cases/dup2_optimization_bug/puya.log index cd5f0d6773..7c4186da3d 100644 --- a/test_cases/dup2_optimization_bug/puya.log +++ b/test_cases/dup2_optimization_bug/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['dup2_optimization_bug'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['dup2_optimization_bug'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing dup2_optimization_bug/out/module.awst debug: Sealing block@0: // L12 diff --git a/test_cases/edverify/puya.log b/test_cases/edverify/puya.log index 0c6a5b3f88..10b47fc3ab 100644 --- a/test_cases/edverify/puya.log +++ b/test_cases/edverify/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['edverify'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['edverify'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing edverify/out/module.awst debug: Sealing block@0: // L12 diff --git a/test_cases/enumeration/puya.log b/test_cases/enumeration/puya.log index 6002a786ea..1a6a8ac6e6 100644 --- a/test_cases/enumeration/puya.log +++ b/test_cases/enumeration/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['enumeration'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['enumeration'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing enumeration/out/module.awst debug: Sealing block@0: // L12 diff --git a/test_cases/everything/out/MyContract.arc56.json b/test_cases/everything/out/MyContract.arc56.json new file mode 100644 index 0000000000..3bd1bb81b1 --- /dev/null +++ b/test_cases/everything/out/MyContract.arc56.json @@ -0,0 +1,233 @@ +{ + "arcs": [ + 22, + 28 + ], + "name": "MyContract", + "structs": {}, + "methods": [ + { + "name": "create", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "register", + "args": [ + { + "type": "string", + "name": "name" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp", + "OptIn" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "say_hello", + "args": [], + "returns": { + "type": "string" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "calculate", + "args": [ + { + "type": "uint64", + "name": "a" + }, + { + "type": "uint64", + "name": "b" + } + ], + "returns": { + "type": "uint64" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "close_out", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "CloseOut" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "state": { + "schema": { + "global": { + "ints": 1, + "bytes": 1 + }, + "local": { + "ints": 0, + "bytes": 1 + } + }, + "keys": { + "global": { + "counter": { + "keyType": "AVMString", + "valueType": "AVMUint64", + "key": "Y291bnRlcg==" + }, + "creator": { + "keyType": "AVMString", + "valueType": "AVMBytes", + "key": "Y3JlYXRvcg==" + } + }, + "local": { + "name": { + "keyType": "AVMString", + "valueType": "string", + "key": "bmFtZQ==" + } + }, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [], + "call": [] + }, + "events": [], + "templateVariables": {}, + "networks": {}, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 156 + ], + "errorMessage": "OnCompletion is CloseOut" + }, + { + "pc": [ + 84, + 116, + 132 + ], + "errorMessage": "OnCompletion is NoOp" + }, + { + "pc": [ + 101 + ], + "errorMessage": "OnCompletion is one of NoOp, OptIn" + }, + { + "pc": [ + 189 + ], + "errorMessage": "You are banned, goodbye" + }, + { + "pc": [ + 270, + 406 + ], + "errorMessage": "check self.counter exists" + }, + { + "pc": [ + 88 + ], + "errorMessage": "is creating" + }, + { + "pc": [ + 104, + 119, + 135, + 159 + ], + "errorMessage": "is not creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [ + { + "pc": [ + 24 + ], + "errorMessage": "check self.counter exists" + } + ], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLmV2ZXJ5dGhpbmcuY29udHJhY3QuRXZlcnl0aGluZy5hcHByb3ZhbF9wcm9ncmFtOgogICAgaW50Y2Jsb2NrIDEgMAogICAgYnl0ZWNibG9jayAiY291bnRlciIgIm5hbWUiIDB4MTUxZjdjNzUKICAgIGNhbGxzdWIgX19wdXlhX2FyYzRfcm91dGVyX18KICAgIHJldHVybgoKCi8vIHRlc3RfY2FzZXMuZXZlcnl0aGluZy5jb250cmFjdC5FdmVyeXRoaW5nLl9fcHV5YV9hcmM0X3JvdXRlcl9fKCkgLT4gdWludDY0OgpfX3B1eWFfYXJjNF9yb3V0ZXJfXzoKICAgIC8vIGV2ZXJ5dGhpbmcvY29udHJhY3QucHk6MzcKICAgIC8vIGNsYXNzIEV2ZXJ5dGhpbmcoQVJDNENvbnRyYWN0LCBNeU1pZGRsZUJhc2UsIG5hbWU9Ik15Q29udHJhY3QiKToKICAgIHByb3RvIDAgMQogICAgdHhuIE51bUFwcEFyZ3MKICAgIGJ6IF9fcHV5YV9hcmM0X3JvdXRlcl9fX2FmdGVyX2lmX2Vsc2VAMTAKICAgIHB1c2hieXRlc3MgMHg0YzVjNjFiYSAweGJkNjA5OWU1IDB4NWQ1Yzg0YzcgMHhmZDA3MjY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Ly8gZXZlcnl0aGluZy9jb250cmFjdC5weTo4OAogICAgLy8gcmV0dXJuIFVJbnQ2NCgxKQogICAgcHVzaGludCAxIC8vIDEKICAgIHJldHN1Ygo=" + }, + "byteCode": { + "approval": "CiACAQAmAwdjb3VudGVyBG5hbWUEFR98dYgAAUOKAAExG0EAgIIFBExcYboEvWCZ5QRdXITHBP0HJk4EFliqLzYaAI4FAAIADwAiADIASCOJMRkURDEYFESIAEsiiSIxGZCBAxpEMRhENhoBiACGIokxGRREMRhEiACmKkxQsCKJMRkURDEYRDYaATYaAogA2ypMULAiiTEZgQISRDEYRIgA5iKJI4mKAACIAAeIADUoI2eJigAAMQCIAAMTRImKAAGAIKiYlVnY6/r/yUzJSuESLnpFl00JY1GG0Eo/1xdzqWJfiYoAAIAHY3JlYXRvcjEAZ4mKAQCI/7kxGSISQQAUI0kpY0UBQAALIyhlRIgACggoTGcjKYv/ZomKAAEiiYoAAYj/jSNJKWNAABWAEQAPSG93ZHkgc3RyYW5nZXIhTImLAFcCAIAHSGVsbG8sIExQSRUWVwYCTFBXAgCAASFQSRUWVwYCTFBMiYoCAYv+i/+IAAcXi/8XCxaJigIBi/4Xi/8XCBaJigAAiAABiYoAACMoZUSIAAUJKExniYoAASKJ", + "clear": "CiYBB2NvdW50ZXKIAAOBAUOKAACBAChlRIgABQkoTGeJigABgQGJ" + }, + "compilerInfo": { + "compiler": "puya", + "compilerVersion": { + "major": 99, + "minor": 99, + "patch": 99 + } + } +} \ No newline at end of file diff --git a/test_cases/everything/puya.log b/test_cases/everything/puya.log index 019341b688..f60b153b3e 100644 --- a/test_cases/everything/puya.log +++ b/test_cases/everything/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['everything'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['everything'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing everything/out/module.awst debug: Sealing block@0: // L12 @@ -1911,6 +1911,7 @@ debug: Replaced _remove_sender_block@0.ops[17]: 'v-load new_state_value%0#0' wit debug: Inserted _remove_sender_block@0.ops[5]: 'l-store-copy maybe_value%0#0 1' debug: Replaced _remove_sender_block@0.ops[12]: 'v-load maybe_value%0#0' with 'l-load maybe_value%0#0' info: Writing everything/out/MyContract.arc32.json +info: Writing everything/out/MyContract.arc56.json info: Writing everything/out/MyContract.approval.teal info: Writing everything/out/MyContract.clear.teal info: Writing everything/out/MyContract.approval.bin diff --git a/test_cases/group_side_effects/out/AppCall.arc56.json b/test_cases/group_side_effects/out/AppCall.arc56.json new file mode 100644 index 0000000000..10c437a73d --- /dev/null +++ b/test_cases/group_side_effects/out/AppCall.arc56.json @@ -0,0 +1,102 @@ +{ + "arcs": [ + 22, + 28 + ], + "name": "AppCall", + "structs": {}, + "methods": [ + { + "name": "some_value", + "args": [], + "returns": { + "type": "uint64" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "events": [], + "templateVariables": {}, + "networks": {}, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 35 + ], + "errorMessage": "OnCompletion is NoOp" + }, + { + "pc": [ + 62 + ], + "errorMessage": "is creating" + }, + { + "pc": [ + 38 + ], + "errorMessage": "is not creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLmdyb3VwX3NpZGVfZWZmZWN0cy5vdGhlci5BcHBDYWxsLmFwcHJvdmFsX3Byb2dyYW06CiAgICBpbnRjYmxvY2sgMSAwCiAgICBjYWxsc3ViIF9fcHV5YV9hcmM0X3JvdXRlcl9fCiAgICByZXR1cm4KCgovLyB0ZXN0X2Nhc2VzLmdyb3VwX3NpZGVfZWZmZWN0cy5vdGhlci5BcHBDYWxsLl9fcHV5YV9hcmM0X3JvdXRlcl9fKCkgLT4gdWludDY0OgpfX3B1eWFfYXJjNF9yb3V0ZXJfXzoKICAgIC8vIGdyb3VwX3NpZGVfZWZmZWN0cy9vdGhlci5weTo0CiAgICAvLyBjbGFzcyBBcHBDYWxsKEFSQzRDb250cmFjdCk6CiAgICBwcm90byAwIDEKICAgIHR4biBOdW1BcHBBcmdzCiAgICBieiBfX3B1eWFfYXJjNF9yb3V0ZXJfX19iYXJlX3JvdXRpbmdANQogICAgcHVzaGJ5dGVzIDB4ZDM0NzllNjUgLy8gbWV0aG9kICJzb21lX3ZhbHVlKCl1aW50NjQiCiAgICB0eG5hIEFwcGxpY2F0aW9uQXJncyAwCiAgICBtYXRjaCBfX3B1eWFfYXJjNF9yb3V0ZXJfX19zb21lX3ZhbHVlX3JvdXRlQDIKICAgIGludGNfMSAvLyAwCiAgICByZXRzdWIKCl9fcHV5YV9hcmM0X3JvdXRlcl9fX3NvbWVfdmFsdWVfcm91dGVAMjoKICAgIC8vIGdyb3VwX3NpZGVfZWZmZWN0cy9vdGhlci5weTo1CiAgICAvLyBAYXJjNC5hYmltZXRob2QoKQogICAgdHhuIE9uQ29tcGxldGlvbgog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lkZV9lZmZlY3RzL290aGVyLnB5OjcKICAgIC8vIHJldHVybiBHbG9iYWwuZ3JvdXBfc2l6ZSAqIChUeG4uZ3JvdXBfaW5kZXggKyAxKQogICAgZ2xvYmFsIEdyb3VwU2l6ZQogICAgdHhuIEdyb3VwSW5kZXgKICAgIGludGNfMCAvLyAxCiAgICArCiAgICAqCiAgICByZXRzdWIK", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLmdyb3VwX3NpZGVfZWZmZWN0cy5vdGhlci5BcHBDYWxsLmNsZWFyX3N0YXRlX3Byb2dyYW06CiAgICBwdXNoaW50IDEgLy8gMQogICAgcmV0dXJuCg==" + }, + "byteCode": { + "approval": "CiACAQCIAAFDigABMRtBACWABNNHnmU2GgCOAQACI4kxGRREMRhEiAAZFoAEFR98dUxQsCKJMRlAAAYxGBREIokjiYoAATIEMRYiCAuJ", + "clear": "CoEBQw==" + }, + "compilerInfo": { + "compiler": "puya", + "compilerVersion": { + "major": 99, + "minor": 99, + "patch": 99 + } + } +} \ No newline at end of file diff --git a/test_cases/group_side_effects/out/AppExpectingEffects.arc56.json b/test_cases/group_side_effects/out/AppExpectingEffects.arc56.json new file mode 100644 index 0000000000..b25dbfde3b --- /dev/null +++ b/test_cases/group_side_effects/out/AppExpectingEffects.arc56.json @@ -0,0 +1,189 @@ +{ + "arcs": [ + 22, + 28 + ], + "name": "AppExpectingEffects", + "structs": {}, + "methods": [ + { + "name": "create_group", + "args": [ + { + "type": "acfg", + "name": "asset_create" + }, + { + "type": "appl", + "name": "app_create" + } + ], + "returns": { + "type": "(uint64,uint64)" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "log_group", + "args": [ + { + "type": "appl", + "name": "app_call" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "events": [], + "templateVariables": {}, + "networks": {}, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 197 + ], + "errorMessage": "ARC4 prefix is valid" + }, + { + "pc": [ + 51, + 94 + ], + "errorMessage": "OnCompletion is NoOp" + }, + { + "pc": [ + 149 + ], + "errorMessage": "expected app created" + }, + { + "pc": [ + 134 + ], + "errorMessage": "expected asset created" + }, + { + "pc": [ + 158 + ], + "errorMessage": "expected correct app id" + }, + { + "pc": [ + 143 + ], + "errorMessage": "expected correct asset id" + }, + { + "pc": [ + 175 + ], + "errorMessage": "expected correct method called" + }, + { + "pc": [ + 182 + ], + "errorMessage": "expected logs" + }, + { + "pc": [ + 121 + ], + "errorMessage": "is creating" + }, + { + "pc": [ + 54, + 97 + ], + "errorMessage": "is not creating" + }, + { + "pc": [ + 66 + ], + "errorMessage": "transaction type is acfg" + }, + { + "pc": [ + 76, + 107 + ], + "errorMessage": "transaction type is appl" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLmdyb3VwX3NpZGVfZWZmZWN0cy5jb250cmFjdC5BcHBFeHBlY3RpbmdFZmZlY3RzLmFwcHJvdmFsX3Byb2dyYW06CiAgICBpbnRjYmxvY2sgMSAwIDYKICAgIGJ5dGVjYmxvY2sgMHgxNTFmN2M3NQogICAgY2FsbHN1YiBfX3B1eWFfYXJjNF9yb3V0ZXJfXwogICAgcmV0dXJuCgoKLy8gdGVzdF9jYXNlcy5ncm91cF9zaWRlX2VmZmVjdHMuY29udHJhY3QuQXBwRXhwZWN0aW5nRWZmZW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X3N0YXRlX3Byb2dyYW06CiAgICBwdXNoaW50IDEgLy8gMQogICAgcmV0dXJuCg==" + }, + "byteCode": { + "approval": "CiADAQAGJgEEFR98dYgAAUOKAAExG0EAWIICBG06BDkEYqDvYjYaAI4CAAIALSOJMRkURDEYRDEWgQIJSTgQgQMSRDEWIglJOBAkEkSIAC5MFkwWUChMULAiiTEZFEQxGEQxFiIJSTgQJBJEiAAxIokxGUAABjEYFEQiiSOJigICi/44PElEi/44Fj1LARJEi/84PUlEi/84Fj1LARJEiYoBAIv/I8IagATTR55lEkSL/zg7IhJEi/84PklXBABMVwAEKBJEi/84FiIIMgQLFqhEiQ==", + "clear": "CoEBQw==" + }, + "compilerInfo": { + "compiler": "puya", + "compilerVersion": { + "major": 99, + "minor": 99, + "patch": 99 + } + } +} \ No newline at end of file diff --git a/test_cases/group_side_effects/puya.log b/test_cases/group_side_effects/puya.log index 5ec8600439..c85baab6e8 100644 --- a/test_cases/group_side_effects/puya.log +++ b/test_cases/group_side_effects/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['group_side_effects'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['group_side_effects'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing group_side_effects/out/module.awst debug: Sealing block@0: // L12 @@ -1018,6 +1018,7 @@ debug: Inserted log_group_block@0.ops[30]: 'l-store-copy tmp%4#0 1' debug: Replaced log_group_block@0.ops[64]: 'v-load tmp%4#0' with 'l-load tmp%4#0' debug: Found 3 edge set/s for test_cases.group_side_effects.contract.AppExpectingEffects.__puya_arc4_router__ info: Writing group_side_effects/out/AppCall.arc32.json +info: Writing group_side_effects/out/AppCall.arc56.json info: Writing group_side_effects/out/AppCall.approval.teal info: Writing group_side_effects/out/AppCall.clear.teal info: Writing group_side_effects/out/AppCall.approval.bin @@ -1025,6 +1026,7 @@ info: Writing group_side_effects/out/AppCall.clear.bin info: Writing group_side_effects/out/AppCall.approval.puya.map info: Writing group_side_effects/out/AppCall.clear.puya.map info: Writing group_side_effects/out/AppExpectingEffects.arc32.json +info: Writing group_side_effects/out/AppExpectingEffects.arc56.json info: Writing group_side_effects/out/AppExpectingEffects.approval.teal info: Writing group_side_effects/out/AppExpectingEffects.clear.teal info: Writing group_side_effects/out/AppExpectingEffects.approval.bin diff --git a/test_cases/inheritance/puya.log b/test_cases/inheritance/puya.log index 256ce34449..386d4086b0 100644 --- a/test_cases/inheritance/puya.log +++ b/test_cases/inheritance/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['inheritance'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['inheritance'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing inheritance/out/module.awst debug: Sealing block@0: // L12 diff --git a/test_cases/inner_transactions/out/ArrayAccessContract.arc56.json b/test_cases/inner_transactions/out/ArrayAccessContract.arc56.json new file mode 100644 index 0000000000..0c6d0034c3 --- /dev/null +++ b/test_cases/inner_transactions/out/ArrayAccessContract.arc56.json @@ -0,0 +1,127 @@ +{ + "arcs": [ + 22, + 28 + ], + "name": "ArrayAccessContract", + "structs": {}, + "methods": [ + { + "name": "test_branching_array_call", + "args": [ + { + "type": "bool", + "name": "maybe" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "events": [], + "templateVariables": {}, + "networks": {}, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 48 + ], + "errorMessage": "OnCompletion is NoOp" + }, + { + "pc": [ + 169, + 184 + ], + "errorMessage": "correct args used 1" + }, + { + "pc": [ + 175, + 192 + ], + "errorMessage": "correct args used 2" + }, + { + "pc": [ + 200 + ], + "errorMessage": "correct args used 3" + }, + { + "pc": [ + 68 + ], + "errorMessage": "is creating" + }, + { + "pc": [ + 51 + ], + "errorMessage": "is not creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLmlubmVyX3RyYW5zYWN0aW9ucy5hcnJheV9hY2Nlc3MuQXJyYXlBY2Nlc3NDb250cmFjdC5hcHByb3ZhbF9wcm9ncmFtOgogICAgaW50Y2Jsb2NrIDAgMSA2CiAgICBieXRlY2Jsb2NrIDB4MDk4MTAxIDB4MzEgMHgzMiAweDMzCiAgICBjYWxsc3ViIF9fcHV5Y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QiLCAiY29ycmVjdCBhcmdzIHVzZWQgMiIKICAgIGl0eG5hIEFwcGxpY2F0aW9uQXJncyAxCiAgICBwdXNoYnl0ZXMgMHgzNAogICAgPT0KICAgIGFzc2VydCAvLyBjb3JyZWN0IGFyZ3MgdXNlZCAyCiAgICAvLyBpbm5lcl90cmFuc2FjdGlvbnMvYXJyYXlfYWNjZXNzLnB5OjQyCiAgICAvLyBhc3NlcnQgY3JlYXRlX2FwcF90eG4uYXBwX2FyZ3MoMikgPT0gYiI1IiwgImNvcnJlY3QgYXJncyB1c2VkIDMiCiAgICBpdHhuYSBBcHBsaWNhdGlvbkFyZ3MgMgogICAgcHVzaGJ5dGVzIDB4MzUKICAgID09CiAgICBhc3NlcnQgLy8gY29ycmVjdCBhcmdzIHVzZWQgMwoKdGVzdF9icmFuY2hpbmdfYXJyYXlfY2FsbF9hZnRlcl9pZl9lbHNlQDg6CiAgICByZXRzdWIK", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLmlubmVyX3RyYW5zYWN0aW9ucy5hcnJheV9hY2Nlc3MuQXJyYXlBY2Nlc3NDb250cmFjdC5jbGVhcl9zdGF0ZV9wcm9ncmFtOgogICAgcHVzaGludCAxIC8vIDEKICAgIHJldHVybgo=" + }, + "byteCode": { + "approval": "CiADAAEGJgQDCYEBATEBMgEziAABQ4oAATEbQQAegASJqCIKNhoAjgEAAiKJMRkURDEYRDYaAYgADyOJMRlAAAYxGBREI4kiiYoBAIv/gAEAE0lBABexKbIaKrIaKLJCKLJAJLIQIrIBs0IAMrGAE2RpZmZlcmVudCBwYXJhbSBzZXSyBSuyGoABNLIagAE1shooskIoskAkshAisgGziwBBAA+1GgApEkS1GgEqEkRCABa1GgArEkS1GgGAATQSRLUaAoABNRJEiQ==", + "clear": "CoEBQw==" + }, + "compilerInfo": { + "compiler": "puya", + "compilerVersion": { + "major": 99, + "minor": 99, + "patch": 99 + } + } +} \ No newline at end of file diff --git a/test_cases/inner_transactions/out/CreateAndTransferContract.arc56.json b/test_cases/inner_transactions/out/CreateAndTransferContract.arc56.json new file mode 100644 index 0000000000..769f63f5c5 --- /dev/null +++ b/test_cases/inner_transactions/out/CreateAndTransferContract.arc56.json @@ -0,0 +1,108 @@ +{ + "arcs": [ + 22, + 28 + ], + "name": "CreateAndTransferContract", + "structs": {}, + "methods": [ + { + "name": "create_and_transfer", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "events": [], + "templateVariables": {}, + "networks": {}, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 37 + ], + "errorMessage": "OnCompletion is NoOp" + }, + { + "pc": [ + 105 + ], + "errorMessage": "asset exists" + }, + { + "pc": [ + 54 + ], + "errorMessage": "is creating" + }, + { + "pc": [ + 40 + ], + "errorMessage": "is not creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLmlubmVyX3RyYW5zYWN0aW9ucy5hc3NldF90cmFuc2Zlci5DcmVhdGVBbmRUcmFuc2ZlckNvbnRyYWN0LmFwcHJvdmFsX3Byb2dyYW06CiAgICBpbnRjYmxvY2sgMCAxIDEwMDAKICAgIGNhbGxzdWIgX19wdXlhX2FyYzRfcm91dGVyX18KICAgIHJldHVybgoKCi8vIHRlc3RfY2FzZXMuaW5uZXJfdHJhbnNhY3Rpb25zLmFzc2V0X3RyYW5zZmVyLkNyZWF0ZUFuZFRyYW5zZmVyQ29udHJhY3Qu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EAG4AESOntfDYaAI4BAAIiiTEZFEQxGESIAA8jiTEZQAAGMRgURCOJIomKAACxMgpJsiyyKSKyI4ADVFNUsiWABHRlc3SyJiSyIoEDshAisgGztDyxSXELRDIKTwKyESSyErIUshOBBLIQIrIBs4k=", + "clear": "CoEBQw==" + }, + "compilerInfo": { + "compiler": "puya", + "compilerVersion": { + "major": 99, + "minor": 99, + "patch": 99 + } + } +} \ No newline at end of file diff --git a/test_cases/inner_transactions/out/FieldTupleContract.arc56.json b/test_cases/inner_transactions/out/FieldTupleContract.arc56.json new file mode 100644 index 0000000000..dcea2e0518 --- /dev/null +++ b/test_cases/inner_transactions/out/FieldTupleContract.arc56.json @@ -0,0 +1,120 @@ +{ + "arcs": [ + 22, + 28 + ], + "name": "FieldTupleContract", + "structs": {}, + "methods": [ + { + "name": "test_assign_tuple", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "test_assign_tuple_mixed", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "events": [], + "templateVariables": {}, + "networks": {}, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 128, + 140 + ], + "errorMessage": "OnCompletion is NoOp" + }, + { + "pc": [ + 157 + ], + "errorMessage": "is creating" + }, + { + "pc": [ + 131, + 143 + ], + "errorMessage": "is not creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uID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ZF90dXBsZV9hc3NpZ25tZW50LkZpZWxkVHVwbGVDb250cmFjdC5jbGVhcl9zdGF0ZV9wcm9ncmFtOgogICAgcHVzaGludCAxIC8vIDEKICAgIHJldHVybgo=" + }, + "byteCode": { + "approval": "CiAEAAUGASYTAwmBAQIxYQIyYRNkaWZmZXJlbnQgcGFyYW0gc2V0BWhlbGxvBXdvcmxkAjNhAjRhAjVhAjNiAjRiAjViAjFiAjJiAjFjAjJjAjNjAjRjAjVjiAABQ4oAATEbQQAvggIEHKLAfgTsbNCoNhoAjgIAAgAOIokxGRREMRhEiAAbJYkxGRREMRhEiAFmJYkxGUAABjEYFEQliSKJigAAgSoWJRaxKbIaKrIaJwSyGicFshqAASGyGksBshqyGiOyGSiyQiiyQCSyECKyAbYrsgUnBrIaJweyGicIshojshkoskIoskAkshAisgGzuAAaACkSRLgAGgEqEkS4ABoCJwQSRLgAGgMnBRJEuAAaBIABIRJEuAAaBRJEuAAaBiUWEkS1GgAnBhJEtRoBJwcSRLUaAicIEkSxK7IFJwmyGicKshonC7IaI7IZKLJCKLJAJLIQIrIBticMshonDbIaI7IZKLJCKLJAJLIQIrIBs7UaACcMEkS1GgEnDRJEuAAaACcJEkS4ABoBJwoSRLgAGgInCxJEsScOshonD7IaI7IZKLJCKLJAJLIQIrIBtiuyBScQshonEbIaJxKyGiOyGSiyQiiyQCSyECKyAbO4ABoAJw4SRLgAGgEnDxJEtRoAJxASRLUaAScREkS1GgInEhJEiYoAALEpshoqshojshkoskIoskAkshAisgGztRoAKRJEtRoBKhJEiQ==", + "clear": "CoEBQw==" + }, + "compilerInfo": { + "compiler": "puya", + "compilerVersion": { + "major": 99, + "minor": 99, + "patch": 99 + } + } +} \ No newline at end of file diff --git a/test_cases/inner_transactions/out/Greeter.arc56.json b/test_cases/inner_transactions/out/Greeter.arc56.json new file mode 100644 index 0000000000..19b108c927 --- /dev/null +++ b/test_cases/inner_transactions/out/Greeter.arc56.json @@ -0,0 +1,151 @@ +{ + "arcs": [ + 22, + 28 + ], + "name": "Greeter", + "structs": {}, + "methods": [ + { + "name": "bootstrap", + "args": [], + "returns": { + "type": "uint64" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "log_greetings", + "args": [ + { + "type": "string", + "name": "name" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "state": { + "schema": { + "global": { + "ints": 1, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": { + "hello_app": { + "keyType": "AVMString", + "valueType": "AVMUint64", + "key": "aGVsbG9fYXBw" + } + }, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "events": [], + "templateVariables": {}, + "networks": {}, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 274 + ], + "errorMessage": "ARC4 prefix is valid" + }, + { + "pc": [ + 69, + 86 + ], + "errorMessage": "OnCompletion is NoOp" + }, + { + "pc": [ + 119 + ], + "errorMessage": "already bootstrapped" + }, + { + "pc": [ + 117, + 231, + 240 + ], + "errorMessage": "check self.hello_app exists" + }, + { + "pc": [ + 106 + ], + "errorMessage": "is creating" + }, + { + "pc": [ + 72, + 89 + ], + "errorMessage": "is not creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLmlubmVyX3RyYW5zYWN0aW9ucy5jMmMuR3JlZXRlci5hcHByb3ZhbF9wcm9ncmFtOgogICAgaW50Y2Jsb2NrIDAgMSA2CiAgICBieXRlY2Jsb2NrICJoZWxsb19hcHAiIDB4MTUxZjdjNzUKICAgIHR4biBBcHBsaWNhdGlvbklECiAgICBibnog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vV29ybGQgcmV0dXJuZWQ6IExQsImKAAAoImeJ", + "clear": "CoEBQw==" + }, + "compilerInfo": { + "compiler": "puya", + "compilerVersion": { + "major": 99, + "minor": 99, + "patch": 99 + } + } +} \ No newline at end of file diff --git a/test_cases/inner_transactions/puya.log b/test_cases/inner_transactions/puya.log index 51486dacae..e06fe3b5de 100644 --- a/test_cases/inner_transactions/puya.log +++ b/test_cases/inner_transactions/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['inner_transactions'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['inner_transactions'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing inner_transactions/out/module.awst debug: Sealing block@0: // L12 @@ -7682,6 +7682,7 @@ info: Writing inner_transactions/out/itxn_loop.clear.bin info: Writing inner_transactions/out/itxn_loop.approval.puya.map info: Writing inner_transactions/out/itxn_loop.clear.puya.map info: Writing inner_transactions/out/FieldTupleContract.arc32.json +info: Writing inner_transactions/out/FieldTupleContract.arc56.json info: Writing inner_transactions/out/FieldTupleContract.approval.teal info: Writing inner_transactions/out/FieldTupleContract.clear.teal info: Writing inner_transactions/out/FieldTupleContract.approval.bin @@ -7695,6 +7696,7 @@ info: Writing inner_transactions/out/MyContract.clear.bin info: Writing inner_transactions/out/MyContract.approval.puya.map info: Writing inner_transactions/out/MyContract.clear.puya.map info: Writing inner_transactions/out/Greeter.arc32.json +info: Writing inner_transactions/out/Greeter.arc56.json info: Writing inner_transactions/out/Greeter.approval.teal info: Writing inner_transactions/out/Greeter.clear.teal info: Writing inner_transactions/out/Greeter.approval.bin @@ -7702,6 +7704,7 @@ info: Writing inner_transactions/out/Greeter.clear.bin info: Writing inner_transactions/out/Greeter.approval.puya.map info: Writing inner_transactions/out/Greeter.clear.puya.map info: Writing inner_transactions/out/CreateAndTransferContract.arc32.json +info: Writing inner_transactions/out/CreateAndTransferContract.arc56.json info: Writing inner_transactions/out/CreateAndTransferContract.approval.teal info: Writing inner_transactions/out/CreateAndTransferContract.clear.teal info: Writing inner_transactions/out/CreateAndTransferContract.approval.bin @@ -7709,6 +7712,7 @@ info: Writing inner_transactions/out/CreateAndTransferContract.clear.bin info: Writing inner_transactions/out/CreateAndTransferContract.approval.puya.map info: Writing inner_transactions/out/CreateAndTransferContract.clear.puya.map info: Writing inner_transactions/out/ArrayAccessContract.arc32.json +info: Writing inner_transactions/out/ArrayAccessContract.arc56.json info: Writing inner_transactions/out/ArrayAccessContract.approval.teal info: Writing inner_transactions/out/ArrayAccessContract.clear.teal info: Writing inner_transactions/out/ArrayAccessContract.approval.bin diff --git a/test_cases/inner_transactions_assignment/out/Contract.arc56.json b/test_cases/inner_transactions_assignment/out/Contract.arc56.json new file mode 100644 index 0000000000..999aadfce3 --- /dev/null +++ b/test_cases/inner_transactions_assignment/out/Contract.arc56.json @@ -0,0 +1,120 @@ +{ + "arcs": [ + 22, + 28 + ], + "name": "Contract", + "structs": {}, + "methods": [ + { + "name": "test_itxn_slice", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "test_itxn_nested", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "events": [], + "templateVariables": {}, + "networks": {}, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 112, + 124 + ], + "errorMessage": "OnCompletion is NoOp" + }, + { + "pc": [ + 141 + ], + "errorMessage": "is creating" + }, + { + "pc": [ + 115, + 127 + ], + "errorMessage": "is not creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLmlubmVyX3RyYW5zYWN0aW9uc19hc3NpZ25tZW50LmNvbnRyYWN0LkNvbnRyYWN0LmFwcHJvdmFsX3Byb2dyYW06CiAgICBpbnRjYmxvY2sgMCAxIDMKICAgIGJ5dGVjYmxvY2sgMHg2MTYzNjY2NyAweDcwNjE3OTMyICJwYXkxIiAiVEVTVCIgIlRTVCIgInBheTMiIDB4Njg2OSAweDc0Njg2NTcyNjUgMHg2ZDYxNzk2MjY1IDB4Njg2OTMyIDB4NjE2MzY2NjczMiAweDcwNjE3OTM1IDB4NzQ2ODY1NzI2NTMyCiAgICBjYWxsc3ViIF9fcHV5YV9hcmM0X3JvdXRlcl9fCiAgICByZXR1cm4KCgovLyB0ZXN0X2Nhc2VzLmlubmVyX3RyYW5zYWN0aW9uc19hc3NpZ25tZW50LmNvbnRyYWN0LkNvbnRyYWN0Ll9fcHV5YV9hcmM0X3JvdXRlcl9fKCkgLT4gdWludDY0OgpfX3B1eWFfYXJjNF9yb3V0ZXJfXzoKICAgIC8vIGlubmVyX3RyYW5zYWN0aW9uc19hc3NpZ25tZW50L2NvbnRyYWN0LnB5OjExCiAgICAvLyBjbGFzcyBDb250cmFjdChBUkM0Q29udHJhY3QpOgogICAgcHJvdG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5MwJoaQV0aGVyZQVtYXliZQNoaTIFYWNmZzIEcGF5NQZ0aGVyZTKIAAFDigABMRtBAC+CAgTkbZAZBPiDhT42GgCOAgACAA4iiTEZFEQxGESIABsjiTEZFEQxGESIAGYjiTEZQAAGMRgURCOJIomKAAAxALEqsgUisghJsgcjshAisgG2I7IiKLIFK7ImJwSyJSSyECKyAbYjshAisghJsgcpsgUisgG2I7IQIrIIsgcnBbIFIrIBs7cCBbcBBSgSRCkSRImKAAAxAEknBogA4UlPArEqsgUisghJsgcjshAisgG2I7IiKLIFK7ImJwSyJSSyECKyAbYjshAisghJsgcpsgUisgG2I7IQIrIIsgcnBbIFIrIBsycHiACUSU4CtwEFSU4DtwIFSU4CTgRPAycGEkQoEkQpEkQnBxJEJwiIAG4nCBJBAE8nCYgAY4wBsSqyBSKyCIsASbIHI7IQIrIBtiOyIicKsgUrsiYnBLIlJLIQIrIBtiOyECKyCLIHJwuyBSKyAbMnDIgAJIwCtwEFjAO0BYwEiwEnCRJEiwMnChJEiwQnCxJEiwInDBJEiYoBAYv/iQ==", + "clear": "CoEBQw==" + }, + "compilerInfo": { + "compiler": "puya", + "compilerVersion": { + "major": 99, + "minor": 99, + "patch": 99 + } + } +} \ No newline at end of file diff --git a/test_cases/inner_transactions_assignment/puya.log b/test_cases/inner_transactions_assignment/puya.log index a9fc6cf34d..3b9580e46b 100644 --- a/test_cases/inner_transactions_assignment/puya.log +++ b/test_cases/inner_transactions_assignment/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['inner_transactions_assignment'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['inner_transactions_assignment'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing inner_transactions_assignment/out/module.awst debug: Sealing block@0: // L12 @@ -3230,6 +3230,7 @@ debug: Found 1 edge set/s for test_cases.inner_transactions_assignment.contract. debug: test_cases.inner_transactions_assignment.contract.Contract.test_itxn_nested f-stack entry: [] debug: test_cases.inner_transactions_assignment.contract.Contract.test_itxn_nested f-stack on first store: ['pay1%%param_Receiver_idx_0#0', 'nested_tuple.0#0', 'nested_tuple.2#0', 'nested_tuple.1.0.Note#0', 'nested_tuple.1.1.Note#0'] info: Writing inner_transactions_assignment/out/Contract.arc32.json +info: Writing inner_transactions_assignment/out/Contract.arc56.json info: Writing inner_transactions_assignment/out/Contract.approval.teal info: Writing inner_transactions_assignment/out/Contract.clear.teal info: Writing inner_transactions_assignment/out/Contract.approval.bin diff --git a/test_cases/intrinsics/puya.log b/test_cases/intrinsics/puya.log index 2cdd7012f0..1908e838d6 100644 --- a/test_cases/intrinsics/puya.log +++ b/test_cases/intrinsics/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['intrinsics'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['intrinsics'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing intrinsics/out/module.awst debug: Sealing block@0: // L12 diff --git a/test_cases/iteration/puya.log b/test_cases/iteration/puya.log index 24880d549f..093bc1fd77 100644 --- a/test_cases/iteration/puya.log +++ b/test_cases/iteration/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['iteration'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['iteration'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv iteration/base.py:38 debug: skipping trivial method test_forwards iteration/base.py:42 debug: skipping trivial method test_reversed diff --git a/test_cases/koopman/puya.log b/test_cases/koopman/puya.log index db4bb5f1c7..78783cfe59 100644 --- a/test_cases/koopman/puya.log +++ b/test_cases/koopman/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['koopman'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['koopman'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing koopman/out/module.awst debug: Sealing block@0: // L12 diff --git a/test_cases/less_simple/puya.log b/test_cases/less_simple/puya.log index 35f71890db..a1f9f054dd 100644 --- a/test_cases/less_simple/puya.log +++ b/test_cases/less_simple/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['less_simple'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['less_simple'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing less_simple/out/module.awst debug: Sealing block@0: // L12 diff --git a/test_cases/literals/puya.log b/test_cases/literals/puya.log index 911c5c50ac..a5103ed954 100644 --- a/test_cases/literals/puya.log +++ b/test_cases/literals/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['literals'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['literals'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv literals/folding.py:7:12 warning: expression is always True literals/folding.py:8:17 warning: expression is always False diff --git a/test_cases/log/puya.log b/test_cases/log/puya.log index 560272982f..723863218a 100644 --- a/test_cases/log/puya.log +++ b/test_cases/log/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['log'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['log'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing log/out/module.awst debug: Sealing block@0: // L12 diff --git a/test_cases/logic_signature/puya.log b/test_cases/logic_signature/puya.log index f5dbd81d9b..511520faa1 100644 --- a/test_cases/logic_signature/puya.log +++ b/test_cases/logic_signature/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={'SELLER': b'/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00', 'PRICE': 1, 'ASSET_ID': 1}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['logic_signature'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={'SELLER': b'/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00/x00', 'PRICE': 1, 'ASSET_ID': 1}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['logic_signature'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing logic_signature/out/module.awst debug: Sealing block@0: // L12 diff --git a/test_cases/loop_else/puya.log b/test_cases/loop_else/puya.log index 12f0e526e4..a614bd5e77 100644 --- a/test_cases/loop_else/puya.log +++ b/test_cases/loop_else/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['loop_else'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['loop_else'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing loop_else/out/module.awst debug: Sealing block@0: // L12 diff --git a/test_cases/match/puya.log b/test_cases/match/puya.log index 8ae34d5ec5..25a8a3a9c5 100644 --- a/test_cases/match/puya.log +++ b/test_cases/match/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['match'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['match'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing match/out/module.awst debug: Sealing block@0: // L12 diff --git a/test_cases/module_consts/puya.log b/test_cases/module_consts/puya.log index 9af10efda9..eb0592a113 100644 --- a/test_cases/module_consts/puya.log +++ b/test_cases/module_consts/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['module_consts'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['module_consts'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing module_consts/out/module.awst debug: Sealing block@0: // L12 diff --git a/test_cases/mylib/puya.log b/test_cases/mylib/puya.log index cbd61061ba..f7b44a6434 100644 --- a/test_cases/mylib/puya.log +++ b/test_cases/mylib/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['mylib'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['mylib'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing mylib/out/module.awst debug: Sealing block@0: // L12 diff --git a/test_cases/named_tuples/contract.py b/test_cases/named_tuples/contract.py index 19c6e5f184..ecc5866a76 100644 --- a/test_cases/named_tuples/contract.py +++ b/test_cases/named_tuples/contract.py @@ -4,6 +4,8 @@ class TestTuple(typing.NamedTuple): + """This is a test tuple""" + a: UInt64 b: BigUInt c: String diff --git a/test_cases/named_tuples/out/NamedTuplesContract.approval.mir b/test_cases/named_tuples/out/NamedTuplesContract.approval.mir index e80354c5cf..99add82b40 100644 --- a/test_cases/named_tuples/out/NamedTuplesContract.approval.mir +++ b/test_cases/named_tuples/out/NamedTuplesContract.approval.mir @@ -7,19 +7,19 @@ main_block@0: // test_cases.named_tuples.contract.NamedTuplesContract.__puya_arc4_router__() -> uint64: __puya_arc4_router__: - // named_tuples/contract.py:13 + // named_tuples/contract.py:15 // class NamedTuplesContract(arc4.ARC4Contract): proto 0 1 __puya_arc4_router___block@0: - // named_tuples/contract.py:13 + // named_tuples/contract.py:15 // class NamedTuplesContract(arc4.ARC4Contract): txn NumAppArgs tmp%0#0 bz __puya_arc4_router___bare_routing@6 // Implicit fall through to __puya_arc4_router___abi_routing@1 __puya_arc4_router___abi_routing@1: - // named_tuples/contract.py:13 + // named_tuples/contract.py:15 // class NamedTuplesContract(arc4.ARC4Contract): txna ApplicationArgs 0 tmp%2#0 method build_tuple(uint64,uint512,string,byte[])(uint64,uint512,string,byte[]) tmp%2#0,Method(build_tuple(uint64,uint512,string,byte[])(uint64,uint512,string,byte[])) @@ -30,14 +30,14 @@ __puya_arc4_router___abi_routing@1: retsub 0 __puya_arc4_router___build_tuple_route@2: - // named_tuples/contract.py:15 + // named_tuples/contract.py:17 // @arc4.abimethod() txn OnCompletion tmp%3#0 ! tmp%4#0 assert // OnCompletion is NoOp txn ApplicationID tmp%5#0 assert // is not creating - // named_tuples/contract.py:13 + // named_tuples/contract.py:15 // class NamedTuplesContract(arc4.ARC4Contract): txna ApplicationArgs 1 tmp%7#0 btoi tmp%8#0 @@ -46,7 +46,7 @@ __puya_arc4_router___build_tuple_route@2: extract 2 0 tmp%8#0,tmp%9#0,tmp%11#0 txna ApplicationArgs 4 tmp%8#0,tmp%9#0,tmp%11#0,tmp%12#0 extract 2 0 tmp%8#0,tmp%9#0,tmp%11#0,tmp%13#0 - // named_tuples/contract.py:15 + // named_tuples/contract.py:17 // @arc4.abimethod() l-load tmp%8#0 3 tmp%9#0,tmp%11#0,tmp%13#0,tmp%8#0 l-load tmp%9#0 3 tmp%11#0,tmp%13#0,tmp%8#0,tmp%9#0 @@ -104,14 +104,14 @@ __puya_arc4_router___build_tuple_route@2: retsub 1 __puya_arc4_router___test_tuple_route@3: - // named_tuples/contract.py:30 + // named_tuples/contract.py:32 // @arc4.abimethod() txn OnCompletion tmp%15#0 ! tmp%16#0 assert // OnCompletion is NoOp txn ApplicationID tmp%17#0 assert // is not creating - // named_tuples/contract.py:13 + // named_tuples/contract.py:15 // class NamedTuplesContract(arc4.ARC4Contract): txna ApplicationArgs 1 tmp%19#0 l-load-copy tmp%19#0 0 tmp%19#0,tmp%19#0 (copy) @@ -137,7 +137,7 @@ __puya_arc4_router___test_tuple_route@3: l-load item_end_offset%1#0 2 item0%0%0#0,item1%0#0,item2%0%0#0,tmp%19#0,item_end_offset%0#0,item_end_offset%1#0 substring3 item0%0%0#0,item1%0#0,item2%0%0#0,item3%0#0 extract 2 0 item0%0%0#0,item1%0#0,item2%0%0#0,item3%0%0#0 - // named_tuples/contract.py:30 + // named_tuples/contract.py:32 // @arc4.abimethod() l-load item0%0%0#0 3 item1%0#0,item2%0%0#0,item3%0%0#0,item0%0%0#0 l-load item1%0#0 3 item2%0%0#0,item3%0%0#0,item0%0%0#0,item1%0#0 @@ -148,14 +148,14 @@ __puya_arc4_router___test_tuple_route@3: retsub 1 __puya_arc4_router___bare_routing@6: - // named_tuples/contract.py:13 + // named_tuples/contract.py:15 // class NamedTuplesContract(arc4.ARC4Contract): txn OnCompletion tmp%20#0 bnz __puya_arc4_router___after_if_else@10 // Implicit fall through to __puya_arc4_router_____algopy_default_create@7 __puya_arc4_router_____algopy_default_create@7: - // named_tuples/contract.py:13 + // named_tuples/contract.py:15 // class NamedTuplesContract(arc4.ARC4Contract): txn ApplicationID tmp%21#0 ! tmp%22#0 @@ -164,7 +164,7 @@ __puya_arc4_router_____algopy_default_create@7: retsub 1 __puya_arc4_router___after_if_else@10: - // named_tuples/contract.py:13 + // named_tuples/contract.py:15 // class NamedTuplesContract(arc4.ARC4Contract): int 0 0 retsub 0 @@ -172,27 +172,27 @@ __puya_arc4_router___after_if_else@10: // test_cases.named_tuples.contract.NamedTuplesContract.build_tuple(a: uint64, b: bytes, c: bytes, d: bytes) -> uint64, bytes, bytes, bytes: build_tuple: (𝕡) a#0,b#0,c#0,d#0 | - // named_tuples/contract.py:15-16 + // named_tuples/contract.py:17-18 // @arc4.abimethod() // def build_tuple(self, a: UInt64, b: BigUInt, c: String, d: Bytes) -> TestTuple: proto 4 4 (𝕡) a#0,b#0,c#0,d#0 | build_tuple_block@0: (𝕡) a#0,b#0,c#0,d#0 | - // named_tuples/contract.py:17 + // named_tuples/contract.py:19 // t1 = self.build_tuple_by_name(a, b, c, d) p-load a#0 (𝕡) a#0,b#0,c#0,d#0 | a#0 (copy) p-load b#0 (𝕡) a#0,b#0,c#0,d#0 | a#0 (copy),b#0 (copy) p-load c#0 (𝕡) a#0,b#0,c#0,d#0 | a#0 (copy),b#0 (copy),c#0 (copy) p-load d#0 (𝕡) a#0,b#0,c#0,d#0 | a#0 (copy),b#0 (copy),c#0 (copy),d#0 (copy) callsub build_tuple_by_name (𝕡) a#0,b#0,c#0,d#0 | t1.a#0,t1.b#0,t1.c#0,t1.d#0 - // named_tuples/contract.py:18 + // named_tuples/contract.py:20 // t2 = self.build_tuple_by_position(a, b, c, d) p-load a#0 (𝕡) a#0,b#0,c#0,d#0 | t1.a#0,t1.b#0,t1.c#0,t1.d#0,a#0 (copy) p-load b#0 (𝕡) a#0,b#0,c#0,d#0 | t1.a#0,t1.b#0,t1.c#0,t1.d#0,a#0 (copy),b#0 (copy) p-load c#0 (𝕡) a#0,b#0,c#0,d#0 | t1.a#0,t1.b#0,t1.c#0,t1.d#0,a#0 (copy),b#0 (copy),c#0 (copy) p-load d#0 (𝕡) a#0,b#0,c#0,d#0 | t1.a#0,t1.b#0,t1.c#0,t1.d#0,a#0 (copy),b#0 (copy),c#0 (copy),d#0 (copy) callsub build_tuple_by_position (𝕡) a#0,b#0,c#0,d#0 | t1.a#0,t1.b#0,t1.c#0,t1.d#0,t2.a#0,t2.b#0,t2.c#0,t2.d#0 - // named_tuples/contract.py:19 + // named_tuples/contract.py:21 // assert t1 == t2 l-load-copy t1.a#0 7 (𝕡) a#0,b#0,c#0,d#0 | t1.a#0,t1.b#0,t1.c#0,t1.d#0,t2.a#0,t2.b#0,t2.c#0,t2.d#0,t1.a#0 (copy) l-load t2.a#0 4 (𝕡) a#0,b#0,c#0,d#0 | t1.a#0,t1.b#0,t1.c#0,t1.d#0,t2.b#0,t2.c#0,t2.d#0,t1.a#0 (copy),t2.a#0 @@ -216,7 +216,7 @@ build_tuple_block@0: l-load tmp%5#0 1 (𝕡) a#0,b#0,c#0,d#0 | t1.a#0,t1.b#0,t1.c#0,t1.d#0,tmp%4#0,tmp%5#0 && (𝕡) a#0,b#0,c#0,d#0 | t1.a#0,t1.b#0,t1.c#0,t1.d#0,tmp%6#0 assert (𝕡) a#0,b#0,c#0,d#0 | t1.a#0,t1.b#0,t1.c#0,t1.d#0 - // named_tuples/contract.py:20 + // named_tuples/contract.py:22 // return t1 l-load t1.a#0 3 (𝕡) a#0,b#0,c#0,d#0 | t1.b#0,t1.c#0,t1.d#0,t1.a#0 l-load t1.b#0 3 (𝕡) a#0,b#0,c#0,d#0 | t1.c#0,t1.d#0,t1.a#0,t1.b#0 @@ -227,13 +227,13 @@ build_tuple_block@0: // test_cases.named_tuples.contract.NamedTuplesContract.build_tuple_by_name(a: uint64, b: bytes, c: bytes, d: bytes) -> uint64, bytes, bytes, bytes: build_tuple_by_name: (𝕡) a#0,b#0,c#0,d#0 | - // named_tuples/contract.py:22-23 + // named_tuples/contract.py:24-25 // @subroutine // def build_tuple_by_name(self, a: UInt64, b: BigUInt, c: String, d: Bytes) -> TestTuple: proto 4 4 (𝕡) a#0,b#0,c#0,d#0 | build_tuple_by_name_block@0: (𝕡) a#0,b#0,c#0,d#0 | - // named_tuples/contract.py:24 + // named_tuples/contract.py:26 // return TestTuple(a=a, b=b, c=c, d=d) p-load a#0 (𝕡) a#0,b#0,c#0,d#0 | a#0 (copy) p-load b#0 (𝕡) a#0,b#0,c#0,d#0 | a#0 (copy),b#0 (copy) @@ -244,13 +244,13 @@ build_tuple_by_name_block@0: // test_cases.named_tuples.contract.NamedTuplesContract.build_tuple_by_position(a: uint64, b: bytes, c: bytes, d: bytes) -> uint64, bytes, bytes, bytes: build_tuple_by_position: (𝕡) a#0,b#0,c#0,d#0 | - // named_tuples/contract.py:26-27 + // named_tuples/contract.py:28-29 // @subroutine // def build_tuple_by_position(self, a: UInt64, b: BigUInt, c: String, d: Bytes) -> TestTuple: proto 4 4 (𝕡) a#0,b#0,c#0,d#0 | build_tuple_by_position_block@0: (𝕡) a#0,b#0,c#0,d#0 | - // named_tuples/contract.py:28 + // named_tuples/contract.py:30 // return TestTuple(a, b, c, d) p-load a#0 (𝕡) a#0,b#0,c#0,d#0 | a#0 (copy) p-load b#0 (𝕡) a#0,b#0,c#0,d#0 | a#0 (copy),b#0 (copy) @@ -261,32 +261,32 @@ build_tuple_by_position_block@0: // test_cases.named_tuples.contract.NamedTuplesContract.test_tuple(value.a: uint64, value.b: bytes, value.c: bytes, value.d: bytes) -> void: test_tuple: (𝕡) value.a#0,value.b#0,value.c#0,value.d#0 | - // named_tuples/contract.py:30-31 + // named_tuples/contract.py:32-33 // @arc4.abimethod() // def test_tuple(self, value: TestTuple) -> None: proto 4 0 (𝕡) value.a#0,value.b#0,value.c#0,value.d#0 | test_tuple_block@0: (𝕡) value.a#0,value.b#0,value.c#0,value.d#0 | - // named_tuples/contract.py:32 + // named_tuples/contract.py:34 // assert value.a < 1000 p-load value.a#0 (𝕡) value.a#0,value.b#0,value.c#0,value.d#0 | value.a#0 (copy) int 1000 (𝕡) value.a#0,value.b#0,value.c#0,value.d#0 | value.a#0 (copy),1000 < (𝕡) value.a#0,value.b#0,value.c#0,value.d#0 | tmp%0#0 assert (𝕡) value.a#0,value.b#0,value.c#0,value.d#0 | - // named_tuples/contract.py:33 + // named_tuples/contract.py:35 // assert value.b < 2**65 p-load value.b#0 (𝕡) value.a#0,value.b#0,value.c#0,value.d#0 | value.b#0 (copy) byte 0x020000000000000000 (𝕡) value.a#0,value.b#0,value.c#0,value.d#0 | value.b#0 (copy),0x020000000000000000 b< (𝕡) value.a#0,value.b#0,value.c#0,value.d#0 | tmp%1#0 assert (𝕡) value.a#0,value.b#0,value.c#0,value.d#0 | - // named_tuples/contract.py:34 + // named_tuples/contract.py:36 // assert value.c.bytes.length > 1 p-load value.c#0 (𝕡) value.a#0,value.b#0,value.c#0,value.d#0 | value.c#0 (copy) len (𝕡) value.a#0,value.b#0,value.c#0,value.d#0 | tmp%2#0 int 1 (𝕡) value.a#0,value.b#0,value.c#0,value.d#0 | tmp%2#0,1 > (𝕡) value.a#0,value.b#0,value.c#0,value.d#0 | tmp%3#0 assert (𝕡) value.a#0,value.b#0,value.c#0,value.d#0 | - // named_tuples/contract.py:35 + // named_tuples/contract.py:37 // assert value.d == Txn.sender.bytes txn Sender (𝕡) value.a#0,value.b#0,value.c#0,value.d#0 | tmp%4#0 p-load value.d#0 (𝕡) value.a#0,value.b#0,value.c#0,value.d#0 | tmp%4#0,value.d#0 (copy) diff --git a/test_cases/named_tuples/out/NamedTuplesContract.approval.teal b/test_cases/named_tuples/out/NamedTuplesContract.approval.teal index 0d2c380ae3..e271d42948 100644 --- a/test_cases/named_tuples/out/NamedTuplesContract.approval.teal +++ b/test_cases/named_tuples/out/NamedTuplesContract.approval.teal @@ -8,7 +8,7 @@ test_cases.named_tuples.contract.NamedTuplesContract.approval_program: // test_cases.named_tuples.contract.NamedTuplesContract.__puya_arc4_router__() -> uint64: __puya_arc4_router__: - // named_tuples/contract.py:13 + // named_tuples/contract.py:15 // class NamedTuplesContract(arc4.ARC4Contract): proto 0 1 txn NumAppArgs @@ -20,14 +20,14 @@ __puya_arc4_router__: retsub __puya_arc4_router___build_tuple_route@2: - // named_tuples/contract.py:15 + // named_tuples/contract.py:17 // @arc4.abimethod() txn OnCompletion ! assert // OnCompletion is NoOp txn ApplicationID assert // is not creating - // named_tuples/contract.py:13 + // named_tuples/contract.py:15 // class NamedTuplesContract(arc4.ARC4Contract): txna ApplicationArgs 1 btoi @@ -36,7 +36,7 @@ __puya_arc4_router___build_tuple_route@2: extract 2 0 txna ApplicationArgs 4 extract 2 0 - // named_tuples/contract.py:15 + // named_tuples/contract.py:17 // @arc4.abimethod() callsub build_tuple uncover 3 @@ -86,14 +86,14 @@ __puya_arc4_router___build_tuple_route@2: retsub __puya_arc4_router___test_tuple_route@3: - // named_tuples/contract.py:30 + // named_tuples/contract.py:32 // @arc4.abimethod() txn OnCompletion ! assert // OnCompletion is NoOp txn ApplicationID assert // is not creating - // named_tuples/contract.py:13 + // named_tuples/contract.py:15 // class NamedTuplesContract(arc4.ARC4Contract): txna ApplicationArgs 1 dup @@ -119,14 +119,14 @@ __puya_arc4_router___test_tuple_route@3: uncover 2 substring3 extract 2 0 - // named_tuples/contract.py:30 + // named_tuples/contract.py:32 // @arc4.abimethod() callsub test_tuple intc_0 // 1 retsub __puya_arc4_router___bare_routing@6: - // named_tuples/contract.py:13 + // named_tuples/contract.py:15 // class NamedTuplesContract(arc4.ARC4Contract): txn OnCompletion bnz __puya_arc4_router___after_if_else@10 @@ -137,7 +137,7 @@ __puya_arc4_router___bare_routing@6: retsub __puya_arc4_router___after_if_else@10: - // named_tuples/contract.py:13 + // named_tuples/contract.py:15 // class NamedTuplesContract(arc4.ARC4Contract): intc_1 // 0 retsub @@ -145,25 +145,25 @@ __puya_arc4_router___after_if_else@10: // test_cases.named_tuples.contract.NamedTuplesContract.build_tuple(a: uint64, b: bytes, c: bytes, d: bytes) -> uint64, bytes, bytes, bytes: build_tuple: - // named_tuples/contract.py:15-16 + // named_tuples/contract.py:17-18 // @arc4.abimethod() // def build_tuple(self, a: UInt64, b: BigUInt, c: String, d: Bytes) -> TestTuple: proto 4 4 - // named_tuples/contract.py:17 + // named_tuples/contract.py:19 // t1 = self.build_tuple_by_name(a, b, c, d) frame_dig -4 frame_dig -3 frame_dig -2 frame_dig -1 callsub build_tuple_by_name - // named_tuples/contract.py:18 + // named_tuples/contract.py:20 // t2 = self.build_tuple_by_position(a, b, c, d) frame_dig -4 frame_dig -3 frame_dig -2 frame_dig -1 callsub build_tuple_by_position - // named_tuples/contract.py:19 + // named_tuples/contract.py:21 // assert t1 == t2 dig 7 uncover 4 @@ -181,18 +181,18 @@ build_tuple: == && assert - // named_tuples/contract.py:20 + // named_tuples/contract.py:22 // return t1 retsub // test_cases.named_tuples.contract.NamedTuplesContract.build_tuple_by_name(a: uint64, b: bytes, c: bytes, d: bytes) -> uint64, bytes, bytes, bytes: build_tuple_by_name: - // named_tuples/contract.py:22-23 + // named_tuples/contract.py:24-25 // @subroutine // def build_tuple_by_name(self, a: UInt64, b: BigUInt, c: String, d: Bytes) -> TestTuple: proto 4 4 - // named_tuples/contract.py:24 + // named_tuples/contract.py:26 // return TestTuple(a=a, b=b, c=c, d=d) frame_dig -4 frame_dig -3 @@ -203,11 +203,11 @@ build_tuple_by_name: // test_cases.named_tuples.contract.NamedTuplesContract.build_tuple_by_position(a: uint64, b: bytes, c: bytes, d: bytes) -> uint64, bytes, bytes, bytes: build_tuple_by_position: - // named_tuples/contract.py:26-27 + // named_tuples/contract.py:28-29 // @subroutine // def build_tuple_by_position(self, a: UInt64, b: BigUInt, c: String, d: Bytes) -> TestTuple: proto 4 4 - // named_tuples/contract.py:28 + // named_tuples/contract.py:30 // return TestTuple(a, b, c, d) frame_dig -4 frame_dig -3 @@ -218,30 +218,30 @@ build_tuple_by_position: // test_cases.named_tuples.contract.NamedTuplesContract.test_tuple(value.a: uint64, value.b: bytes, value.c: bytes, value.d: bytes) -> void: test_tuple: - // named_tuples/contract.py:30-31 + // named_tuples/contract.py:32-33 // @arc4.abimethod() // def test_tuple(self, value: TestTuple) -> None: proto 4 0 - // named_tuples/contract.py:32 + // named_tuples/contract.py:34 // assert value.a < 1000 frame_dig -4 pushint 1000 // 1000 < assert - // named_tuples/contract.py:33 + // named_tuples/contract.py:35 // assert value.b < 2**65 frame_dig -3 pushbytes 0x020000000000000000 b< assert - // named_tuples/contract.py:34 + // named_tuples/contract.py:36 // assert value.c.bytes.length > 1 frame_dig -2 len intc_0 // 1 > assert - // named_tuples/contract.py:35 + // named_tuples/contract.py:37 // assert value.d == Txn.sender.bytes frame_dig -1 txn Sender diff --git a/test_cases/named_tuples/out/NamedTuplesContract.arc32.json b/test_cases/named_tuples/out/NamedTuplesContract.arc32.json index e8acacc22f..c2a7d3316c 100644 --- a/test_cases/named_tuples/out/NamedTuplesContract.arc32.json +++ b/test_cases/named_tuples/out/NamedTuplesContract.arc32.json @@ -58,7 +58,7 @@ } }, "source": { - "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLm5hbWVkX3R1cGxlcy5jb250cmFjdC5OYW1lZFR1cGxlc0NvbnRyYWN0LmFwcHJvdmFsX3Byb2dyYW06CiAgICBpbnRjYmxvY2sgMSAwIDY0CiAgICBjYWxsc3ViIF9fcHV5YV9hcmM0X3JvdXRlcl9fCiAgICByZXR1cm4KCgovLyB0ZXN0X2Nhc2VzLm5hbWVkX3R1cGxlcy5jb250cmFjdC5OYW1lZFR1cGxlc0NvbnRyYWN0Ll9fcHV5YV9hcmM0X3JvdXRlcl9fKCkgLT4gdWludDY0OgpfX3B1eWFfYXJjNF9yb3V0ZXJfXzoKICAgIC8vIG5hbWVkX3R1cGxlcy9jb250cmFjdC5weToxMwogICAgLy8gY2xhc3MgTmFtZWRUdXBsZXNDb250cmFjdChhcmM0LkFSQzRDb250cmFjdCk6CiAgICBwcm90byAwIDEKICAgIHR4biBOdW1BcHBBcmdzCiAgICBieiBfX3B1eWFfYXJjNF9yb3V0ZXJfX19iYXJlX3JvdXRpbmdANgogICAgcHVzaGJ5dGVzcyAweDQ1NmVlYWNlIDB4NmY5ZjViZjAgLy8gbWV0aG9kICJidWlsZF90dXBsZSh1aW50NjQsdWludDUxMixzdHJpbmcsYnl0ZVtdKSh1aW50NjQsdWludDUxMixzdHJpbmcsYnl0ZVtdKSIsIG1ldGhvZCAidGVzdF90dXBsZSgodWludDY0LHVpbnQ1MTIsc3RyaW5nLGJ5dGVbXSkpdm9pZCIKICAgIHR4bmEgQXBwbGljYXRpb25BcmdzIDAKICAgIG1hdGNoIF9fcHV5YV9hcmM0X3JvdXRlcl9fX2J1aWxkX3R1cGxlX3JvdXRlQDIgX19wdXlhX2FyYzRfcm91dGV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3NlcnQKICAgIC8vIG5hbWVkX3R1cGxlcy9jb250cmFjdC5weTozNQogICAgLy8gYXNzZXJ0IHZhbHVlLmIgPCAyKio2NQogICAgZnJhbWVfZGlnIC0zCiAgICBwdXNoYnl0ZXMgMHgwMjAwMDAwMDAwMDAwMDAwMDAKICAgIGI8CiAgICBhc3NlcnQKICAgIC8vIG5hbWVkX3R1cGxlcy9jb250cmFjdC5weTozNgogICAgLy8gYXNzZXJ0IHZhbHVlLmMuYnl0ZXMubGVuZ3RoID4gMQogICAgZnJhbWVfZGlnIC0yCiAgICBsZW4KICAgIGludGNfMCAvLyAxCiAgICA+CiAgICBhc3NlcnQKICAgIC8vIG5hbWVkX3R1cGxlcy9jb250cmFjdC5weTozNwogICAgLy8gYXNzZXJ0IHZhbHVlLmQgPT0gVHhuLnNlbmRlci5ieXRlcwogICAgZnJhbWVfZGlnIC0xCiAgICB0eG4gU2VuZGVyCiAgICA9PQogICAgYXNzZXJ0CiAgICByZXRzdWIK", "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLm5hbWVkX3R1cGxlcy5jb250cmFjdC5OYW1lZFR1cGxlc0NvbnRyYWN0LmNsZWFyX3N0YXRlX3Byb2dyYW06CiAgICBwdXNoaW50IDEgLy8gMQogICAgcmV0dXJuCg==" }, "state": { diff --git a/test_cases/named_tuples/out/NamedTuplesContract.arc56.json b/test_cases/named_tuples/out/NamedTuplesContract.arc56.json new file mode 100644 index 0000000000..b4e03f61a6 --- /dev/null +++ b/test_cases/named_tuples/out/NamedTuplesContract.arc56.json @@ -0,0 +1,169 @@ +{ + "arcs": [ + 22, + 28 + ], + "name": "NamedTuplesContract", + "structs": { + "TestTuple": [ + { + "name": "a", + "type": "uint64" + }, + { + "name": "b", + "type": "uint512" + }, + { + "name": "c", + "type": "string" + }, + { + "name": "d", + "type": "byte[]" + } + ] + }, + "methods": [ + { + "name": "build_tuple", + "args": [ + { + "type": "uint64", + "name": "a" + }, + { + "type": "uint512", + "name": "b" + }, + { + "type": "string", + "name": "c" + }, + { + "type": "byte[]", + "name": "d" + } + ], + "returns": { + "type": "(uint64,uint512,string,byte[])", + "struct": "TestTuple" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "test_tuple", + "args": [ + { + "type": "(uint64,uint512,string,byte[])", + "struct": "TestTuple", + "name": "value" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "events": [], + "templateVariables": {}, + "networks": {}, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 44, + 144 + ], + "errorMessage": "OnCompletion is NoOp" + }, + { + "pc": [ + 207 + ], + "errorMessage": "is creating" + }, + { + "pc": [ + 47, + 147 + ], + "errorMessage": "is not creating" + }, + { + "pc": [ + 78 + ], + "errorMessage": "overflow" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLm5hbWVkX3R1cGxlcy5jb250cmFjdC5OYW1lZFR1cGxlc0NvbnRyYWN0LmFwcHJvdmFsX3Byb2dyYW06CiAgICBpbnRjYmxvY2sgMSAwIDY0CiAgICBjYWxsc3ViIF9fcHV5YV9hcmM0X3JvdXRlcl9fCiAgICByZXR1cm4KCgovLyB0ZXN0X2Nhc2VzLm5hbWVkX3R1cGxlcy5jb250cmFjdC5OYW1lZFR1cGxlc0NvbnRyYWN0Ll9fcHV5YV9hcmM0X3JvdXRlcl9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lX3Byb2dyYW06CiAgICBwdXNoaW50IDEgLy8gMQogICAgcmV0dXJuCg==" + }, + "byteCode": { + "approval": "CiADAQBAiAABQ4oAATEbQQC1ggIERW7qzgRvn1vwNhoAjgIAAgBmI4kxGRREMRhENhoBFzYaAjYaA1cCADYaBFcCAIgAjk8DFksDFSQORCSvTwSrSwMVFlcGAk8EUEsDFRZXBgJPBFBPA08DUIACAExQSwIVgUwIFlcGAlBPAlBMUIAEFR98dUxQsCKJMRkURDEYRDYaAUlXAAgXSwFXCEBLAoFIWUsDgUpZSwRPAksCUlcCAEsEFU8FTwNPAlJXAgCIAFkiiTEZQAAGMRgURCKJI4mKBASL/Iv9i/6L/4gAJIv8i/2L/ov/iAAlSwdPBBJLBk8EqBBLBE8DEhBLAk8CEhBEiYoEBIv8i/2L/ov/iYoEBIv8i/2L/ov/iYoEAIv8gegHDESL/YAJAgAAAAAAAAAApESL/hUiDUSL/zEAEkSJ", + "clear": "CoEBQw==" + }, + "compilerInfo": { + "compiler": "puya", + "compilerVersion": { + "major": 99, + "minor": 99, + "patch": 99 + } + } +} \ No newline at end of file diff --git a/test_cases/named_tuples/out/NamedTuplesContract.destructured.ir b/test_cases/named_tuples/out/NamedTuplesContract.destructured.ir index 350ccb6c48..8766c40f40 100644 --- a/test_cases/named_tuples/out/NamedTuplesContract.destructured.ir +++ b/test_cases/named_tuples/out/NamedTuplesContract.destructured.ir @@ -6,13 +6,13 @@ contract test_cases.named_tuples.contract.NamedTuplesContract: return tmp%0#0 subroutine test_cases.named_tuples.contract.NamedTuplesContract.__puya_arc4_router__() -> bool: - block@0: // L13 + block@0: // L15 let tmp%0#0: uint64 = (txn NumAppArgs) goto tmp%0#0 ? block@1 : block@6 - block@1: // abi_routing_L13 + block@1: // abi_routing_L15 let tmp%2#0: bytes = (txna ApplicationArgs 0) switch tmp%2#0 {method "build_tuple(uint64,uint512,string,byte[])(uint64,uint512,string,byte[])" => block@2, method "test_tuple((uint64,uint512,string,byte[]))void" => block@3, * => return 0u} - block@2: // build_tuple_route_L15 + block@2: // build_tuple_route_L17 let tmp%3#0: uint64 = (txn OnCompletion) let tmp%4#0: bool = (! tmp%3#0) (assert tmp%4#0) // OnCompletion is NoOp @@ -52,7 +52,7 @@ contract test_cases.named_tuples.contract.NamedTuplesContract: let tmp%14#0: bytes = (concat 0x151f7c75 encoded_tuple_buffer%6#0) (log tmp%14#0) return 1u - block@3: // test_tuple_route_L30 + block@3: // test_tuple_route_L32 let tmp%15#0: uint64 = (txn OnCompletion) let tmp%16#0: bool = (! tmp%15#0) (assert tmp%16#0) // OnCompletion is NoOp @@ -71,19 +71,19 @@ contract test_cases.named_tuples.contract.NamedTuplesContract: let item3%0%0#0: bytes = ((extract 2 0) item3%0#0) test_cases.named_tuples.contract.NamedTuplesContract.test_tuple(item0%0%0#0, item1%0#0, item2%0%0#0, item3%0%0#0) return 1u - block@6: // bare_routing_L13 + block@6: // bare_routing_L15 let tmp%20#0: uint64 = (txn OnCompletion) goto tmp%20#0 ? block@10 : block@7 - block@7: // __algopy_default_create_L13 + block@7: // __algopy_default_create_L15 let tmp%21#0: uint64 = (txn ApplicationID) let tmp%22#0: bool = (! tmp%21#0) (assert tmp%22#0) // is creating return 1u - block@10: // after_if_else_L13 + block@10: // after_if_else_L15 return 0u subroutine test_cases.named_tuples.contract.NamedTuplesContract.build_tuple(a: uint64, b: biguint, c: bytes, d: bytes) -> : - block@0: // L15 + block@0: // L17 let (t1.a#0: uint64, t1.b#0: biguint, t1.c#0: bytes, t1.d#0: bytes) = test_cases.named_tuples.contract.NamedTuplesContract.build_tuple_by_name(a#0, b#0, c#0, d#0) let (t2.a#0: uint64, t2.b#0: biguint, t2.c#0: bytes, t2.d#0: bytes) = test_cases.named_tuples.contract.NamedTuplesContract.build_tuple_by_position(a#0, b#0, c#0, d#0) let tmp%0#0: bool = (== t1.a#0 t2.a#0) @@ -97,15 +97,15 @@ contract test_cases.named_tuples.contract.NamedTuplesContract: return t1.a#0 t1.b#0 t1.c#0 t1.d#0 subroutine test_cases.named_tuples.contract.NamedTuplesContract.build_tuple_by_name(a: uint64, b: biguint, c: bytes, d: bytes) -> : - block@0: // L22 + block@0: // L24 return a#0 b#0 c#0 d#0 subroutine test_cases.named_tuples.contract.NamedTuplesContract.build_tuple_by_position(a: uint64, b: biguint, c: bytes, d: bytes) -> : - block@0: // L26 + block@0: // L28 return a#0 b#0 c#0 d#0 subroutine test_cases.named_tuples.contract.NamedTuplesContract.test_tuple(value.a: uint64, value.b: biguint, value.c: bytes, value.d: bytes) -> void: - block@0: // L30 + block@0: // L32 let tmp%0#0: bool = (< value.a#0 1000u) (assert tmp%0#0) let tmp%1#0: bool = (b< value.b#0 36893488147419103232b) diff --git a/test_cases/named_tuples/out/NamedTuplesContract.ssa.ir b/test_cases/named_tuples/out/NamedTuplesContract.ssa.ir index 9d11cc4854..ecdb0bc78a 100644 --- a/test_cases/named_tuples/out/NamedTuplesContract.ssa.ir +++ b/test_cases/named_tuples/out/NamedTuplesContract.ssa.ir @@ -6,14 +6,14 @@ contract test_cases.named_tuples.contract.NamedTuplesContract: return tmp%0#0 subroutine test_cases.named_tuples.contract.NamedTuplesContract.__puya_arc4_router__() -> bool: - block@0: // L13 + block@0: // L15 let tmp%0#0: uint64 = (txn NumAppArgs) let tmp%1#0: bool = (!= tmp%0#0 0u) goto tmp%1#0 ? block@1 : block@6 - block@1: // abi_routing_L13 + block@1: // abi_routing_L15 let tmp%2#0: bytes = (txna ApplicationArgs 0) switch tmp%2#0 {method "build_tuple(uint64,uint512,string,byte[])(uint64,uint512,string,byte[])" => block@2, method "test_tuple((uint64,uint512,string,byte[]))void" => block@3, * => block@4} - block@2: // build_tuple_route_L15 + block@2: // build_tuple_route_L17 let tmp%3#0: uint64 = (txn OnCompletion) let tmp%4#0: bool = (== tmp%3#0 NoOp) (assert tmp%4#0) // OnCompletion is NoOp @@ -61,7 +61,7 @@ contract test_cases.named_tuples.contract.NamedTuplesContract: let tmp%14#0: bytes = (concat 0x151f7c75 encoded_tuple_buffer%6#0) (log tmp%14#0) return 1u - block@3: // test_tuple_route_L30 + block@3: // test_tuple_route_L32 let tmp%15#0: uint64 = (txn OnCompletion) let tmp%16#0: bool = (== tmp%15#0 NoOp) (assert tmp%16#0) // OnCompletion is NoOp @@ -82,28 +82,28 @@ contract test_cases.named_tuples.contract.NamedTuplesContract: let item3%0%0#0: bytes = ((extract 2 0) item3%0#0) test_cases.named_tuples.contract.NamedTuplesContract.test_tuple(item0%0%0#0, item1%0#0, item2%0%0#0, item3%0%0#0) return 1u - block@4: // switch_case_default_L13 + block@4: // switch_case_default_L15 goto block@5 - block@5: // switch_case_next_L13 + block@5: // switch_case_next_L15 goto block@10 - block@6: // bare_routing_L13 + block@6: // bare_routing_L15 let tmp%20#0: uint64 = (txn OnCompletion) switch tmp%20#0 {0u => block@7, * => block@8} - block@7: // __algopy_default_create_L13 + block@7: // __algopy_default_create_L15 let tmp%21#0: uint64 = (txn ApplicationID) let tmp%22#0: bool = (== tmp%21#0 0u) (assert tmp%22#0) // is creating test_cases.named_tuples.contract.NamedTuplesContract.__algopy_default_create() return 1u - block@8: // switch_case_default_L13 + block@8: // switch_case_default_L15 goto block@9 - block@9: // switch_case_next_L13 + block@9: // switch_case_next_L15 goto block@10 - block@10: // after_if_else_L13 + block@10: // after_if_else_L15 return 0u subroutine test_cases.named_tuples.contract.NamedTuplesContract.build_tuple(a: uint64, b: biguint, c: bytes, d: bytes) -> : - block@0: // L15 + block@0: // L17 let (t1.a#0: uint64, t1.b#0: biguint, t1.c#0: bytes, t1.d#0: bytes) = test_cases.named_tuples.contract.NamedTuplesContract.build_tuple_by_name(a#0, b#0, c#0, d#0) let (t2.a#0: uint64, t2.b#0: biguint, t2.c#0: bytes, t2.d#0: bytes) = test_cases.named_tuples.contract.NamedTuplesContract.build_tuple_by_position(a#0, b#0, c#0, d#0) let tmp%0#0: bool = (== t1.a#0 t2.a#0) @@ -117,15 +117,15 @@ contract test_cases.named_tuples.contract.NamedTuplesContract: return t1.a#0 t1.b#0 t1.c#0 t1.d#0 subroutine test_cases.named_tuples.contract.NamedTuplesContract.build_tuple_by_name(a: uint64, b: biguint, c: bytes, d: bytes) -> : - block@0: // L22 + block@0: // L24 return a#0 b#0 c#0 d#0 subroutine test_cases.named_tuples.contract.NamedTuplesContract.build_tuple_by_position(a: uint64, b: biguint, c: bytes, d: bytes) -> : - block@0: // L26 + block@0: // L28 return a#0 b#0 c#0 d#0 subroutine test_cases.named_tuples.contract.NamedTuplesContract.test_tuple(value.a: uint64, value.b: biguint, value.c: bytes, value.d: bytes) -> void: - block@0: // L30 + block@0: // L32 let tmp%0#0: bool = (< value.a#0 1000u) (assert tmp%0#0) let tmp%1#0: bool = (b< value.b#0 36893488147419103232b) @@ -139,7 +139,7 @@ contract test_cases.named_tuples.contract.NamedTuplesContract: return subroutine test_cases.named_tuples.contract.NamedTuplesContract.__algopy_default_create() -> void: - block@0: // L13 + block@0: // L15 return program clear-state: diff --git a/test_cases/named_tuples/out/NamedTuplesContract.ssa.opt_pass_1.ir b/test_cases/named_tuples/out/NamedTuplesContract.ssa.opt_pass_1.ir index 1adbe43d2c..612eee42ac 100644 --- a/test_cases/named_tuples/out/NamedTuplesContract.ssa.opt_pass_1.ir +++ b/test_cases/named_tuples/out/NamedTuplesContract.ssa.opt_pass_1.ir @@ -6,13 +6,13 @@ contract test_cases.named_tuples.contract.NamedTuplesContract: return tmp%0#0 subroutine test_cases.named_tuples.contract.NamedTuplesContract.__puya_arc4_router__() -> bool: - block@0: // L13 + block@0: // L15 let tmp%0#0: uint64 = (txn NumAppArgs) goto tmp%0#0 ? block@1 : block@6 - block@1: // abi_routing_L13 + block@1: // abi_routing_L15 let tmp%2#0: bytes = (txna ApplicationArgs 0) switch tmp%2#0 {method "build_tuple(uint64,uint512,string,byte[])(uint64,uint512,string,byte[])" => block@2, method "test_tuple((uint64,uint512,string,byte[]))void" => block@3, * => return 0u} - block@2: // build_tuple_route_L15 + block@2: // build_tuple_route_L17 let tmp%3#0: uint64 = (txn OnCompletion) let tmp%4#0: bool = (! tmp%3#0) (assert tmp%4#0) // OnCompletion is NoOp @@ -54,7 +54,7 @@ contract test_cases.named_tuples.contract.NamedTuplesContract: let tmp%14#0: bytes = (concat 0x151f7c75 encoded_tuple_buffer%6#0) (log tmp%14#0) return 1u - block@3: // test_tuple_route_L30 + block@3: // test_tuple_route_L32 let tmp%15#0: uint64 = (txn OnCompletion) let tmp%16#0: bool = (! tmp%15#0) (assert tmp%16#0) // OnCompletion is NoOp @@ -73,19 +73,19 @@ contract test_cases.named_tuples.contract.NamedTuplesContract: let item3%0%0#0: bytes = ((extract 2 0) item3%0#0) test_cases.named_tuples.contract.NamedTuplesContract.test_tuple(item0%0%0#0, item1%0#0, item2%0%0#0, item3%0%0#0) return 1u - block@6: // bare_routing_L13 + block@6: // bare_routing_L15 let tmp%20#0: uint64 = (txn OnCompletion) goto tmp%20#0 ? block@10 : block@7 - block@7: // __algopy_default_create_L13 + block@7: // __algopy_default_create_L15 let tmp%21#0: uint64 = (txn ApplicationID) let tmp%22#0: bool = (! tmp%21#0) (assert tmp%22#0) // is creating return 1u - block@10: // after_if_else_L13 + block@10: // after_if_else_L15 return 0u subroutine test_cases.named_tuples.contract.NamedTuplesContract.build_tuple(a: uint64, b: biguint, c: bytes, d: bytes) -> : - block@0: // L15 + block@0: // L17 let (t1.a#0: uint64, t1.b#0: biguint, t1.c#0: bytes, t1.d#0: bytes) = test_cases.named_tuples.contract.NamedTuplesContract.build_tuple_by_name(a#0, b#0, c#0, d#0) let (t2.a#0: uint64, t2.b#0: biguint, t2.c#0: bytes, t2.d#0: bytes) = test_cases.named_tuples.contract.NamedTuplesContract.build_tuple_by_position(a#0, b#0, c#0, d#0) let tmp%0#0: bool = (== t1.a#0 t2.a#0) @@ -99,15 +99,15 @@ contract test_cases.named_tuples.contract.NamedTuplesContract: return t1.a#0 t1.b#0 t1.c#0 t1.d#0 subroutine test_cases.named_tuples.contract.NamedTuplesContract.build_tuple_by_name(a: uint64, b: biguint, c: bytes, d: bytes) -> : - block@0: // L22 + block@0: // L24 return a#0 b#0 c#0 d#0 subroutine test_cases.named_tuples.contract.NamedTuplesContract.build_tuple_by_position(a: uint64, b: biguint, c: bytes, d: bytes) -> : - block@0: // L26 + block@0: // L28 return a#0 b#0 c#0 d#0 subroutine test_cases.named_tuples.contract.NamedTuplesContract.test_tuple(value.a: uint64, value.b: biguint, value.c: bytes, value.d: bytes) -> void: - block@0: // L30 + block@0: // L32 let tmp%0#0: bool = (< value.a#0 1000u) (assert tmp%0#0) let tmp%1#0: bool = (b< value.b#0 36893488147419103232b) diff --git a/test_cases/named_tuples/out/NamedTuplesContract.ssa.opt_pass_2.ir b/test_cases/named_tuples/out/NamedTuplesContract.ssa.opt_pass_2.ir index 350ccb6c48..8766c40f40 100644 --- a/test_cases/named_tuples/out/NamedTuplesContract.ssa.opt_pass_2.ir +++ b/test_cases/named_tuples/out/NamedTuplesContract.ssa.opt_pass_2.ir @@ -6,13 +6,13 @@ contract test_cases.named_tuples.contract.NamedTuplesContract: return tmp%0#0 subroutine test_cases.named_tuples.contract.NamedTuplesContract.__puya_arc4_router__() -> bool: - block@0: // L13 + block@0: // L15 let tmp%0#0: uint64 = (txn NumAppArgs) goto tmp%0#0 ? block@1 : block@6 - block@1: // abi_routing_L13 + block@1: // abi_routing_L15 let tmp%2#0: bytes = (txna ApplicationArgs 0) switch tmp%2#0 {method "build_tuple(uint64,uint512,string,byte[])(uint64,uint512,string,byte[])" => block@2, method "test_tuple((uint64,uint512,string,byte[]))void" => block@3, * => return 0u} - block@2: // build_tuple_route_L15 + block@2: // build_tuple_route_L17 let tmp%3#0: uint64 = (txn OnCompletion) let tmp%4#0: bool = (! tmp%3#0) (assert tmp%4#0) // OnCompletion is NoOp @@ -52,7 +52,7 @@ contract test_cases.named_tuples.contract.NamedTuplesContract: let tmp%14#0: bytes = (concat 0x151f7c75 encoded_tuple_buffer%6#0) (log tmp%14#0) return 1u - block@3: // test_tuple_route_L30 + block@3: // test_tuple_route_L32 let tmp%15#0: uint64 = (txn OnCompletion) let tmp%16#0: bool = (! tmp%15#0) (assert tmp%16#0) // OnCompletion is NoOp @@ -71,19 +71,19 @@ contract test_cases.named_tuples.contract.NamedTuplesContract: let item3%0%0#0: bytes = ((extract 2 0) item3%0#0) test_cases.named_tuples.contract.NamedTuplesContract.test_tuple(item0%0%0#0, item1%0#0, item2%0%0#0, item3%0%0#0) return 1u - block@6: // bare_routing_L13 + block@6: // bare_routing_L15 let tmp%20#0: uint64 = (txn OnCompletion) goto tmp%20#0 ? block@10 : block@7 - block@7: // __algopy_default_create_L13 + block@7: // __algopy_default_create_L15 let tmp%21#0: uint64 = (txn ApplicationID) let tmp%22#0: bool = (! tmp%21#0) (assert tmp%22#0) // is creating return 1u - block@10: // after_if_else_L13 + block@10: // after_if_else_L15 return 0u subroutine test_cases.named_tuples.contract.NamedTuplesContract.build_tuple(a: uint64, b: biguint, c: bytes, d: bytes) -> : - block@0: // L15 + block@0: // L17 let (t1.a#0: uint64, t1.b#0: biguint, t1.c#0: bytes, t1.d#0: bytes) = test_cases.named_tuples.contract.NamedTuplesContract.build_tuple_by_name(a#0, b#0, c#0, d#0) let (t2.a#0: uint64, t2.b#0: biguint, t2.c#0: bytes, t2.d#0: bytes) = test_cases.named_tuples.contract.NamedTuplesContract.build_tuple_by_position(a#0, b#0, c#0, d#0) let tmp%0#0: bool = (== t1.a#0 t2.a#0) @@ -97,15 +97,15 @@ contract test_cases.named_tuples.contract.NamedTuplesContract: return t1.a#0 t1.b#0 t1.c#0 t1.d#0 subroutine test_cases.named_tuples.contract.NamedTuplesContract.build_tuple_by_name(a: uint64, b: biguint, c: bytes, d: bytes) -> : - block@0: // L22 + block@0: // L24 return a#0 b#0 c#0 d#0 subroutine test_cases.named_tuples.contract.NamedTuplesContract.build_tuple_by_position(a: uint64, b: biguint, c: bytes, d: bytes) -> : - block@0: // L26 + block@0: // L28 return a#0 b#0 c#0 d#0 subroutine test_cases.named_tuples.contract.NamedTuplesContract.test_tuple(value.a: uint64, value.b: biguint, value.c: bytes, value.d: bytes) -> void: - block@0: // L30 + block@0: // L32 let tmp%0#0: bool = (< value.a#0 1000u) (assert tmp%0#0) let tmp%1#0: bool = (b< value.b#0 36893488147419103232b) diff --git a/test_cases/named_tuples/out/client_NamedTuplesContract.py b/test_cases/named_tuples/out/client_NamedTuplesContract.py index 8e34976dad..9d160eef60 100644 --- a/test_cases/named_tuples/out/client_NamedTuplesContract.py +++ b/test_cases/named_tuples/out/client_NamedTuplesContract.py @@ -19,7 +19,7 @@ def build_tuple( b: algopy.arc4.BigUIntN[typing.Literal[512]], c: algopy.arc4.String, d: algopy.arc4.DynamicBytes, - ) -> TestTuple: ... + ) -> algopy.arc4.Tuple[algopy.arc4.UIntN[typing.Literal[64]], algopy.arc4.BigUIntN[typing.Literal[512]], algopy.arc4.String, algopy.arc4.DynamicBytes]: ... @algopy.arc4.abimethod def test_tuple( diff --git a/test_cases/named_tuples/out_O2/NamedTuplesContract.destructured.ir b/test_cases/named_tuples/out_O2/NamedTuplesContract.destructured.ir index 350ccb6c48..8766c40f40 100644 --- a/test_cases/named_tuples/out_O2/NamedTuplesContract.destructured.ir +++ b/test_cases/named_tuples/out_O2/NamedTuplesContract.destructured.ir @@ -6,13 +6,13 @@ contract test_cases.named_tuples.contract.NamedTuplesContract: return tmp%0#0 subroutine test_cases.named_tuples.contract.NamedTuplesContract.__puya_arc4_router__() -> bool: - block@0: // L13 + block@0: // L15 let tmp%0#0: uint64 = (txn NumAppArgs) goto tmp%0#0 ? block@1 : block@6 - block@1: // abi_routing_L13 + block@1: // abi_routing_L15 let tmp%2#0: bytes = (txna ApplicationArgs 0) switch tmp%2#0 {method "build_tuple(uint64,uint512,string,byte[])(uint64,uint512,string,byte[])" => block@2, method "test_tuple((uint64,uint512,string,byte[]))void" => block@3, * => return 0u} - block@2: // build_tuple_route_L15 + block@2: // build_tuple_route_L17 let tmp%3#0: uint64 = (txn OnCompletion) let tmp%4#0: bool = (! tmp%3#0) (assert tmp%4#0) // OnCompletion is NoOp @@ -52,7 +52,7 @@ contract test_cases.named_tuples.contract.NamedTuplesContract: let tmp%14#0: bytes = (concat 0x151f7c75 encoded_tuple_buffer%6#0) (log tmp%14#0) return 1u - block@3: // test_tuple_route_L30 + block@3: // test_tuple_route_L32 let tmp%15#0: uint64 = (txn OnCompletion) let tmp%16#0: bool = (! tmp%15#0) (assert tmp%16#0) // OnCompletion is NoOp @@ -71,19 +71,19 @@ contract test_cases.named_tuples.contract.NamedTuplesContract: let item3%0%0#0: bytes = ((extract 2 0) item3%0#0) test_cases.named_tuples.contract.NamedTuplesContract.test_tuple(item0%0%0#0, item1%0#0, item2%0%0#0, item3%0%0#0) return 1u - block@6: // bare_routing_L13 + block@6: // bare_routing_L15 let tmp%20#0: uint64 = (txn OnCompletion) goto tmp%20#0 ? block@10 : block@7 - block@7: // __algopy_default_create_L13 + block@7: // __algopy_default_create_L15 let tmp%21#0: uint64 = (txn ApplicationID) let tmp%22#0: bool = (! tmp%21#0) (assert tmp%22#0) // is creating return 1u - block@10: // after_if_else_L13 + block@10: // after_if_else_L15 return 0u subroutine test_cases.named_tuples.contract.NamedTuplesContract.build_tuple(a: uint64, b: biguint, c: bytes, d: bytes) -> : - block@0: // L15 + block@0: // L17 let (t1.a#0: uint64, t1.b#0: biguint, t1.c#0: bytes, t1.d#0: bytes) = test_cases.named_tuples.contract.NamedTuplesContract.build_tuple_by_name(a#0, b#0, c#0, d#0) let (t2.a#0: uint64, t2.b#0: biguint, t2.c#0: bytes, t2.d#0: bytes) = test_cases.named_tuples.contract.NamedTuplesContract.build_tuple_by_position(a#0, b#0, c#0, d#0) let tmp%0#0: bool = (== t1.a#0 t2.a#0) @@ -97,15 +97,15 @@ contract test_cases.named_tuples.contract.NamedTuplesContract: return t1.a#0 t1.b#0 t1.c#0 t1.d#0 subroutine test_cases.named_tuples.contract.NamedTuplesContract.build_tuple_by_name(a: uint64, b: biguint, c: bytes, d: bytes) -> : - block@0: // L22 + block@0: // L24 return a#0 b#0 c#0 d#0 subroutine test_cases.named_tuples.contract.NamedTuplesContract.build_tuple_by_position(a: uint64, b: biguint, c: bytes, d: bytes) -> : - block@0: // L26 + block@0: // L28 return a#0 b#0 c#0 d#0 subroutine test_cases.named_tuples.contract.NamedTuplesContract.test_tuple(value.a: uint64, value.b: biguint, value.c: bytes, value.d: bytes) -> void: - block@0: // L30 + block@0: // L32 let tmp%0#0: bool = (< value.a#0 1000u) (assert tmp%0#0) let tmp%1#0: bool = (b< value.b#0 36893488147419103232b) diff --git a/test_cases/named_tuples/out_unoptimized/NamedTuplesContract.approval.teal b/test_cases/named_tuples/out_unoptimized/NamedTuplesContract.approval.teal index 74de22628f..844cc9bf6f 100644 --- a/test_cases/named_tuples/out_unoptimized/NamedTuplesContract.approval.teal +++ b/test_cases/named_tuples/out_unoptimized/NamedTuplesContract.approval.teal @@ -8,7 +8,7 @@ test_cases.named_tuples.contract.NamedTuplesContract.approval_program: // test_cases.named_tuples.contract.NamedTuplesContract.__puya_arc4_router__() -> uint64: __puya_arc4_router__: - // named_tuples/contract.py:13 + // named_tuples/contract.py:15 // class NamedTuplesContract(arc4.ARC4Contract): proto 0 1 txn NumAppArgs @@ -23,7 +23,7 @@ __puya_arc4_router__: b __puya_arc4_router___switch_case_default@4 __puya_arc4_router___build_tuple_route@2: - // named_tuples/contract.py:15 + // named_tuples/contract.py:17 // @arc4.abimethod() txn OnCompletion intc_0 // NoOp @@ -33,7 +33,7 @@ __puya_arc4_router___build_tuple_route@2: intc_0 // 0 != assert // is not creating - // named_tuples/contract.py:13 + // named_tuples/contract.py:15 // class NamedTuplesContract(arc4.ARC4Contract): txna ApplicationArgs 1 btoi @@ -42,7 +42,7 @@ __puya_arc4_router___build_tuple_route@2: extract 2 0 txna ApplicationArgs 4 extract 2 0 - // named_tuples/contract.py:15 + // named_tuples/contract.py:17 // @arc4.abimethod() uncover 3 uncover 3 @@ -105,7 +105,7 @@ __puya_arc4_router___build_tuple_route@2: retsub __puya_arc4_router___test_tuple_route@3: - // named_tuples/contract.py:30 + // named_tuples/contract.py:32 // @arc4.abimethod() txn OnCompletion intc_0 // NoOp @@ -115,7 +115,7 @@ __puya_arc4_router___test_tuple_route@3: intc_0 // 0 != assert // is not creating - // named_tuples/contract.py:13 + // named_tuples/contract.py:15 // class NamedTuplesContract(arc4.ARC4Contract): txna ApplicationArgs 1 dup @@ -153,7 +153,7 @@ __puya_arc4_router___test_tuple_route@3: uncover 2 substring3 extract 2 0 - // named_tuples/contract.py:30 + // named_tuples/contract.py:32 // @arc4.abimethod() uncover 3 uncover 3 @@ -167,7 +167,7 @@ __puya_arc4_router___switch_case_default@4: b __puya_arc4_router___after_if_else@10 __puya_arc4_router___bare_routing@6: - // named_tuples/contract.py:13 + // named_tuples/contract.py:15 // class NamedTuplesContract(arc4.ARC4Contract): txn OnCompletion intc_0 // 0 @@ -176,7 +176,7 @@ __puya_arc4_router___bare_routing@6: b __puya_arc4_router___switch_case_default@8 __puya_arc4_router_____algopy_default_create@7: - // named_tuples/contract.py:13 + // named_tuples/contract.py:15 // class NamedTuplesContract(arc4.ARC4Contract): txn ApplicationID intc_0 // 0 @@ -189,7 +189,7 @@ __puya_arc4_router_____algopy_default_create@7: __puya_arc4_router___switch_case_default@8: __puya_arc4_router___after_if_else@10: - // named_tuples/contract.py:13 + // named_tuples/contract.py:15 // class NamedTuplesContract(arc4.ARC4Contract): intc_0 // 0 retsub @@ -197,11 +197,11 @@ __puya_arc4_router___after_if_else@10: // test_cases.named_tuples.contract.NamedTuplesContract.build_tuple(a: uint64, b: bytes, c: bytes, d: bytes) -> uint64, bytes, bytes, bytes: build_tuple: - // named_tuples/contract.py:15-16 + // named_tuples/contract.py:17-18 // @arc4.abimethod() // def build_tuple(self, a: UInt64, b: BigUInt, c: String, d: Bytes) -> TestTuple: proto 4 4 - // named_tuples/contract.py:17 + // named_tuples/contract.py:19 // t1 = self.build_tuple_by_name(a, b, c, d) frame_dig -4 frame_dig -3 @@ -211,7 +211,7 @@ build_tuple: cover 3 cover 2 swap - // named_tuples/contract.py:18 + // named_tuples/contract.py:20 // t2 = self.build_tuple_by_position(a, b, c, d) frame_dig -4 frame_dig -3 @@ -221,7 +221,7 @@ build_tuple: cover 6 cover 4 swap - // named_tuples/contract.py:19 + // named_tuples/contract.py:21 // assert t1 == t2 dig 2 == @@ -238,7 +238,7 @@ build_tuple: == && assert - // named_tuples/contract.py:20 + // named_tuples/contract.py:22 // return t1 swap uncover 2 @@ -248,11 +248,11 @@ build_tuple: // test_cases.named_tuples.contract.NamedTuplesContract.build_tuple_by_name(a: uint64, b: bytes, c: bytes, d: bytes) -> uint64, bytes, bytes, bytes: build_tuple_by_name: - // named_tuples/contract.py:22-23 + // named_tuples/contract.py:24-25 // @subroutine // def build_tuple_by_name(self, a: UInt64, b: BigUInt, c: String, d: Bytes) -> TestTuple: proto 4 4 - // named_tuples/contract.py:24 + // named_tuples/contract.py:26 // return TestTuple(a=a, b=b, c=c, d=d) frame_dig -4 frame_dig -3 @@ -263,11 +263,11 @@ build_tuple_by_name: // test_cases.named_tuples.contract.NamedTuplesContract.build_tuple_by_position(a: uint64, b: bytes, c: bytes, d: bytes) -> uint64, bytes, bytes, bytes: build_tuple_by_position: - // named_tuples/contract.py:26-27 + // named_tuples/contract.py:28-29 // @subroutine // def build_tuple_by_position(self, a: UInt64, b: BigUInt, c: String, d: Bytes) -> TestTuple: proto 4 4 - // named_tuples/contract.py:28 + // named_tuples/contract.py:30 // return TestTuple(a, b, c, d) frame_dig -4 frame_dig -3 @@ -278,30 +278,30 @@ build_tuple_by_position: // test_cases.named_tuples.contract.NamedTuplesContract.test_tuple(value.a: uint64, value.b: bytes, value.c: bytes, value.d: bytes) -> void: test_tuple: - // named_tuples/contract.py:30-31 + // named_tuples/contract.py:32-33 // @arc4.abimethod() // def test_tuple(self, value: TestTuple) -> None: proto 4 0 - // named_tuples/contract.py:32 + // named_tuples/contract.py:34 // assert value.a < 1000 frame_dig -4 pushint 1000 // 1000 < assert - // named_tuples/contract.py:33 + // named_tuples/contract.py:35 // assert value.b < 2**65 frame_dig -3 pushbytes 0x020000000000000000 b< assert - // named_tuples/contract.py:34 + // named_tuples/contract.py:36 // assert value.c.bytes.length > 1 frame_dig -2 len intc_1 // 1 > assert - // named_tuples/contract.py:35 + // named_tuples/contract.py:37 // assert value.d == Txn.sender.bytes txn Sender frame_dig -1 @@ -312,7 +312,7 @@ test_tuple: // test_cases.named_tuples.contract.NamedTuplesContract.__algopy_default_create() -> void: __algopy_default_create: - // named_tuples/contract.py:13 + // named_tuples/contract.py:15 // class NamedTuplesContract(arc4.ARC4Contract): proto 0 0 retsub diff --git a/test_cases/named_tuples/out_unoptimized/NamedTuplesContract.destructured.ir b/test_cases/named_tuples/out_unoptimized/NamedTuplesContract.destructured.ir index 1a93b2aec8..78d4859df6 100644 --- a/test_cases/named_tuples/out_unoptimized/NamedTuplesContract.destructured.ir +++ b/test_cases/named_tuples/out_unoptimized/NamedTuplesContract.destructured.ir @@ -6,14 +6,14 @@ contract test_cases.named_tuples.contract.NamedTuplesContract: return tmp%0#0 subroutine test_cases.named_tuples.contract.NamedTuplesContract.__puya_arc4_router__() -> bool: - block@0: // L13 + block@0: // L15 let tmp%0#0: uint64 = (txn NumAppArgs) let tmp%1#0: bool = (!= tmp%0#0 0u) goto tmp%1#0 ? block@1 : block@6 - block@1: // abi_routing_L13 + block@1: // abi_routing_L15 let tmp%2#0: bytes = (txna ApplicationArgs 0) switch tmp%2#0 {method "build_tuple(uint64,uint512,string,byte[])(uint64,uint512,string,byte[])" => block@2, method "test_tuple((uint64,uint512,string,byte[]))void" => block@3, * => block@4} - block@2: // build_tuple_route_L15 + block@2: // build_tuple_route_L17 let tmp%3#0: uint64 = (txn OnCompletion) let tmp%4#0: bool = (== tmp%3#0 NoOp) (assert tmp%4#0) // OnCompletion is NoOp @@ -57,7 +57,7 @@ contract test_cases.named_tuples.contract.NamedTuplesContract: let tmp%14#0: bytes = (concat 0x151f7c75 encoded_tuple_buffer%6#0) (log tmp%14#0) return 1u - block@3: // test_tuple_route_L30 + block@3: // test_tuple_route_L32 let tmp%15#0: uint64 = (txn OnCompletion) let tmp%16#0: bool = (== tmp%15#0 NoOp) (assert tmp%16#0) // OnCompletion is NoOp @@ -78,28 +78,28 @@ contract test_cases.named_tuples.contract.NamedTuplesContract: let item3%0%0#0: bytes = ((extract 2 0) item3%0#0) test_cases.named_tuples.contract.NamedTuplesContract.test_tuple(item0%0%0#0, item1%0#0, item2%0%0#0, item3%0%0#0) return 1u - block@4: // switch_case_default_L13 + block@4: // switch_case_default_L15 goto block@5 - block@5: // switch_case_next_L13 + block@5: // switch_case_next_L15 goto block@10 - block@6: // bare_routing_L13 + block@6: // bare_routing_L15 let tmp%20#0: uint64 = (txn OnCompletion) switch tmp%20#0 {0u => block@7, * => block@8} - block@7: // __algopy_default_create_L13 + block@7: // __algopy_default_create_L15 let tmp%21#0: uint64 = (txn ApplicationID) let tmp%22#0: bool = (== tmp%21#0 0u) (assert tmp%22#0) // is creating test_cases.named_tuples.contract.NamedTuplesContract.__algopy_default_create() return 1u - block@8: // switch_case_default_L13 + block@8: // switch_case_default_L15 goto block@9 - block@9: // switch_case_next_L13 + block@9: // switch_case_next_L15 goto block@10 - block@10: // after_if_else_L13 + block@10: // after_if_else_L15 return 0u subroutine test_cases.named_tuples.contract.NamedTuplesContract.build_tuple(a: uint64, b: biguint, c: bytes, d: bytes) -> : - block@0: // L15 + block@0: // L17 let (t1.a#0: uint64, t1.b#0: biguint, t1.c#0: bytes, t1.d#0: bytes) = test_cases.named_tuples.contract.NamedTuplesContract.build_tuple_by_name(a#0, b#0, c#0, d#0) let (t2.a#0: uint64, t2.b#0: biguint, t2.c#0: bytes, t2.d#0: bytes) = test_cases.named_tuples.contract.NamedTuplesContract.build_tuple_by_position(a#0, b#0, c#0, d#0) let tmp%0#0: bool = (== t1.a#0 t2.a#0) @@ -113,15 +113,15 @@ contract test_cases.named_tuples.contract.NamedTuplesContract: return t1.a#0 t1.b#0 t1.c#0 t1.d#0 subroutine test_cases.named_tuples.contract.NamedTuplesContract.build_tuple_by_name(a: uint64, b: biguint, c: bytes, d: bytes) -> : - block@0: // L22 + block@0: // L24 return a#0 b#0 c#0 d#0 subroutine test_cases.named_tuples.contract.NamedTuplesContract.build_tuple_by_position(a: uint64, b: biguint, c: bytes, d: bytes) -> : - block@0: // L26 + block@0: // L28 return a#0 b#0 c#0 d#0 subroutine test_cases.named_tuples.contract.NamedTuplesContract.test_tuple(value.a: uint64, value.b: biguint, value.c: bytes, value.d: bytes) -> void: - block@0: // L30 + block@0: // L32 let tmp%0#0: bool = (< value.a#0 1000u) (assert tmp%0#0) let tmp%1#0: bool = (b< value.b#0 36893488147419103232b) @@ -135,7 +135,7 @@ contract test_cases.named_tuples.contract.NamedTuplesContract: return subroutine test_cases.named_tuples.contract.NamedTuplesContract.__algopy_default_create() -> void: - block@0: // L13 + block@0: // L15 return program clear-state: diff --git a/test_cases/named_tuples/puya.log b/test_cases/named_tuples/puya.log index 631ea34608..e901d9ea80 100644 --- a/test_cases/named_tuples/puya.log +++ b/test_cases/named_tuples/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['named_tuples'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['named_tuples'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing named_tuples/out/module.awst debug: Sealing block@0: // L12 @@ -350,38 +350,38 @@ debug: Added array_head_and_tail#0 to Phi node: let array_head_and_tail#1: bytes debug: Added array_head_and_tail#2 to Phi node: let array_head_and_tail#1: bytes = φ(array_head_and_tail#0 <- block@0, array_head_and_tail#2 <- block@3) in block@3: // for_footer_L327 debug: Sealing block@4: // after_for_L327 debug: Terminated block@4: // after_for_L327 -debug: Sealing block@0: // L13 -debug: Terminated block@0: // L13 -debug: Sealing block@1: // abi_routing_L13 -debug: Terminated block@1: // abi_routing_L13 -debug: Sealing block@2: // build_tuple_route_L15 -debug: Terminated block@2: // build_tuple_route_L15 -debug: Sealing block@3: // test_tuple_route_L30 -debug: Terminated block@3: // test_tuple_route_L30 -debug: Sealing block@4: // switch_case_default_L13 -debug: Terminated block@4: // switch_case_default_L13 -debug: Sealing block@5: // switch_case_next_L13 -debug: Terminated block@5: // switch_case_next_L13 -debug: Sealing block@6: // bare_routing_L13 -debug: Terminated block@6: // bare_routing_L13 -debug: Sealing block@7: // __algopy_default_create_L13 -debug: Terminated block@7: // __algopy_default_create_L13 -debug: Sealing block@8: // switch_case_default_L13 -debug: Terminated block@8: // switch_case_default_L13 -debug: Sealing block@9: // switch_case_next_L13 -debug: Terminated block@9: // switch_case_next_L13 -debug: Sealing block@10: // after_if_else_L13 -debug: Terminated block@10: // after_if_else_L13 debug: Sealing block@0: // L15 debug: Terminated block@0: // L15 -debug: Sealing block@0: // L22 -debug: Terminated block@0: // L22 -debug: Sealing block@0: // L26 -debug: Terminated block@0: // L26 -debug: Sealing block@0: // L30 -debug: Terminated block@0: // L30 -debug: Sealing block@0: // L13 -debug: Terminated block@0: // L13 +debug: Sealing block@1: // abi_routing_L15 +debug: Terminated block@1: // abi_routing_L15 +debug: Sealing block@2: // build_tuple_route_L17 +debug: Terminated block@2: // build_tuple_route_L17 +debug: Sealing block@3: // test_tuple_route_L32 +debug: Terminated block@3: // test_tuple_route_L32 +debug: Sealing block@4: // switch_case_default_L15 +debug: Terminated block@4: // switch_case_default_L15 +debug: Sealing block@5: // switch_case_next_L15 +debug: Terminated block@5: // switch_case_next_L15 +debug: Sealing block@6: // bare_routing_L15 +debug: Terminated block@6: // bare_routing_L15 +debug: Sealing block@7: // __algopy_default_create_L15 +debug: Terminated block@7: // __algopy_default_create_L15 +debug: Sealing block@8: // switch_case_default_L15 +debug: Terminated block@8: // switch_case_default_L15 +debug: Sealing block@9: // switch_case_next_L15 +debug: Terminated block@9: // switch_case_next_L15 +debug: Sealing block@10: // after_if_else_L15 +debug: Terminated block@10: // after_if_else_L15 +debug: Sealing block@0: // L17 +debug: Terminated block@0: // L17 +debug: Sealing block@0: // L24 +debug: Terminated block@0: // L24 +debug: Sealing block@0: // L28 +debug: Terminated block@0: // L28 +debug: Sealing block@0: // L32 +debug: Terminated block@0: // L32 +debug: Sealing block@0: // L15 +debug: Terminated block@0: // L15 debug: Sealing block@0: // L1 debug: Terminated block@0: // L1 debug: Sealing block@0: // L1 @@ -427,28 +427,28 @@ debug: Optimizer: Inner Txn Field Replacer debug: Optimizer: Replace Compiled References debug: Optimizer: Simplify Control Ops debug: inlining the default target of a switch/goto nth -debug: adding block@1: // abi_routing_L13 as a predecessor of block@5: // switch_case_next_L13 due to inlining of block@4: // switch_case_default_L13 -debug: simplified terminator of block@1: // abi_routing_L13 from switch tmp%2#0 {method "build_tuple(uint64,uint512,string,byte[])(uint64,uint512,string,byte[])" => block@2, method "test_tuple((uint64,uint512,string,byte[]))void" => block@3, * => block@4} to switch tmp%2#0 {method "build_tuple(uint64,uint512,string,byte[])(uint64,uint512,string,byte[])" => block@2, method "test_tuple((uint64,uint512,string,byte[]))void" => block@3, * => block@5} +debug: adding block@1: // abi_routing_L15 as a predecessor of block@5: // switch_case_next_L15 due to inlining of block@4: // switch_case_default_L15 +debug: simplified terminator of block@1: // abi_routing_L15 from switch tmp%2#0 {method "build_tuple(uint64,uint512,string,byte[])(uint64,uint512,string,byte[])" => block@2, method "test_tuple((uint64,uint512,string,byte[]))void" => block@3, * => block@4} to switch tmp%2#0 {method "build_tuple(uint64,uint512,string,byte[])(uint64,uint512,string,byte[])" => block@2, method "test_tuple((uint64,uint512,string,byte[]))void" => block@3, * => block@5} debug: simplifying a switch with constants into goto nth -debug: simplified terminator of block@6: // bare_routing_L13 from switch tmp%20#0 {0u => block@7, * => block@8} to goto_nth [block@7][tmp%20#0] else goto block@8 +debug: simplified terminator of block@6: // bare_routing_L15 from switch tmp%20#0 {0u => block@7, * => block@8} to goto_nth [block@7][tmp%20#0] else goto block@8 debug: inlining the default target of a switch/goto nth -debug: adding block@1: // abi_routing_L13 as a predecessor of block@10: // after_if_else_L13 due to inlining of block@5: // switch_case_next_L13 -debug: simplified terminator of block@1: // abi_routing_L13 from switch tmp%2#0 {method "build_tuple(uint64,uint512,string,byte[])(uint64,uint512,string,byte[])" => block@2, method "test_tuple((uint64,uint512,string,byte[]))void" => block@3, * => block@5} to switch tmp%2#0 {method "build_tuple(uint64,uint512,string,byte[])(uint64,uint512,string,byte[])" => block@2, method "test_tuple((uint64,uint512,string,byte[]))void" => block@3, * => block@10} +debug: adding block@1: // abi_routing_L15 as a predecessor of block@10: // after_if_else_L15 due to inlining of block@5: // switch_case_next_L15 +debug: simplified terminator of block@1: // abi_routing_L15 from switch tmp%2#0 {method "build_tuple(uint64,uint512,string,byte[])(uint64,uint512,string,byte[])" => block@2, method "test_tuple((uint64,uint512,string,byte[]))void" => block@3, * => block@5} to switch tmp%2#0 {method "build_tuple(uint64,uint512,string,byte[])(uint64,uint512,string,byte[])" => block@2, method "test_tuple((uint64,uint512,string,byte[]))void" => block@3, * => block@10} debug: simplifying a goto nth with two targets into a conditional branch -debug: simplified terminator of block@6: // bare_routing_L13 from goto_nth [block@7][tmp%20#0] else goto block@8 to goto tmp%20#0 ? block@8 : block@7 +debug: simplified terminator of block@6: // bare_routing_L15 from goto_nth [block@7][tmp%20#0] else goto block@8 to goto tmp%20#0 ? block@8 : block@7 debug: inlining the default target of a switch/goto nth -debug: simplified terminator of block@1: // abi_routing_L13 from switch tmp%2#0 {method "build_tuple(uint64,uint512,string,byte[])(uint64,uint512,string,byte[])" => block@2, method "test_tuple((uint64,uint512,string,byte[]))void" => block@3, * => block@10} to switch tmp%2#0 {method "build_tuple(uint64,uint512,string,byte[])(uint64,uint512,string,byte[])" => block@2, method "test_tuple((uint64,uint512,string,byte[]))void" => block@3, * => return 0u} +debug: simplified terminator of block@1: // abi_routing_L15 from switch tmp%2#0 {method "build_tuple(uint64,uint512,string,byte[])(uint64,uint512,string,byte[])" => block@2, method "test_tuple((uint64,uint512,string,byte[]))void" => block@3, * => block@10} to switch tmp%2#0 {method "build_tuple(uint64,uint512,string,byte[])(uint64,uint512,string,byte[])" => block@2, method "test_tuple((uint64,uint512,string,byte[]))void" => block@3, * => return 0u} debug: Optimizer: Remove Linear Jump -debug: Replaced predecessor block@5: // switch_case_next_L13 with block@4: // switch_case_default_L13 in block@10: // after_if_else_L13 -debug: Merged linear block@5: // switch_case_next_L13 into block@4: // switch_case_default_L13 -debug: Replaced predecessor block@9: // switch_case_next_L13 with block@8: // switch_case_default_L13 in block@10: // after_if_else_L13 -debug: Merged linear block@9: // switch_case_next_L13 into block@8: // switch_case_default_L13 +debug: Replaced predecessor block@5: // switch_case_next_L15 with block@4: // switch_case_default_L15 in block@10: // after_if_else_L15 +debug: Merged linear block@5: // switch_case_next_L15 into block@4: // switch_case_default_L15 +debug: Replaced predecessor block@9: // switch_case_next_L15 with block@8: // switch_case_default_L15 in block@10: // after_if_else_L15 +debug: Merged linear block@9: // switch_case_next_L15 into block@8: // switch_case_default_L15 debug: Optimizer: Remove Empty Blocks -debug: Removed empty block: block@4: // switch_case_default_L13 -debug: Removed empty block: block@8: // switch_case_default_L13 +debug: Removed empty block: block@4: // switch_case_default_L15 +debug: Removed empty block: block@8: // switch_case_default_L15 debug: Optimizer: Remove Unreachable Blocks debug: Optimizer: Repeated Expression Elimination -debug: Replacing redundant declaration let item_start_offset%1#0: uint64 = (extract_uint16 tmp%19#0 74u) with copy of existing registers (Register(source_location=named_tuples/contract.py:13, ir_type=uint64, name='item_end_offset%0', version=0),) +debug: Replacing redundant declaration let item_start_offset%1#0: uint64 = (extract_uint16 tmp%19#0 74u) with copy of existing registers (Register(source_location=named_tuples/contract.py:15, ir_type=uint64, name='item_end_offset%0', version=0),) debug: Found equivalence set: val_as_bytes%0#0, encoded_tuple_buffer%1#0 debug: Replacing {encoded_tuple_buffer%1#0} with val_as_bytes%0#0 made 1 modifications debug: Found equivalence set: item_end_offset%0#0, item_start_offset%1#0 @@ -945,6 +945,7 @@ debug: Inserted test_tuple_block@0.ops[26]: 'l-store-copy tmp%4#0 0' debug: Replaced test_tuple_block@0.ops[29]: 'v-load tmp%4#0' with 'l-load tmp%4#0' debug: Found 3 edge set/s for test_cases.named_tuples.contract.NamedTuplesContract.__puya_arc4_router__ info: Writing named_tuples/out/NamedTuplesContract.arc32.json +info: Writing named_tuples/out/NamedTuplesContract.arc56.json info: Writing named_tuples/out/NamedTuplesContract.approval.teal info: Writing named_tuples/out/NamedTuplesContract.clear.teal info: Writing named_tuples/out/NamedTuplesContract.approval.bin diff --git a/test_cases/nested_loops/puya.log b/test_cases/nested_loops/puya.log index dad0bd3cdd..e994633abf 100644 --- a/test_cases/nested_loops/puya.log +++ b/test_cases/nested_loops/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['nested_loops'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['nested_loops'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing nested_loops/out/module.awst debug: Sealing block@0: // L12 diff --git a/test_cases/regression_tests/out/Issue118.arc56.json b/test_cases/regression_tests/out/Issue118.arc56.json new file mode 100644 index 0000000000..dd3535f7e4 --- /dev/null +++ b/test_cases/regression_tests/out/Issue118.arc56.json @@ -0,0 +1,107 @@ +{ + "arcs": [ + 22, + 28 + ], + "name": "Issue118", + "structs": {}, + "methods": [ + { + "name": "verify", + "args": [ + { + "type": "uint256[]", + "name": "values" + } + ], + "returns": { + "type": "(bool,string)" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "events": [], + "templateVariables": {}, + "networks": {}, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 43 + ], + "errorMessage": "OnCompletion is NoOp" + }, + { + "pc": [ + 72 + ], + "errorMessage": "is creating" + }, + { + "pc": [ + 46 + ], + "errorMessage": "is not creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLnJlZ3Jlc3Npb25fdGVzdHMuaXNzdWVfMTE4Lklzc3VlMTE4LmFwcHJvdmFsX3Byb2dyYW06CiAgICBpbnRjYmxvY2sgMCAxCiAgICBieXRlY2Jsb2NrIDB4MDAwMyAweDAwMDAKICAgIGNhbGxzdWIgX19wdXlhX2FyYzRfcm91dGVyX18KICAgIHJldHVybgoKCi8vIHRlc3RfY2FzZXMucmVncmVzc2lvbl90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8gcmV0dXJuIFR1cGxlKCh2YWwxLCBTdHJpbmcoIiIpKSkKICAgIGJ5dGVjXzAgLy8gMHgwMDAzCiAgICBjb25jYXQKICAgIGJ5dGVjXzEgLy8gMHgwMDAwCiAgICBjb25jYXQKICAgIHJldHN1YgoKdmVyaWZ5X2FmdGVyX2lmX2Vsc2VAMjoKICAgIC8vIHJlZ3Jlc3Npb25fdGVzdHMvaXNzdWVfMTE4LnB5OjE0CiAgICAvLyByZXR1cm4gVHVwbGUoKHZhbDEsIFN0cmluZygiIikpKQogICAgYnl0ZWNfMCAvLyAweDAwMDMKICAgIGNvbmNhdAogICAgYnl0ZWNfMSAvLyAweDAwMDAKICAgIGNvbmNhdAogICAgcmV0c3ViCg==", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLnJlZ3Jlc3Npb25fdGVzdHMuaXNzdWVfMTE4Lklzc3VlMTE4LmNsZWFyX3N0YXRlX3Byb2dyYW06CiAgICBwdXNoaW50IDEgLy8gMQogICAgcmV0dXJuCg==" + }, + "byteCode": { + "approval": "CiACAAEmAgIAAwIAAIgAAUOKAAExG0EAJ4AEvGbrYjYaAI4BAAIiiTEZFEQxGEQ2GgGIABiABBUffHVMULAjiTEZQAAGMRgURCOJIomKAQGAAQAiMRtUi/8iWYECE0EABShQKVCJKFApUIk=", + "clear": "CoEBQw==" + }, + "compilerInfo": { + "compiler": "puya", + "compilerVersion": { + "major": 99, + "minor": 99, + "patch": 99 + } + } +} \ No newline at end of file diff --git a/test_cases/regression_tests/puya.log b/test_cases/regression_tests/puya.log index 2415b5d3f7..14b5ba92d7 100644 --- a/test_cases/regression_tests/puya.log +++ b/test_cases/regression_tests/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['regression_tests'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['regression_tests'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing regression_tests/out/module.awst debug: Sealing block@0: // L12 @@ -902,6 +902,7 @@ info: Writing regression_tests/out/Issue194.clear.bin info: Writing regression_tests/out/Issue194.approval.puya.map info: Writing regression_tests/out/Issue194.clear.puya.map info: Writing regression_tests/out/Issue118.arc32.json +info: Writing regression_tests/out/Issue118.arc56.json info: Writing regression_tests/out/Issue118.approval.teal info: Writing regression_tests/out/Issue118.clear.teal info: Writing regression_tests/out/Issue118.approval.bin diff --git a/test_cases/reinterpret_cast/out/Contract.arc56.json b/test_cases/reinterpret_cast/out/Contract.arc56.json new file mode 100644 index 0000000000..1a53e8d26e --- /dev/null +++ b/test_cases/reinterpret_cast/out/Contract.arc56.json @@ -0,0 +1,120 @@ +{ + "arcs": [ + 22, + 28 + ], + "name": "Contract", + "structs": {}, + "methods": [ + { + "name": "bytes_to_bool", + "args": [], + "returns": { + "type": "bool" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "test_bytes_to_biguint", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "events": [], + "templateVariables": {}, + "networks": {}, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 43, + 71 + ], + "errorMessage": "OnCompletion is NoOp" + }, + { + "pc": [ + 88 + ], + "errorMessage": "is creating" + }, + { + "pc": [ + 46, + 74 + ], + "errorMessage": "is not creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLnJlaW50ZXJwcmV0X2Nhc3QuY29udHJhY3QuQ29udHJhY3QuYXBwcm92YWxfcHJvZ3JhbToKICAgIGludGNibG9jayAwIDEKICAgIGNhbGxzdWIgX19wdXlhX2FyYzRfcm91dGVyX18KICAgIHJldHVybgoKCi8vIHRlc3RfY2FzZXMucmVpbnRlcnByZXRfY2FzdC5jb250cmFjdC5Db250cmFjdC5fX3B1eWFfYXJjNF9yb3V0ZXJfXygpIC0+IHVpbnQ2NDoKX19wdXlhX2FyYzRfcm91dGVyX186CiAgICAvLyByZWludGVycHJldF9jYXN0L2NvbnRyYWN0LnB5OjQKICAgIC8vIGNsYXNzIENvbnRyYWN0KEFSQzRDb250cmFjdCk6CiAgICBwcm90byAwIDEKICAgIHR4biBOdW1BcHBBcmdzCiAgICBieiBfX3B1eWFfYXJjNF9yb3V0ZXJfX19iYXJlX3JvdXRpbmdANgogICAgcHVzaGJ5dGVzcyAweDQwMzRiNzMxIDB4N2U5ZmQ0Y2YgLy8gbWV0aG9kICJieXRlc190b19ib29sKClib29sIiwgbWV0aG9kICJ0ZXN0X2J5dGVzX3RvX2JpZ3VpbnQoKXZvaWQiCiAgICB0eG5hIEFwcGxpY2F0aW9uQXJncyAwCiAgICBtYXRjaCBfX3B1eWFfYXJjNF9yb3V0ZXJfX19ieXRlc190b19ib29sX3JvdXRlQDIgX19wdXlhX2FyYzRfcm91dGVyX19fdGVzdF9ieXRlc190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Ob25lOgogICAgcHJvdG8gMCAwCiAgICAvLyByZWludGVycHJldF9jYXN0L2NvbnRyYWN0LnB5OjEyCiAgICAvLyBhc3NlcnQgYnl0ZXNfdG9fYmlndWludCgpCiAgICBjYWxsc3ViIGJ5dGVzX3RvX2JpZ3VpbnQKICAgIHB1c2hieXRlcyAweAogICAgYiE9CiAgICBhc3NlcnQKICAgIHJldHN1YgoKCi8vIHRlc3RfY2FzZXMucmVpbnRlcnByZXRfY2FzdC5jb250cmFjdC5ieXRlc190b19iaWd1aW50KCkgLT4gYnl0ZXM6CmJ5dGVzX3RvX2JpZ3VpbnQ6CiAgICAvLyByZWludGVycHJldF9jYXN0L2NvbnRyYWN0LnB5OjE1LTE2CiAgICAvLyBAc3Vicm91dGluZQogICAgLy8gZGVmIGJ5dGVzX3RvX2JpZ3VpbnQoKSAtPiBCaWdVSW50OgogICAgcHJvdG8gMCAxCiAgICAvLyByZWludGVycHJldF9jYXN0L2NvbnRyYWN0LnB5OjE3CiAgICAvLyByZXR1cm4gQmlnVUludC5mcm9tX2J5dGVzKEJ5dGVzKCkpCiAgICBwdXNoYnl0ZXMgMHgKICAgIHJldHN1Ygo=", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLnJlaW50ZXJwcmV0X2Nhc3QuY29udHJhY3QuQ29udHJhY3QuY2xlYXJfc3RhdGVfcHJvZ3JhbToKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" + }, + "byteCode": { + "approval": "CiACAAGIAAFDigABMRtBAD+CAgRANLcxBH6f1M82GgCOAgACAB4iiTEZFEQxGESIACuAAQAiTwJUgAQVH3x1TFCwI4kxGRREMRhEiAAUI4kxGUAABjEYFEQjiSKJigABIomKAACIAAWAAKlEiYoAAYAAiQ==", + "clear": "CoEBQw==" + }, + "compilerInfo": { + "compiler": "puya", + "compilerVersion": { + "major": 99, + "minor": 99, + "patch": 99 + } + } +} \ No newline at end of file diff --git a/test_cases/reinterpret_cast/puya.log b/test_cases/reinterpret_cast/puya.log index 9085e1e385..722c93571c 100644 --- a/test_cases/reinterpret_cast/puya.log +++ b/test_cases/reinterpret_cast/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['reinterpret_cast'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['reinterpret_cast'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing reinterpret_cast/out/module.awst debug: Sealing block@0: // L12 @@ -817,6 +817,7 @@ debug: Inserted test_bytes_to_biguint_block@0.ops[6]: 'l-store-copy tmp%1#0 0' debug: Replaced test_bytes_to_biguint_block@0.ops[8]: 'v-load tmp%1#0' with 'l-load tmp%1#0' debug: Found 3 edge set/s for test_cases.reinterpret_cast.contract.Contract.__puya_arc4_router__ info: Writing reinterpret_cast/out/Contract.arc32.json +info: Writing reinterpret_cast/out/Contract.arc56.json info: Writing reinterpret_cast/out/Contract.approval.teal info: Writing reinterpret_cast/out/Contract.clear.teal info: Writing reinterpret_cast/out/Contract.approval.bin diff --git a/test_cases/scratch_slots/puya.log b/test_cases/scratch_slots/puya.log index 73829db12e..4711cae66b 100644 --- a/test_cases/scratch_slots/puya.log +++ b/test_cases/scratch_slots/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['scratch_slots'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['scratch_slots'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing scratch_slots/out/module.awst debug: Sealing block@0: // L12 diff --git a/test_cases/simple/puya.log b/test_cases/simple/puya.log index 26a8dda23a..c361c5453f 100644 --- a/test_cases/simple/puya.log +++ b/test_cases/simple/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['simple'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['simple'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing simple/out/module.awst debug: Sealing block@0: // L12 diff --git a/test_cases/simplish/puya.log b/test_cases/simplish/puya.log index 37818ecef2..028c89113b 100644 --- a/test_cases/simplish/puya.log +++ b/test_cases/simplish/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['simplish'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['simplish'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing simplish/out/module.awst debug: Sealing block@0: // L12 diff --git a/test_cases/ssa/puya.log b/test_cases/ssa/puya.log index 90aafdcda5..04cd3994c6 100644 --- a/test_cases/ssa/puya.log +++ b/test_cases/ssa/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['ssa'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['ssa'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing ssa/out/module.awst debug: Sealing block@0: // L12 diff --git a/test_cases/ssa2/puya.log b/test_cases/ssa2/puya.log index b49eb2a817..3f26bec6a5 100644 --- a/test_cases/ssa2/puya.log +++ b/test_cases/ssa2/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['ssa2'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['ssa2'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing ssa2/out/module.awst debug: Sealing block@0: // L12 diff --git a/test_cases/state_mutations/out/Contract.arc56.json b/test_cases/state_mutations/out/Contract.arc56.json new file mode 100644 index 0000000000..86c44594a1 --- /dev/null +++ b/test_cases/state_mutations/out/Contract.arc56.json @@ -0,0 +1,219 @@ +{ + "arcs": [ + 22, + 28 + ], + "name": "Contract", + "structs": {}, + "methods": [ + { + "name": "append", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "modify", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "get", + "args": [], + "returns": { + "type": "(uint64,string)[]" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 1 + }, + "local": { + "ints": 0, + "bytes": 1 + } + }, + "keys": { + "global": { + "glob": { + "keyType": "AVMString", + "valueType": "(uint64,string)[]", + "key": "Z2xvYg==" + } + }, + "local": { + "loc": { + "keyType": "AVMString", + "valueType": "(uint64,string)[]", + "key": "bG9j" + } + }, + "box": { + "box": { + "keyType": "AVMString", + "valueType": "(uint64,string)[]", + "key": "Ym94" + } + } + }, + "maps": { + "global": {}, + "local": {}, + "box": { + "map": { + "keyType": "AVMBytes", + "valueType": "(uint64,string)[]", + "prefix": "bWFw" + } + } + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [ + "OptIn" + ] + }, + "events": [], + "templateVariables": {}, + "networks": {}, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 85, + 97, + 109 + ], + "errorMessage": "OnCompletion is NoOp" + }, + { + "pc": [ + 213, + 393, + 429, + 516 + ], + "errorMessage": "check self.box exists" + }, + { + "pc": [ + 160, + 289, + 326, + 507 + ], + "errorMessage": "check self.glob exists" + }, + { + "pc": [ + 191, + 340, + 379, + 513 + ], + "errorMessage": "check self.loc exists for account" + }, + { + "pc": [ + 238, + 446, + 485, + 522 + ], + "errorMessage": "check self.map entry exists" + }, + { + "pc": [ + 534 + ], + "errorMessage": "expected box == global" + }, + { + "pc": [ + 528 + ], + "errorMessage": "expected local == global" + }, + { + "pc": [ + 538 + ], + "errorMessage": "expected map == global" + }, + { + "pc": [ + 140 + ], + "errorMessage": "is creating" + }, + { + "pc": [ + 88, + 100, + 112, + 145 + ], + "errorMessage": "is not creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLnN0YXRlX211dGF0aW9ucy5jb250cmFjdC5Db250cmFjdC5hcHByb3ZhbF9wcm9ncmFtOgogICAgaW50Y2Jsb2NrIDAgMSAyIDgKICAgIGJ5dGVjYmxvY2sgImJveCIgImdsb2IiICJsb2MiICJtYXAiIDB4MDAwODZkNmY2NDY5NjY2OTY1NjQgMHgwMDAwCiAgICBjYWxsc3ViIF9fcHV5YV9hcmM0X3Jvd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ogICAgYXBwX2xvY2FsX3B1dAogICAgLy8gc3RhdGVfbXV0YXRpb25zL2NvbnRyYWN0LnB5OjQxCiAgICAvLyBzZWxmLmJveC52YWx1ZS5hcHBlbmQoc3RydWN0LmNvcHkoKSkKICAgIGJ5dGVjXzAgLy8gImJveCIKICAgIGJveF9nZXQKICAgIGFzc2VydCAvLyBjaGVjayBzZWxmLmJveCBleGlzdHMKICAgIGR1cAogICAgaW50Y18wIC8vIDAKICAgIGV4dHJhY3RfdWludDE2CiAgICBzd2FwCiAgICBleHRyYWN0IDIgMAogICAgaW50Y18xIC8vIDEKICAgIGRpZyAzCiAgICBjYWxsc3ViIGR5bmFtaWNfYXJyYXlfY29uY2F0X2R5bmFtaWNfZWxlbWVudAogICAgYnl0ZWNfMCAvLyAiYm94IgogICAgYm94X2RlbAogICAgcG9wCiAgICBieXRlY18wIC8vICJib3giCiAgICBzd2FwCiAgICBib3hfcHV0CiAgICAvLyBzdGF0ZV9tdXRhdGlvbnMvY29udHJhY3QucHk6NDIKICAgIC8vIHNlbGYubWFwW1R4bi5zZW5kZXJdLmFwcGVuZChzdHJ1Y3QuY29weSgpKQogICAgYnl0ZWNfMyAvLyAibWFwIgogICAgdHhuIFNlbmRlcgogICAgY29uY2F0CiAgICBib3hfZ2V0CiAgICBhc3NlcnQgLy8gY2hlY2sgc2VsZi5tYXAgZW50cnkgZXhpc3RzCiAgICBkdXAKICAgIGludGNfMCAvLyAwCiAgICBleHRyYWN0X3VpbnQxNgogICAgc3dhcAogICAgZXh0cmFjdCAyIDAKICAgIGludGNfMSAvLyAxCiAgICB1bmNvdmVyIDMKICAgIGNhbGxzdWIgZHluYW1pY19hcnJheV9jb25jYXRfZHluYW1pY19lbGVtZW50CiAgICBieXRlY18zIC8vICJtYXAiCiAgICB0eG4gU2VuZGVyCiAgICBjb25jYXQKICAgIGR1cAogICAgYm94X2RlbAogICAgcG9wCiAgICBzd2FwCiAgICBib3hfcHV0CiAgICByZXRzdWIKCgovLyB0ZXN0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BpbnRjXzAgLy8gMAogICAgZXh0cmFjdF91aW50MTYKICAgIHVuY292ZXIgMgogICAgaW50Y18wIC8vIDAKICAgIGV4dHJhY3RfdWludDE2CiAgICBpbnRjXzEgLy8gMQogICAgLSAvLyBvbiBlcnJvcjogSW5kZXggYWNjZXNzIGlzIG91dCBvZiBib3VuZHMKICAgIGRpZyAyCiAgICBsZW4KICAgIGRpZyAzCiAgICBpbnRjXzIgLy8gMgogICAgZXh0cmFjdF91aW50MTYKICAgIHVuY292ZXIgMgogICAgc2VsZWN0CiAgICBzdWJzdHJpbmczCiAgICBkdXAKICAgIGludGNfMyAvLyA4CiAgICBleHRyYWN0X3VpbnQxNgogICAgaW50Y18wIC8vIDAKICAgIHN3YXAKICAgIGV4dHJhY3QzCiAgICBieXRlYyA0IC8vIDB4MDAwODZkNmY2NDY5NjY2OTY1NjQKICAgIGNvbmNhdAogICAgYnl0ZWNfMCAvLyAiYm94IgogICAgYm94X2dldAogICAgYXNzZXJ0IC8vIGNoZWNrIHNlbGYuYm94IGV4aXN0cwogICAgc3dhcAogICAgaW50Y18wIC8vIDAKICAgIGNhbGxzdWIgZHluYW1pY19hcnJheV9yZXBsYWNlX2R5bmFtaWNfZWxlbWVudAogICAgYnl0ZWNfMCAvLyAiYm94IgogICAgYm94X2RlbAogICAgcG9wCiAgICBieXRlY18wIC8vICJib3giCiAgICBzd2FwCiAgICBib3hfcHV0CiAgICAvLyBzdGF0ZV9tdXRhdGlvbnMvY29udHJhY3QucHk6NDkKICAgIC8vIHNlbGYubWFwW1R4bi5zZW5kZXJdWzBdLmJheiA9IGFyYzQuU3RyaW5nKCJtb2RpZmllZCIpCiAgICBieXRlY18zIC8vICJtYXAiCiAgICB0eG4gU2VuZGVyCiAgICBjb25jYXQKICAgIGJveF9nZXQKICAgIGFzc2VydCAvLyBjaGVjayBzZWxmLm1hcCBlbnRyeSBleGlzdHMKICAgIGR1cAogICAgZXh0cmFjdCAyIDAKICAgIGR1cAogICAgaW50Y18wIC8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ICAgIDwKICAgIGJ6IHN0YXRpY19hcnJheV9yZXBsYWNlX2R5bmFtaWNfZWxlbWVudF9hZnRlcl9mb3JANAogICAgZnJhbWVfZGlnIDMKICAgIGR1cAogICAgZnJhbWVfZGlnIDAKICAgIGR1cAogICAgY292ZXIgMwogICAgZXh0cmFjdF91aW50MTYKICAgIGZyYW1lX2RpZyAyCiAgICArCiAgICBmcmFtZV9kaWcgMQogICAgLQogICAgaXRvYgogICAgZXh0cmFjdCA2IDIKICAgIGRpZyAyCiAgICBzd2FwCiAgICByZXBsYWNlMwogICAgZnJhbWVfYnVyeSAzCiAgICBpbnRjXzIgLy8gMgogICAgKwogICAgZnJhbWVfYnVyeSAwCiAgICBiIHN0YXRpY19hcnJheV9yZXBsYWNlX2R5bmFtaWNfZWxlbWVudF9mb3JfaGVhZGVyQDEKCnN0YXRpY19hcnJheV9yZXBsYWNlX2R5bmFtaWNfZWxlbWVudF9hZnRlcl9mb3JANDoKICAgIGZyYW1lX2RpZyAzCiAgICBmcmFtZV9idXJ5IDAKICAgIHJldHN1Ygo=", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLnN0YXRlX211dGF0aW9ucy5jb250cmFjdC5Db250cmFjdC5jbGVhcl9zdGF0ZV9wcm9ncmFtOgogICAgcHVzaGludCAxIC8vIDEKICAgIHJldHVybgo=" + }, + "byteCode": { + "approval": "CiAEAAECCCYGA2JveARnbG9iA2xvYwNtYXAKAAhtb2RpZmllZAIAAIgAAUOKAAExG0EAS4IDBFJui78Elf7xPQQMKURLNhoAjgMAAgAOABoiiTEZFEQxGESIADsjiTEZFEQxGESIALMjiTEZFEQxGESIAYGABBUffHVMULAjiTEZjQIAAgAIIokxGBREI4kxGESIAYcjiYoAAIgAaSIpZUSAAgACTwJQSwEiWU8CVwIAI0sDiAGEKUxnMQAiKmNESSJZTFcCACNLA4gBbjEAKk8CZii+REkiWUxXAgAjSwOIAVgovEgoTL8rMQBQvkRJIllMVwIAI08DiAE/KzEAUEm8SEy/iYoAAYAPAAAAAAAAAAEACgADYmF6iYoAACIpZURJVwIASSJZTwIiWSMJSwIVSwMkWU8CTVJJJVkiTFgnBFAiKWVETCKIAXApTGcxACIqY0RJVwIASSJZTwIiWSMJSwIVSwMkWU8CTVJJJVkiTFgnBFAxACIqY0RMIogBOzEAKk8CZii+RElXAgBJIllPAiJZIwlLAhVLAyRZTwJNUkklWSJMWCcEUCi+REwiiAEJKLxIKEy/KzEAUL5ESVcCAEkiWU8CIlkjCUsCFUsDJFlPAk1SSSVZIkxYJwRQKzEAUL5ETCKIANErMQBQSbxITL+JigABIillRDEAIipjRCi+RCsxAFC+REsDTwMSREsCTwISREsBEkSJigAAKScFZyi8SCgnBb8xAConBWYrMQBQSbxIJwW/iYoEAYAASYv+JAuL/CQLIosEiwMMQQAci/2LBElOAlmLAggWVwYCiwFMUIwBJAiMBEL/3Iv9FYwAIowEiwSLAgxBAByL/4sESU4CWYsACBZXBgKLAUxQjAEkCIwEQv/ci/yL/ggWVwYCiwFQi/2LA4sAUlCL/xWL/4sCTwJSUIwAiYoDAYv9UQACSReL/VcCAIv+i/9PA4gAAlCJigQBi/4kC4v8TFmL/iMIJAtJTgKL/ExZi/wVi/+L/gkjCUsBTwNPAk1JSwMJTgOL/RVOA4v8Ik8EUov9UIv8TwJPA1JQi/8kC4sAiwQMQQAgiwNJiwBJTgNZiwIIiwEJFlcGAksCTF2MAyQIjABC/9iLA4wAiQ==", + "clear": "CoEBQw==" + }, + "compilerInfo": { + "compiler": "puya", + "compilerVersion": { + "major": 99, + "minor": 99, + "patch": 99 + } + } +} \ No newline at end of file diff --git a/test_cases/state_mutations/puya.log b/test_cases/state_mutations/puya.log index 699eeb65a1..6a43c59fe7 100644 --- a/test_cases/state_mutations/puya.log +++ b/test_cases/state_mutations/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['state_mutations'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['state_mutations'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing state_mutations/out/module.awst debug: Sealing block@0: // L12 @@ -2081,6 +2081,7 @@ debug: _puya_lib.arc4.dynamic_array_concat_dynamic_element f-stack on first stor debug: _puya_lib.arc4.static_array_replace_dynamic_element f-stack entry: [] debug: _puya_lib.arc4.static_array_replace_dynamic_element f-stack on first store: ['head_offset#0', 'original_item_length#0', 'new_item_length#0', 'new_head_and_tail#0', 'tmp%7#0'] info: Writing state_mutations/out/Contract.arc32.json +info: Writing state_mutations/out/Contract.arc56.json info: Writing state_mutations/out/Contract.approval.teal info: Writing state_mutations/out/Contract.clear.teal info: Writing state_mutations/out/Contract.approval.bin diff --git a/test_cases/state_proxies/out/StateProxyContract.arc56.json b/test_cases/state_proxies/out/StateProxyContract.arc56.json new file mode 100644 index 0000000000..f8eb4fdf59 --- /dev/null +++ b/test_cases/state_proxies/out/StateProxyContract.arc56.json @@ -0,0 +1,120 @@ +{ + "arcs": [ + 22, + 28 + ], + "name": "StateProxyContract", + "structs": {}, + "methods": [ + { + "name": "create", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [ + "OptIn" + ], + "call": [] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "state": { + "schema": { + "global": { + "ints": 3, + "bytes": 0 + }, + "local": { + "ints": 2, + "bytes": 0 + } + }, + "keys": { + "global": { + "global1": { + "keyType": "AVMString", + "valueType": "AVMUint64", + "key": "ZzE=", + "desc": "g1 description" + }, + "global2": { + "keyType": "AVMBytes", + "valueType": "AVMUint64", + "key": "ZzI=", + "desc": "g2 description" + } + }, + "local": { + "local1": { + "keyType": "AVMString", + "valueType": "AVMUint64", + "key": "bDE=", + "desc": "l1 description" + }, + "local2": { + "keyType": "AVMBytes", + "valueType": "AVMUint64", + "key": "bDI=", + "desc": "l2 description" + } + }, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [], + "call": [] + }, + "events": [], + "templateVariables": {}, + "networks": {}, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 44 + ], + "errorMessage": "OnCompletion is OptIn" + }, + { + "pc": [ + 48 + ], + "errorMessage": "is creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLnN0YXRlX3Byb3hpZXMuY29udHJhY3QuU3RhdGVQcm94eUNvbnRyYWN0LmFwcHJvdmFsX3Byb2dyYW06CiAgICBpbnRjYmxvY2sgMCAxCiAgICB0eG4gQXBwbGljYXRpb25JRAogICAgYm56IG1haW5fZW50cnlwb2ludEAyCiAgICBjYWxsc3ViIF9faW5pdF9fCgptYWluX2VudHJ5cG9pbnRAMjoKICAgIGNhbGxzdWIgX19wdXlhX2FyYzRfcm91dGVyX18KICAgIHJldHVybgoKCi8vIHRlc3RfY2FzZXMuc3RhdGVfcHJveGllcy5jb250cmFjdC5TdGF0ZVByb3h5Q29udHJhY3QuX19wdXlhX2FyYzRfcm91dGVyX18oKSAtPiB1aW50NjQ6Cl9fcHV5YV9hcmM0X3JvdXRlcl9fOgogICAgLy8gc3RhdGVfcHJveGllcy9jb250cmFjdC5weToxMgogICAgLy8gY2xhc3MgU3RhdGVQcm94eUNvbnRyYWN0KEFSQzRDb250cmFjdCwgc3RhdG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AAUOKAAExG0EAHYAETFxhujYaAI4BAAIiiTEZIxJEMRgURIgABCOJIomKAACAAmcxI2cxAIACbDGBAmYxAIACbDKBA2aJigAAgAJnMiJnggIEdG93bgVmdW5reTEbTYF7Z4k=", + "clear": "CoEBQw==" + }, + "compilerInfo": { + "compiler": "puya", + "compilerVersion": { + "major": 99, + "minor": 99, + "patch": 99 + } + } +} \ No newline at end of file diff --git a/test_cases/state_proxies/puya.log b/test_cases/state_proxies/puya.log index b5a9c9ed29..40bbd2f288 100644 --- a/test_cases/state_proxies/puya.log +++ b/test_cases/state_proxies/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['state_proxies'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['state_proxies'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing state_proxies/out/module.awst debug: Sealing block@0: // L12 @@ -582,6 +582,7 @@ debug: Replaced __init___block@0.ops[8]: 'v-load tmp%0#0' with 'l-load tmp%0#0' debug: Found 1 edge set/s for test_cases.state_proxies.contract.StateProxyContract.approval_program debug: Found 2 edge set/s for test_cases.state_proxies.contract.StateProxyContract.__puya_arc4_router__ info: Writing state_proxies/out/StateProxyContract.arc32.json +info: Writing state_proxies/out/StateProxyContract.arc56.json info: Writing state_proxies/out/StateProxyContract.approval.teal info: Writing state_proxies/out/StateProxyContract.clear.teal info: Writing state_proxies/out/StateProxyContract.approval.bin diff --git a/test_cases/state_totals/out/Contract.arc56.json b/test_cases/state_totals/out/Contract.arc56.json new file mode 100644 index 0000000000..cc55387b27 --- /dev/null +++ b/test_cases/state_totals/out/Contract.arc56.json @@ -0,0 +1,85 @@ +{ + "arcs": [ + 22, + 28 + ], + "name": "Contract", + "structs": {}, + "methods": [], + "state": { + "schema": { + "global": { + "ints": 3, + "bytes": 1 + }, + "local": { + "ints": 1, + "bytes": 1 + } + }, + "keys": { + "global": { + "global_one": { + "keyType": "AVMString", + "valueType": "AVMBytes", + "key": "Z2xvYmFsX29uZQ==" + } + }, + "local": { + "local_one": { + "keyType": "AVMString", + "valueType": "AVMUint64", + "key": "bG9jYWxfb25l" + } + }, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "events": [], + "templateVariables": {}, + "networks": {}, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 21 + ], + "errorMessage": "is creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLnN0YXRlX3RvdGFscy5jb250cmFjdC5Db250cmFjdC5hcHByb3ZhbF9wcm9ncmFtOgogICAgY2FsbHN1YiBfX3B1eWFfYXJjNF9yb3V0ZXJfXwogICAgcmV0dXJuCgoKLy8gdGVzdF9jYXNlcy5zdGF0ZV90b3RhbHMuY29udHJhY3QuQ29udHJhY3QuX19wdXlhX2FyYzRfcm91dGVyX18oKSAtPiB1aW50NjQ6Cl9fcHV5YV9hcmM0X3JvdXRlcl9fOgogICAgLy8gc3RhdGVfdG90YWxzL2NvbnRyYWN0LnB5OjYtOQogICAgLy8gY2xhc3MgQ29udHJhY3QoCiAgICAvLyAgICAgYXJjNC5BUkM0Q29udHJhY3QsCiAgICAvLyAgICAgc3RhdGVfdG90Y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ncmFtOgogICAgcHVzaGludCAxIC8vIDEKICAgIHJldHVybgo=" + }, + "byteCode": { + "approval": "CogAAUOKAAExG0AADDEZQAAHMRgURIEBiYEAiQ==", + "clear": "CoEBQw==" + }, + "compilerInfo": { + "compiler": "puya", + "compilerVersion": { + "major": 99, + "minor": 99, + "patch": 99 + } + } +} \ No newline at end of file diff --git a/test_cases/state_totals/puya.log b/test_cases/state_totals/puya.log index fdb99bd746..f5ba019f31 100644 --- a/test_cases/state_totals/puya.log +++ b/test_cases/state_totals/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['state_totals'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['state_totals'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing state_totals/out/module.awst debug: Sealing block@0: // L12 @@ -613,6 +613,7 @@ debug: Inserted __puya_arc4_router___create@3.ops[5]: 'l-store-copy tmp%4#0 0' debug: Replaced __puya_arc4_router___create@3.ops[7]: 'v-load tmp%4#0' with 'l-load tmp%4#0' debug: Found 1 edge set/s for test_cases.state_totals.contract.Contract.__puya_arc4_router__ info: Writing state_totals/out/Contract.arc32.json +info: Writing state_totals/out/Contract.arc56.json info: Writing state_totals/out/Contract.approval.teal info: Writing state_totals/out/Contract.clear.teal info: Writing state_totals/out/Contract.approval.bin diff --git a/test_cases/stress_tests/puya.log b/test_cases/stress_tests/puya.log index 5a3894b264..019260f70a 100644 --- a/test_cases/stress_tests/puya.log +++ b/test_cases/stress_tests/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['stress_tests'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['stress_tests'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing stress_tests/out/module.awst debug: Sealing block@0: // L12 diff --git a/test_cases/string_ops/puya.log b/test_cases/string_ops/puya.log index ff48d6b41d..735766ef63 100644 --- a/test_cases/string_ops/puya.log +++ b/test_cases/string_ops/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['string_ops'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['string_ops'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing string_ops/out/module.awst debug: Sealing block@0: // L12 diff --git a/test_cases/stubs/puya.log b/test_cases/stubs/puya.log index 9aa4921bc1..d13237c7c6 100644 --- a/test_cases/stubs/puya.log +++ b/test_cases/stubs/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['stubs'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['stubs'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing stubs/out/module.awst debug: Sealing block@0: // L12 diff --git a/test_cases/template_variables/out/TemplateVariablesContract.arc56.json b/test_cases/template_variables/out/TemplateVariablesContract.arc56.json new file mode 100644 index 0000000000..47162456a9 --- /dev/null +++ b/test_cases/template_variables/out/TemplateVariablesContract.arc56.json @@ -0,0 +1,148 @@ +{ + "arcs": [ + 22, + 28 + ], + "name": "TemplateVariablesContract", + "structs": {}, + "methods": [ + { + "name": "get_bytes", + "args": [], + "returns": { + "type": "byte[]" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "get_big_uint", + "args": [], + "returns": { + "type": "uint512" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [ + "DeleteApplication", + "UpdateApplication" + ] + }, + "events": [], + "templateVariables": { + "SOME_BYTES": { + "type": "AVMBytes", + "value": "" + }, + "SOME_BIG_UINT": { + "type": "AVMBytes", + "value": "" + }, + "UPDATABLE": { + "type": "AVMUint64", + "value": "AAAAAAAAAAA=" + }, + "DELETABLE": { + "type": "AVMUint64", + "value": "AAAAAAAAAAA=" + } + }, + "networks": {}, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 55, + 79 + ], + "errorMessage": "OnCompletion is NoOp" + }, + { + "pc": [ + 113 + ], + "errorMessage": "is creating" + }, + { + "pc": [ + 58, + 82, + 118, + 126 + ], + "errorMessage": "is not creating" + }, + { + "pc": [ + 147 + ], + "errorMessage": "overflow" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLnRlbXBsYXRlX3ZhcmlhYmxlcy5jb250cmFjdC5UZW1wbGF0ZVZhcmlhYmxlc0NvbnRyYWN0LmFwcHJvdmFsX3Byb2dyYW06CiAgICBpbnRjYmxvY2sgMSAwIDY0IFRNUExfVVBEQVRBQkxFIFRNUExfREVMRVRBQkxFCiAgICBieXRlY2Jsb2NrIDB4MTUxZjdjNzUgVE1QTF9TT01FX0JZVEVTIFRNUExfU09NRV9CSUdfVUlOVAogICAgY2FsbHN1YiBfX3B1eWFfYXJjNF9yb3V0ZXJfXwogICAgcmV0dXJuCgoKLy8gdGVzdF9jYXNlcy50ZW1wbGF0ZV92YXJpYWJsZXMuY29udHJhY3QuVGVtcGxhdGVWYXJpYWJsZXNDb250cmFjdC5fX3B1eWFfYXJjNF9yb3V0ZXJfXygpIC0+IHVpbnQ2NDoKX19wdXlhX2FyYzRfcm91dGVyX186CiAgICAvLyB0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gogICAgLy8gdGVtcGxhdGVfdmFyaWFibGVzL2NvbnRyYWN0LnB5OjE5LTIwCiAgICAvLyBAYXJjNC5iYXJlbWV0aG9kKGFsbG93X2FjdGlvbnM9WyJEZWxldGVBcHBsaWNhdGlvbiJdKQogICAgLy8gZGVmIG9uX2RlbGV0ZShzZWxmKSAtPiBOb25lOgogICAgcHJvdG8gMCAwCiAgICAvLyB0ZW1wbGF0ZV92YXJpYWJsZXMvY29udHJhY3QucHk6MjEKICAgIC8vIGFzc2VydCBUZW1wbGF0ZVZhcltVSW50NjRdKCJERUxFVEFCTEUiKQogICAgaW50YyA0IC8vIFRNUExfREVMRVRBQkxFCiAgICBhc3NlcnQKICAgIHJldHN1Ygo=", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLnRlbXBsYXRlX3ZhcmlhYmxlcy5jb250cmFjdC5UZW1wbGF0ZVZhcmlhYmxlc0NvbnRyYWN0LmNsZWFyX3N0YXRlX3Byb2dyYW06CiAgICBwdXNoaW50IDEgLy8gMQogICAgcmV0dXJuCg==" + }, + "byteCode": { + "approval": "CiAFAQBAAAAmAwQVH3x1AACIAAFDigABMRtBAD+CAgQvyt32BDf2TPM2GgCOAgACABojiTEZFEQxGESIAEhJFRZXBgJMUChMULAiiTEZFEQxGESIADUoTFCwIokxGY0GAAIAGAAYABgACAAQI4kxGBREIokxGESIAB4iiTEYRIgAHCKJI4mKAAEpiYoAASpJFSQORCSvq4mKAAAlRImKAAAhBESJ", + "clear": "CoEBQw==" + }, + "compilerInfo": { + "compiler": "puya", + "compilerVersion": { + "major": 99, + "minor": 99, + "patch": 99 + } + } +} \ No newline at end of file diff --git a/test_cases/template_variables/puya.log b/test_cases/template_variables/puya.log index 75ce877b7c..fb6f2f7eec 100644 --- a/test_cases/template_variables/puya.log +++ b/test_cases/template_variables/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={'SOME_BYTES': b'', 'SOME_BIG_UINT': b'', 'UPDATABLE': 0, 'DELETABLE': 0}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['template_variables'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={'SOME_BYTES': b'', 'SOME_BIG_UINT': b'', 'UPDATABLE': 0, 'DELETABLE': 0}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['template_variables'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing template_variables/out/module.awst debug: Sealing block@0: // L12 @@ -722,6 +722,7 @@ debug: Inserted get_big_uint_block@0.ops[4]: 'l-store-copy x#0 0' debug: Replaced get_big_uint_block@0.ops[19]: 'v-load x#0' with 'l-load x#0' debug: Found 3 edge set/s for test_cases.template_variables.contract.TemplateVariablesContract.__puya_arc4_router__ info: Writing template_variables/out/TemplateVariablesContract.arc32.json +info: Writing template_variables/out/TemplateVariablesContract.arc56.json info: Writing template_variables/out/TemplateVariablesContract.approval.teal info: Writing template_variables/out/TemplateVariablesContract.clear.teal info: Writing template_variables/out/TemplateVariablesContract.approval.bin diff --git a/test_cases/too_many_permutations/puya.log b/test_cases/too_many_permutations/puya.log index 3071ef21b3..5a0333e4d6 100644 --- a/test_cases/too_many_permutations/puya.log +++ b/test_cases/too_many_permutations/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['too_many_permutations'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['too_many_permutations'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing too_many_permutations/out/module.awst debug: Sealing block@0: // L12 diff --git a/test_cases/transaction/out/TransactionContract.arc56.json b/test_cases/transaction/out/TransactionContract.arc56.json new file mode 100644 index 0000000000..a8e5ab00a4 --- /dev/null +++ b/test_cases/transaction/out/TransactionContract.arc56.json @@ -0,0 +1,747 @@ +{ + "arcs": [ + 22, + 28 + ], + "name": "TransactionContract", + "structs": {}, + "methods": [ + { + "name": "create", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "pay", + "args": [ + { + "type": "pay", + "name": "txn" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "key", + "args": [ + { + "type": "keyreg", + "name": "txn" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "asset_config", + "args": [ + { + "type": "acfg", + "name": "txn" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "asset_transfer", + "args": [ + { + "type": "axfer", + "name": "txn" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "asset_freeze", + "args": [ + { + "type": "afrz", + "name": "txn" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "application_call", + "args": [ + { + "type": "appl", + "name": "txn" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "multiple_txns", + "args": [ + { + "type": "appl", + "name": "txn1" + }, + { + "type": "appl", + "name": "txn2" + }, + { + "type": "appl", + "name": "txn3" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "any_txn", + "args": [ + { + "type": "txn", + "name": "txn1" + }, + { + "type": "txn", + "name": "txn2" + }, + { + "type": "txn", + "name": "txn3" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "group_init", + "args": [ + { + "type": "txn", + "name": "txn1" + }, + { + "type": "txn", + "name": "txn2" + }, + { + "type": "txn", + "name": "txn3" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [], + "call": [] + }, + "events": [], + "templateVariables": {}, + "networks": {}, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 101, + 111, + 133, + 155, + 177, + 200, + 223, + 246, + 291, + 315 + ], + "errorMessage": "OnCompletion is NoOp" + }, + { + "pc": [ + 362 + ], + "errorMessage": "Payment should be for >1000 micro algos" + }, + { + "pc": [ + 353 + ], + "errorMessage": "Payment should be for this app" + }, + { + "pc": [ + 752 + ], + "errorMessage": "accounts(0)" + }, + { + "pc": [ + 743 + ], + "errorMessage": "app_args(0)" + }, + { + "pc": [ + 658 + ], + "errorMessage": "app_id" + }, + { + "pc": [ + 679 + ], + "errorMessage": "approval_program" + }, + { + "pc": [ + 771 + ], + "errorMessage": "approval_program_pages(0)" + }, + { + "pc": [ + 764 + ], + "errorMessage": "apps(0)" + }, + { + "pc": [ + 593 + ], + "errorMessage": "asset_amount" + }, + { + "pc": [ + 617 + ], + "errorMessage": "asset_close_to" + }, + { + "pc": [ + 530 + ], + "errorMessage": "asset_name" + }, + { + "pc": [ + 609 + ], + "errorMessage": "asset_receiver" + }, + { + "pc": [ + 601 + ], + "errorMessage": "asset_sender" + }, + { + "pc": [ + 758 + ], + "errorMessage": "assets(0)" + }, + { + "pc": [ + 574 + ], + "errorMessage": "clawback" + }, + { + "pc": [ + 685 + ], + "errorMessage": "clear_state_program" + }, + { + "pc": [ + 778 + ], + "errorMessage": "clear_state_program_pages(0)" + }, + { + "pc": [ + 370 + ], + "errorMessage": "close_remainder_to" + }, + { + "pc": [ + 503 + ], + "errorMessage": "config_asset" + }, + { + "pc": [ + 513 + ], + "errorMessage": "decimals" + }, + { + "pc": [ + 518 + ], + "errorMessage": "default_frozen" + }, + { + "pc": [ + 720 + ], + "errorMessage": "extra_program_pages" + }, + { + "pc": [ + 393 + ], + "errorMessage": "fee" + }, + { + "pc": [ + 423 + ], + "errorMessage": "first_valid" + }, + { + "pc": [ + 566 + ], + "errorMessage": "freeze" + }, + { + "pc": [ + 639 + ], + "errorMessage": "freeze_account" + }, + { + "pc": [ + 631 + ], + "errorMessage": "freeze_asset" + }, + { + "pc": [ + 644 + ], + "errorMessage": "frozen" + }, + { + "pc": [ + 705 + ], + "errorMessage": "global_num_bytes" + }, + { + "pc": [ + 700 + ], + "errorMessage": "global_num_uint" + }, + { + "pc": [ + 418 + ], + "errorMessage": "group_index" + }, + { + "pc": [ + 105 + ], + "errorMessage": "is creating" + }, + { + "pc": [ + 114, + 136, + 158, + 180, + 203, + 226, + 249, + 294, + 318 + ], + "errorMessage": "is not creating" + }, + { + "pc": [ + 726 + ], + "errorMessage": "last_log" + }, + { + "pc": [ + 428 + ], + "errorMessage": "last_valid" + }, + { + "pc": [ + 434 + ], + "errorMessage": "lease" + }, + { + "pc": [ + 715 + ], + "errorMessage": "local_num_bytes" + }, + { + "pc": [ + 710 + ], + "errorMessage": "local_num_uint" + }, + { + "pc": [ + 550 + ], + "errorMessage": "manager" + }, + { + "pc": [ + 542 + ], + "errorMessage": "metadata_hash" + }, + { + "pc": [ + 483 + ], + "errorMessage": "non_participation" + }, + { + "pc": [ + 412 + ], + "errorMessage": "note" + }, + { + "pc": [ + 673 + ], + "errorMessage": "num_accounts" + }, + { + "pc": [ + 668 + ], + "errorMessage": "num_app_args" + }, + { + "pc": [ + 731 + ], + "errorMessage": "num_approval_program_pages" + }, + { + "pc": [ + 695 + ], + "errorMessage": "num_apps" + }, + { + "pc": [ + 690 + ], + "errorMessage": "num_assets" + }, + { + "pc": [ + 736 + ], + "errorMessage": "num_clear_state_program_pages" + }, + { + "pc": [ + 663 + ], + "errorMessage": "on_completion" + }, + { + "pc": [ + 442 + ], + "errorMessage": "rekey_to" + }, + { + "pc": [ + 558 + ], + "errorMessage": "reserve" + }, + { + "pc": [ + 463 + ], + "errorMessage": "selection_key" + }, + { + "pc": [ + 388 + ], + "errorMessage": "sender" + }, + { + "pc": [ + 489 + ], + "errorMessage": "state_proof_key" + }, + { + "pc": [ + 508 + ], + "errorMessage": "total" + }, + { + "pc": [ + 168 + ], + "errorMessage": "transaction type is acfg" + }, + { + "pc": [ + 214 + ], + "errorMessage": "transaction type is afrz" + }, + { + "pc": [ + 237, + 260, + 271, + 282 + ], + "errorMessage": "transaction type is appl" + }, + { + "pc": [ + 191 + ], + "errorMessage": "transaction type is axfer" + }, + { + "pc": [ + 146 + ], + "errorMessage": "transaction type is keyreg" + }, + { + "pc": [ + 124 + ], + "errorMessage": "transaction type is pay" + }, + { + "pc": [ + 380 + ], + "errorMessage": "txn_id" + }, + { + "pc": [ + 398 + ], + "errorMessage": "type" + }, + { + "pc": [ + 404 + ], + "errorMessage": "type_bytes" + }, + { + "pc": [ + 524 + ], + "errorMessage": "unit_name" + }, + { + "pc": [ + 536 + ], + "errorMessage": "url" + }, + { + "pc": [ + 473 + ], + "errorMessage": "vote_first" + }, + { + "pc": [ + 457 + ], + "errorMessage": "vote_key" + }, + { + "pc": [ + 468 + ], + "errorMessage": "vote_key_dilution" + }, + { + "pc": [ + 478 + ], + "errorMessage": "vote_last" + }, + { + "pc": [ + 588 + ], + "errorMessage": "xfer_asset" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLnRyYW5zYWN0aW9uLmNvbnRyYWN0LlRyYW5zYWN0aW9uQ29udHJhY3QuYXBwcm92YWxfcHJvZ3JhbToKICAgIGludGNibG9jayAxIDAgMiAzCiAgICBjYWxsc3ViIF9fcHV5YV9hcmM0X3JvdXRlcl9fCiAgICByZXR1cm4KCgovLyB0ZXN0X2Nhc2VzLnRyYW5zYWN0aW9uLmNvbnRyYWN0LlRyYW5zYWN0aW9uQ29udHJhY3QuX19wdXlhX2FyYzRfcm91dGVyX18oKSAtPiB1aW50NjQ6Cl9fcHV5YV9hcmM0X3JvdXRlcl9fOgogICAgLy8gdHJhbnNhY3Rpb24vY29udHJhY3QucHk6MTEKICAgIC8vIGNsYXNzIFRyYW5zYWN0aW9uQ29udHJhY3QoYXJjNC5BUkM0Q29udHJhY3QpOgogICAgcHJvdG8gMCAxCiAgICB0eG4gTnVtQXBwQXJncwogICAgYnogX19wdXlhX2FyYzRfcm91dGVyX19fYWZ0ZXJfaWZfZWxzZUAxNQogICAgcHVzaGJ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RIv/OAREi/84BhVEi/84IDIDEkSJigEAi/+I/7CL/zgKFUSL/zgLFUSL/zgORIv/OAxEi/84DUSL/zg5RIv/OD8VRImKAQCL/4j/gYv/OCFEi/84IkSL/zgjRIv/OCREi/84JRVEi/84JhVEi/84JxVEi/84KBVEi/84KTIDE0SL/zgqMgMTRIv/OCsyAxNEi/84LDIDE0SJigEAi/+I/yyL/zgRRIv/OBJEi/84EzIDE0SL/zgUMgMTRIv/OBUyAxNEiYoBAIv/iP8Bi/84LUSL/zguMgMTRIv/OC9EiYoBAIv/iP7mi/84GESL/zgZRIv/OBtEi/84HUSL/zgeFUSL/zgfFUSL/zgxRIv/ODNEi/84NESL/zg1RIv/ODZEi/84N0SL/zg4RIv/OD4VRIv/OEFEi/84Q0SL/yPCGhVEi/8jwhwyAxNEi/8jwjBEi/8jwjJEi/8jwkAVRIv/I8JCFUSJigMAi/0jTDgWSwESRI0CAAEAB4mL/iJC/+yL/yRC/+aKAwCL/SNMOBZLARJEjQIAAQAHiYv+IkL/7Iv/JEL/5ooDAIv9I0xJOBZMOBdMOBcSRI0CAAMACUIADIv+IkL/5Yv/JEL/34v9OBcjOBcSRIk=", + "clear": "CoEBQw==" + }, + "compilerInfo": { + "compiler": "puya", + "compilerVersion": { + "major": 99, + "minor": 99, + "patch": 99 + } + } +} \ No newline at end of file diff --git a/test_cases/transaction/puya.log b/test_cases/transaction/puya.log index cf1ce113aa..dd395c4a8f 100644 --- a/test_cases/transaction/puya.log +++ b/test_cases/transaction/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['transaction'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['transaction'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing transaction/out/module.awst debug: Sealing block@0: // L12 @@ -1553,6 +1553,7 @@ debug: shared x-stack for group_init_block@0 -> group_init_for_body@1: txn#1, lo debug: shared x-stack for group_init_for_header_1@3 -> group_init_for_body@1: txn#1, loop_counter%0#0 debug: shared x-stack for group_init_for_header_2@4 -> group_init_for_body@1: txn#1, loop_counter%0#0 info: Writing transaction/out/TransactionContract.arc32.json +info: Writing transaction/out/TransactionContract.arc56.json info: Writing transaction/out/TransactionContract.approval.teal info: Writing transaction/out/TransactionContract.clear.teal info: Writing transaction/out/TransactionContract.approval.bin diff --git a/test_cases/tuple_support/out/NestedTuples.arc56.json b/test_cases/tuple_support/out/NestedTuples.arc56.json new file mode 100644 index 0000000000..1cc11bd88c --- /dev/null +++ b/test_cases/tuple_support/out/NestedTuples.arc56.json @@ -0,0 +1,217 @@ +{ + "arcs": [ + 22, + 28 + ], + "name": "NestedTuples", + "structs": { + "Child": [ + { + "name": "a", + "type": "uint64" + }, + { + "name": "b", + "type": "byte[]" + }, + { + "name": "c", + "type": "string" + } + ], + "Parent": [ + { + "name": "foo", + "type": "uint64" + }, + { + "name": "foo_arc", + "type": "uint64" + }, + { + "name": "child", + "type": "Child" + } + ] + }, + "methods": [ + { + "name": "run_tests", + "args": [], + "returns": { + "type": "bool" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "nested_tuple_params", + "args": [ + { + "type": "(string,(byte[],(uint64)))", + "name": "args" + } + ], + "returns": { + "type": "(byte[],(string,uint64))" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "named_tuple", + "args": [ + { + "type": "(uint64,byte[],string)", + "struct": "Child", + "name": "args" + } + ], + "returns": { + "type": "(uint64,byte[],string)", + "struct": "Child" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "nested_named_tuple_params", + "args": [ + { + "type": "(uint64,uint64,(uint64,byte[],string))", + "struct": "Parent", + "name": "args" + } + ], + "returns": { + "type": "(uint64,uint64,(uint64,byte[],string))", + "struct": "Parent" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "state": { + "schema": { + "global": { + "ints": 1, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": { + "build_nested_call_count": { + "keyType": "AVMString", + "valueType": "AVMUint64", + "key": "YnVpbGRfbmVzdGVkX2NhbGxfY291bnQ=" + } + }, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "events": [], + "templateVariables": {}, + "networks": {}, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 113, + 136, + 256, + 357 + ], + "errorMessage": "OnCompletion is NoOp" + }, + { + "pc": [ + 828, + 839 + ], + "errorMessage": "check self.build_nested_call_count exists" + }, + { + "pc": [ + 500 + ], + "errorMessage": "is creating" + }, + { + "pc": [ + 116, + 139, + 259, + 360 + ], + "errorMessage": "is not creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLnR1cGxlX3N1cHBvcnQubmVzdGVkX3R1cGxlcy5OZXN0ZWRUdXBsZXMuYXBwcm92YWxfcHJvZ3JhbToKICAgIGludGNibG9jayAxIDIgMCAzCiAgICBieXRlY2Jsb2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ogICAgZXh0cmFjdF91aW50MTYKICAgIGRpZyAzCiAgICB1bmNvdmVyIDIKICAgIGRpZyAyCiAgICBzdWJzdHJpbmczCiAgICBleHRyYWN0IDIgMAogICAgZGlnIDMKICAgIGxlbgogICAgdW5jb3ZlciA0CiAgICB1bmNvdmVyIDMKICAgIHVuY292ZXIgMgogICAgc3Vic3RyaW5nMwogICAgZXh0cmFjdCAyIDAKICAgIC8vIHR1cGxlX3N1cHBvcnQvbmVzdGVkX3R1cGxlcy5weTo1OAogICAgLy8gQGFyYzQuYWJpbWV0aG9kKCkKICAgIGNhbGxzdWIgbmFtZWRfdHVwbGUKICAgIHVuY292ZXIgMgogICAgaXRvYgogICAgZGlnIDIKICAgIGxlbgogICAgaXRvYgogICAgZXh0cmFjdCA2IDIKICAgIHVuY292ZXIgMwogICAgY29uY2F0CiAgICBkaWcgMgogICAgbGVuCiAgICBpdG9iCiAgICBleHRyYWN0IDYgMgogICAgdW5jb3ZlciAzCiAgICBjb25jYXQKICAgIHVuY292ZXIgMgogICAgYnl0ZWMgNCAvLyAweDAwMGMKICAgIGNvbmNhdAogICAgZGlnIDIKICAgIGxlbgogICAgcHVzaGludCAxMiAvLyAxMgogICAgKwogICAgaXRvYgogICAgZXh0cmFjdCA2IDIKICAgIGNvbmNhdAogICAgdW5jb3ZlciAyCiAgICBjb25jYXQKICAgIHN3YXAKICAgIGNvbmNhdAogICAgYnl0ZWNfMiAvLyAweDE1MWY3Yzc1CiAgICBzd2FwCiAgICBjb25jYXQKICAgIGxvZwogICAgaW50Y18wIC8vIDEKICAgIHJldHN1YgoKX19wdXlhX2FyYzRfcm91dGVyX19fbmVzdGVkX25hbWVkX3R1cGxlX3BhcmFtc19yb3V0ZUA1OgogICAgLy8gdHVwbGVfc3VwcG9ydC9uZXN0ZWRfdHVwbGVzLnB5OjYzCiAgICAvLyBAYXJjNC5hYmltZXRob2QoKQogICAgdHhuIE9uQ29tcGxldGlvbgogICAgIQogICAgYXNzZXJ0IC8vIE9uQ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YiBuZXN0ZWRfbmFtZWRfdHVwbGVfcGFyYW1zCiAgICB1bmNvdmVyIDQKICAgIGl0b2IKICAgIHVuY292ZXIgMwogICAgaXRvYgogICAgZGlnIDMKICAgIGxlbgogICAgaXRvYgogICAgZXh0cmFjdCA2IDIKICAgIHVuY292ZXIgNAogICAgY29uY2F0CiAgICBkaWcgMwogICAgbGVuCiAgICBpdG9iCiAgICBleHRyYWN0IDYgMgogICAgdW5jb3ZlciA0CiAgICBjb25jYXQKICAgIHVuY292ZXIgMgogICAgYnl0ZWMgNCAvLyAweDAwMGMKICAgIGNvbmNhdAogICAgZGlnIDIKICAgIGxlbgogICAgcHVzaGludCAxMiAvLyAxMgogICAgKwogICAgaXRvYgogICAgZXh0cmFjdCA2IDIKICAgIGNvbmNhdAogICAgdW5jb3ZlciAyCiAgICBjb25jYXQKICAgIHN3YXAKICAgIGNvbmNhdAogICAgc3dhcAogICAgdW5jb3ZlciAyCiAgICBjb25jYXQKICAgIHB1c2hieXRlcyAweDAwMTIKICAgIGNvbmNhdAogICAgc3dhcAogICAgY29uY2F0CiAgICBieXRlY18yIC8vIDB4MTUxZjdjNzUKICAgIHN3YXAKICAgIGNvbmNhdAogICAgbG9nCiAgICBpbnRjXzAgLy8gMQogICAgcmV0c3ViCgpfX3B1eWFfYXJjNF9yb3V0ZXJfX19iYXJlX3JvdXRpbmdAODoKICAgIC8vIHR1cGxlX3N1cHBvcnQvbmVzdGVkX3R1cGxlcy5weToxOAogICAgLy8gY2xhc3MgTmVzdGVkVHVwbGVzKEFSQzRDb250cmFjdCk6CiAgICB0eG4gT25Db21wbGV0aW9uCiAgICBibnogX19wdXlhX2FyYzRfcm91dGVyX19fYWZ0ZXJfaWZfZWxzZUAxMgogICAgdHhuIEFwcGxpY2F0aW9uSUQKICAgICEKICAgIGFzc2VydCAvLyBpcyBjcmVhdGluZwogICAgaW50Y18wIC8vIDEKICAgIHJldHN1YgoKX19wdXlhX2FyYzRfcm91dGVyX19fYWZ0ZXJfa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sDFU8ETgJSSVcACBdLAYEIWUsCgQpZSwNPAksCUlcCAEsDFU8ETwNPAlJXAgCIAb9PBBZPAxZLAxUWVwYCTwRQSwMVFlcGAk8EUE8CJwRQSwIVgQwIFlcGAlBPAlBMUExPAlCAAgASUExQKkxQsCKJMRlAAAYxGBREIokkiYoAASgriAA/TCsSTCgSEEQoJCMiKCtJiAA1TwQoEk8EFBBETwIjEk8CIhIQRCsSRCIjiAAoIkmIADwiJIgAN4gAd4gA7CKJigICi/+L/omKBwWL/Yv6i/uL/Iv+iYoCAIv+i/8eTBSL/ov/CE8CEkoQRExERImKAgAkI4v+IhJEi/6L/0EACyWMAIEEjAKBBYwBi/8lC4sAEkQjgQWL/02LAUsBEkSLAklOAov+CBJEIoEEi/9NEkSJigAAgAAkIiMkiwJPAgiLAQiMAY0DAAMADAAVQgAbIiOMAiJMQv/iIyKMAiJMQv/ZJSOMAiNMQv/QJCKMACNMiwBPAgiLAQiMAY0DAAMADAAVQgAbIiOMACJMQv/iIyKMACJMQv/ZJSOMACNMQv/QiwGBCAolEkSJigAAKSRniAAORgInBRJEJCllRCISRImKAAMkKWVEIggpTGcnBSKABGhtbW2JigMDi/6L/Yv/iYoDA4v9i/6L/4mKBQWL+4v8i/2L/ov/iYoAACkkZ4k=", + "clear": "CoEBQw==" + }, + "compilerInfo": { + "compiler": "puya", + "compilerVersion": { + "major": 99, + "minor": 99, + "patch": 99 + } + } +} \ No newline at end of file diff --git a/test_cases/tuple_support/out/client_NestedTuples.py b/test_cases/tuple_support/out/client_NestedTuples.py index 6f8f9c9a3b..13e87db8ae 100644 --- a/test_cases/tuple_support/out/client_NestedTuples.py +++ b/test_cases/tuple_support/out/client_NestedTuples.py @@ -30,10 +30,10 @@ def nested_tuple_params( def named_tuple( self, args: Child, - ) -> Child: ... + ) -> algopy.arc4.Tuple[algopy.arc4.UIntN[typing.Literal[64]], algopy.arc4.DynamicBytes, algopy.arc4.String]: ... @algopy.arc4.abimethod def nested_named_tuple_params( self, args: Parent, - ) -> Parent: ... + ) -> algopy.arc4.Tuple[algopy.arc4.UIntN[typing.Literal[64]], algopy.arc4.UIntN[typing.Literal[64]], algopy.arc4.Tuple[algopy.arc4.UIntN[typing.Literal[64]], algopy.arc4.DynamicBytes, algopy.arc4.String]]: ... diff --git a/test_cases/tuple_support/puya.log b/test_cases/tuple_support/puya.log index c792efced9..8c073d5148 100644 --- a/test_cases/tuple_support/puya.log +++ b/test_cases/tuple_support/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['tuple_support'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['tuple_support'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing tuple_support/out/module.awst debug: Sealing block@0: // L12 @@ -6287,6 +6287,7 @@ info: Writing tuple_support/out/TupleComparisons.clear.bin info: Writing tuple_support/out/TupleComparisons.approval.puya.map info: Writing tuple_support/out/TupleComparisons.clear.puya.map info: Writing tuple_support/out/NestedTuples.arc32.json +info: Writing tuple_support/out/NestedTuples.arc56.json info: Writing tuple_support/out/NestedTuples.approval.teal info: Writing tuple_support/out/NestedTuples.clear.teal info: Writing tuple_support/out/NestedTuples.approval.bin diff --git a/test_cases/typed_abi_call/out/Greeter.arc56.json b/test_cases/typed_abi_call/out/Greeter.arc56.json new file mode 100644 index 0000000000..6ba9d8b8d0 --- /dev/null +++ b/test_cases/typed_abi_call/out/Greeter.arc56.json @@ -0,0 +1,534 @@ +{ + "arcs": [ + 22, + 28 + ], + "name": "Greeter", + "structs": {}, + "methods": [ + { + "name": "test_is_a_b", + "args": [ + { + "type": "byte[]", + "name": "a" + }, + { + "type": "byte[]", + "name": "b" + }, + { + "type": "application", + "name": "app" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "test_method_selector_kinds", + "args": [ + { + "type": "application", + "name": "app" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "test_method_overload", + "args": [ + { + "type": "application", + "name": "app" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "test_arg_conversion", + "args": [ + { + "type": "application", + "name": "app" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "test_15plus_args", + "args": [ + { + "type": "application", + "name": "app" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "test_void", + "args": [ + { + "type": "application", + "name": "app" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "test_ref_types", + "args": [ + { + "type": "application", + "name": "app" + }, + { + "type": "asset", + "name": "asset" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "test_native_string", + "args": [ + { + "type": "application", + "name": "app" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "test_native_bytes", + "args": [ + { + "type": "application", + "name": "app" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "test_native_uint64", + "args": [ + { + "type": "application", + "name": "app" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "test_native_biguint", + "args": [ + { + "type": "application", + "name": "app" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "test_native_tuple", + "args": [ + { + "type": "application", + "name": "app" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "test_native_tuple_method_ref", + "args": [ + { + "type": "application", + "name": "app" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "test_nested_tuples", + "args": [ + { + "type": "application", + "name": "app" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "test_no_args", + "args": [ + { + "type": "application", + "name": "app" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "test_named_tuples", + "args": [ + { + "type": "application", + "name": "app" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "events": [], + "templateVariables": {}, + "networks": {}, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 909, + 965, + 1021, + 1077, + 1133, + 1197, + 1210, + 1286, + 1353, + 1371, + 1416, + 1800, + 2077, + 2125, + 2165, + 2207, + 2255, + 2295, + 2336, + 2374, + 2411, + 2450, + 2487, + 2523, + 2572, + 2683, + 2730, + 2777, + 2883, + 2990, + 3097, + 3204, + 3305, + 3441, + 3617, + 3790, + 3824, + 3852, + 3865, + 3910, + 3967 + ], + "errorMessage": "ARC4 prefix is valid" + }, + { + "pc": [ + 503, + 533, + 551, + 569, + 587, + 605, + 623, + 647, + 665, + 683, + 701, + 719, + 737, + 755, + 773, + 791 + ], + "errorMessage": "OnCompletion is NoOp" + }, + { + "pc": [ + 2037 + ], + "errorMessage": "application exists" + }, + { + "pc": [ + 2029 + ], + "errorMessage": "asset exists" + }, + { + "pc": [ + 3161 + ], + "errorMessage": "expected arc4 arguments to give the same result" + }, + { + "pc": [ + 3054 + ], + "errorMessage": "expected native arguments to give the same result" + }, + { + "pc": [ + 814 + ], + "errorMessage": "is creating" + }, + { + "pc": [ + 506, + 536, + 554, + 572, + 590, + 608, + 626, + 650, + 668, + 686, + 704, + 722, + 740, + 758, + 776, + 794 + ], + "errorMessage": "is not creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLnR5cGVkX2FiaV9jYWxsLnR5cGVkX2MyYy5HcmVldGVyLmFwcHJvdmFsX3Byb2dyYW06CiAgICBpbnRjYmxvY2sgMCA2IDEgMgogICAgYnl0ZWNibG9jayAweDE1MWY3Yzc1IDB4MDAwMDAwMDAwMDAwMDAwMDAwMDA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IHRlc3RfY2FzZXMudHlwZWRfYWJpX2NhbGwudHlwZWRfYzJjLkdyZWV0ZXIudGVzdF8xNXBsdXNfYXJncyhhcHA6IHVpbnQ2NCkgLT4gdm9pZDoKdGVzdF8xNXBsdXNfYXJnczoKICAgIC8vIHR5cGVkX2FiaV9jYWxsL3R5cGVkX2MyYy5weTo3Mi03MwogICAgLy8gQGFyYzQuYWJpbWV0aG9kKCkKICAgIC8vIGRlZiB0ZXN0XzE1cGx1c19hcmdzKHNlbGYsIGFwcDogQXBwbGljYXRpb24pIC0+IE5vbmU6CiAgICBwcm90byAxIDAKICAgIC8vIHR5cGVkX2FiaV9jYWxsL3R5cGVkX2MyYy5weTo3NC05NwogICAgLy8gcmVzdWx0LCB0eG4gPSBhcmM0LmFiaV9jYWxsKAogICAgLy8gICAgIExvZ2dlci5yZXR1cm5fYXJnc19hZnRlcl8xNHRoLAogICAgLy8gICAgIDEsCiAgICAvLyAgICAgMiwKICAgIC8vICAgICAzLAogICAgLy8gICAgIDQsCiAgICAvLyAgICAgNSwKICAgIC8vICAgICA2LAogICAgLy8gICAgIDcsCiAgICAvLyAgICAgOCwKICAgIC8vICAgICA5LAogICAgLy8gICAgIDEwLAogICAgLy8gICAgIDExLAogICAgLy8gICAgIDEyLAogICAgLy8gICAgIDEzLAogICAgLy8gICAgIDE0LAogICAgLy8gICAgIDE1LAogICAgLy8gICAgIDE2LAogICAgLy8gICAgIDE3LAogICAgLy8gICAgIDE4LAogICAgLy8gICAgIGFyYzQuVHVwbGUoKGFyYzQuVUludDgoMHhERSksIGFyYzQuVUludDgoMHhBRCksIGFyYzQuVUludDgoMHhCRSksIGFyYzQuVUludDgoMHhFRikpKSwKICAgIC8vICAgICAyMCwKICAgIC8vICAgICBhcHBfaWQ9YXBwLAogICAgLy8gKQogICAgaXR4bl9iZWdpbgogICAgZnJhbWVfZGlnIC0xCiAgICBpdHhuX2ZpZWxkIEFwcGxpY2F0aW9uSUQKICAgIHB1c2hieXRlcyAweGJhMG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XAAQoEkSADQALZWNobzogdGVzdDMSRLGL/7IYKrIagAcABXRlc3Q0shojshAisgGztD5JVwQATFcABCgSRIANAAtlY2hvOiB0ZXN0NBJEsYv/shgqshqABwAFdGVzdDWyGiOyECKyAbO0PklXBABMVwAEKBJEgA0AC2VjaG86IHRlc3Q1EkSJigEAsYv/shgqshqAEAAOdHlwZWQgKyBpZ25vcmWyGiOyECKyAbO0PlcABCgSRLQ+SVcEAExXAAQoEkSAFgAUZWNobzogdHlwZWQgKyBpZ25vcmUSRLGL/7IYKrIagBIAEHVudHlwZWQgKyBpZ25vcmWyGiOyECKyAbO0PklXBABMVwAEKBJEgBgAFmVjaG86IHVudHlwZWQgKyBpZ25vcmUSRLGL/7IYKrIagAcABXR1cGxlshojshAisgGztD5JVwQATFcABCgSRLQ+TCcUEkRJVwQATFcABCgSRCcUEkSxi/+yGCqyGoAJAAd1bnR5cGVkshojshAisgGztD5JVwQATFcABCgSRIAPAA1lY2hvOiB1bnR5cGVkEkSJigEAsYv/shgnB7IagAwACmNvbnZlcnRlZDGyGiOyECKyAbO0PoAKY29udmVydGVkMRJEsYv/shiABDwQWNmyGicVshojshAisgGztD4lFhJEsYv/shiABGr0WTCyGicWshojshAisgGztD4nFhJEsYv/shiABLUA4RGyGoADAAE0shojshAisgGztD6AATQSRLGL/7IYgARu7X7DshqAAYCyGiOyECKyAbO0PoAEVHJ1ZRJEiYoBALGL/7IYgAS6C0OBshorshonFbIaJwmyGoAIAAAAAAAAAASyGoAIAAAAAAAAAAWyGoAIAAAAAAAAAAayGoAIAAAAAAAAAAeyGoAIAAAAAAAAAAiyGoAIAAAAAAAAAAmyGoAIAAAAAAAAAAqyGoAIAAAAAAAAAAuyGoAIAAAAAAAAAAyyGoAIAAAAAAAAAA2yGoAIAAAAAAAAAA6yGicXshojshAisgGztD5JVwQATFcABCgSRFcCACcXEkSJigEAsYv/shgnB7IagAgABldvcmxkMbIaI7IQIrIBs7Q+gAZXb3JsZDESRLGL/7IYJweyGoAIAAZXb3JsZDKyGiOyECKyAbO0PoAGV29ybGQyEkSxi/+yGCcHshqACAAGV29ybGQzshojshAisgGztD6ABldvcmxkMxJEsYv/shgnB7IagAgABldvcmxkNLIaI7IQIrIBs7Q+gAZXb3JsZDQSRImKAgCxMgqL/rIYi/+yMIv+sjKyHIAEzXJ7cbIagAEAshqAAQGyGoABAbIaI7IQIrIBs7Q+i/9xBEQyClCL/nIIRFASRImKAQCxi/+yGCcKshonC7IaI7IQIrIBs7Q+SVcEAExXAAQoEkRXAgBJgAdlY2hvOiBzEkSxi/+yGCcKshonC7IaI7IQIrIBs7Q+SVcEAExXAAQoEkRXAgBLARJEsYv/shgnCrIaJwuyGiOyECKyAbO0PklXBABMVwAEKBJEVwIAEkSJigEAsYv/shgnDLIaJw2yGiOyECKyAbO0PklXBABMVwAEKBJEVwIASYAHZWNobzogYhJEsYv/shgnDLIaJw2yGiOyECKyAbO0PklXBABMVwAEKBJEVwIASwESRLGL/7IYJwyyGicNshojshAisgGztD5JVwQATFcABCgSRFcCABJEiYoBALGL/7IYJw6yGiuyGiOyECKyAbO0PklXBABMVwAEKBJEF0klEkSxJBaL/7IYJw6yGrIaI7IQIrIBs7Q+SVcEAExXAAQoEkQXSwESRLGL/7IYJw6yGiuyGiOyECKyAbO0PklXBABMVwAEKBJEFxJEiYoBALGL/7IYJw+yGimyGiOyECKyAbO0PklXBABMVwAEKBJESScQqESxi/+yGCcPshopshojshAisgGztD5JVwQATFcABCgSREsBqESxi/+yGCcPshopshojshAisgGztD5JVwQATFcABCgSRKhEiYoBALGL/7IYJwSyGicFshonBrIaK7IaKbIaI7IQIrIBs7Q+SVcEAExXAAQoEkRJIllLASVZSwJPAksCUksCFUsDTwNPAlJLAlcECEsDVwxATwNXAgBJJwgSRE8DVwIASScYEkRPAxdJJRJESwMnEKhEsSQWi/+yGCcEshonBbIaJwayGrIaKbIaI7IQIrIBs7Q+SVcEAExXAAQoEkRLBRJEsYv/shgnBLIaJwWyGicGshorshopshojshAisgGztD5JVwQATFcABCgSRE8FEkSxi/+yGCcEshonBbIaJwayGiuyGimyGiOyECKyAbO0PklXBABMVwAEKBJESSJZSwElWUsCTwJLAlJXAgBLAhVLA08DTwJSVwIASwJXBAgXTwNXDEBPBk8EEkRPBE8DEkROAhJEqESJigEAsYv/shgnBLIaJwWyGicGshorshopshojshAisgGztD5JVwQATFcABCgSREkiWUsBJVlLAk8CSwJSVwIASwIVSwNPA08CUlcCAEsCVwQIF08DVwxASwMnCBJESwInGBJESwElEkRJJxCoRLEkFov/shgnBLIaJwWyGicGshqyGimyGiOyECKyAbO0PklXBABMVwAEKBJESSJZSwElWUsCTwJLAlJXAgBLAhVLA08DTwJSVwIASwJXBAgXTwNXDEBPA0sHEk8DSwYSEE8CSwQSEExLAqgQRLGL/7IYJwSyGicFshonBrIaK7IaKbIaI7IQIrIBs7Q+SVcEAExXAAQoEkRJIllLASVZSwJPAksCUlcCAEsCFUsDTwNPAlJXAgBLAlcECBdPA1cMQE8DSwcSTwNLBhIQTwJLBBIQTEsCqBBEsYv/shgnBLIaJwWyGicGshorshopshojshAisgGztD5JVwQATFcABCgSREkiWUsBJVlLAk8CSwJSVwIASwIVSwNPA08CUlcCAEsCVwQIF08DVwxATwNPBxJPA08GEhBPAk8EEhBMTwKoEESJigEAsYv/shgnEbIaJxmyGiOyECKyAbO0PklXBABMVwAEKBJESSJZSwElWUsCTwJLAlJJIllLASVZSwJPAksCUlcCAEsCFU8DTwNPAlJLAxVPBE8ETwJSSVcACBdLAVcICEsCgRBZSwMVTwROAlJXAgBPBCcIEkRPAycaEkRPAiUSREwnCahEJxsSRLGL/7IYJxGyGicZshojshAisgGztD5JVwQATFcABCgSREkiWUsBJVlLAk8CSwJSSSJZSwElWUsCTwJLAlJXAgBLAhVPA08DTwJSSwMVTwRPBE8CUklXAAgXSwFXCAhLAoEQWUsDFU8ETgJSVwIATwQnCBJETwMnGhJETwIlEkRMJwmoRCcbEkSxi/+yGCcRshqAKAAEABIABAAJAANzMWIAA3MyYgAAAAAAAAALAAAAAAAAABUAEgACM2KyGiOyECKyAbO0PklXBABMVwAEKBJESSJZSwElWUsCTwJLAlJJIllLASVZSwJPAksCUlcCAEsCFU8DTwNPAlJLAxVPBE8ETwJSSVcACBdLAVcICEsCgRBZSwMVTwROAlJXAgBPBIAJZWNobzogczFiEkRPA4ALAAllY2hvOiBzMmISRE8CgQwSREyACAAAAAAAAAAWqESACGVjaG86IDNiEkSJigEAsYv/shgnErIaI7IQIrIBs7Q+SVcEAExXAAQoEkQXgSoSRLGL/7IYJxKyGiOyECKyAbO0PklXBABMVwAEKBJEJxyoRLGL/7IYJxKyGiOyECKyAbO0PlcABCgSRLQ+SVcEAExXAAQoEkQnHKhEiYoBALGL/7IYJx2yGicTshonE7IaI7IQIrIBs7Q+SVcEAExXAAQoEkQiU0Sxi/+yGCcdshqAEQAAAAAAAAACAAoABWxvZyAyshonE7IaI7IQIrIBs7Q+SVcEAExXAAQoEkQiUxREiQ==", + "clear": "CoEBQw==" + }, + "compilerInfo": { + "compiler": "puya", + "compilerVersion": { + "major": 99, + "minor": 99, + "patch": 99 + } + } +} \ No newline at end of file diff --git a/test_cases/typed_abi_call/out/Logger.arc56.json b/test_cases/typed_abi_call/out/Logger.arc56.json new file mode 100644 index 0000000000..869bc40651 --- /dev/null +++ b/test_cases/typed_abi_call/out/Logger.arc56.json @@ -0,0 +1,618 @@ +{ + "arcs": [ + 22, + 28 + ], + "name": "Logger", + "structs": { + "LogMessage": [ + { + "name": "level", + "type": "uint64" + }, + { + "name": "message", + "type": "string" + } + ] + }, + "methods": [ + { + "name": "is_a_b", + "args": [ + { + "type": "byte[]", + "name": "a" + }, + { + "type": "byte[]", + "name": "b" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "echo", + "args": [ + { + "type": "string", + "name": "value" + } + ], + "returns": { + "type": "string" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "no_args", + "args": [], + "returns": { + "type": "uint64" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "log_uint64", + "args": [ + { + "type": "uint64", + "name": "value" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "log_uint512", + "args": [ + { + "type": "uint512", + "name": "value" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "log_string", + "args": [ + { + "type": "string", + "name": "value" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "log_bool", + "args": [ + { + "type": "bool", + "name": "value" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "log_bytes", + "args": [ + { + "type": "byte[]", + "name": "value" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "log_asset_account_app", + "args": [ + { + "type": "asset", + "name": "asset" + }, + { + "type": "account", + "name": "account" + }, + { + "type": "application", + "name": "app" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "echo_native_string", + "args": [ + { + "type": "string", + "name": "value" + } + ], + "returns": { + "type": "string" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "echo_native_bytes", + "args": [ + { + "type": "byte[]", + "name": "value" + } + ], + "returns": { + "type": "byte[]" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "echo_native_uint64", + "args": [ + { + "type": "uint64", + "name": "value" + } + ], + "returns": { + "type": "uint64" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "echo_native_biguint", + "args": [ + { + "type": "uint512", + "name": "value" + } + ], + "returns": { + "type": "uint512" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "echo_native_tuple", + "args": [ + { + "type": "string", + "name": "s" + }, + { + "type": "byte[]", + "name": "b" + }, + { + "type": "uint64", + "name": "u" + }, + { + "type": "uint512", + "name": "bu" + } + ], + "returns": { + "type": "(string,byte[],uint64,uint512)" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "echo_nested_tuple", + "args": [ + { + "type": "((string,string),(uint64,uint64,byte[]))", + "name": "tuple_of_tuples" + } + ], + "returns": { + "type": "((string,string),(uint64,uint64,byte[]))" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "return_args_after_14th", + "args": [ + { + "type": "uint64", + "name": "_a1" + }, + { + "type": "uint64", + "name": "_a2" + }, + { + "type": "uint64", + "name": "_a3" + }, + { + "type": "uint64", + "name": "_a4" + }, + { + "type": "uint64", + "name": "_a5" + }, + { + "type": "uint64", + "name": "_a6" + }, + { + "type": "uint64", + "name": "_a7" + }, + { + "type": "uint64", + "name": "_a8" + }, + { + "type": "uint64", + "name": "_a9" + }, + { + "type": "uint64", + "name": "_a10" + }, + { + "type": "uint64", + "name": "_a11" + }, + { + "type": "uint64", + "name": "_a12" + }, + { + "type": "uint64", + "name": "_a13" + }, + { + "type": "uint64", + "name": "_a14" + }, + { + "type": "uint8", + "name": "a15" + }, + { + "type": "uint8", + "name": "a16" + }, + { + "type": "uint8", + "name": "a17" + }, + { + "type": "uint8", + "name": "a18" + }, + { + "type": "(uint8,uint8,uint8,uint8)", + "name": "a19" + }, + { + "type": "uint8", + "name": "a20" + } + ], + "returns": { + "type": "byte[]" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "logs_are_equal", + "args": [ + { + "type": "(uint64,string)", + "struct": "LogMessage", + "name": "log_1" + }, + { + "type": "(uint64,string)", + "struct": "LogMessage", + "name": "log_2" + } + ], + "returns": { + "type": "bool" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "events": [], + "templateVariables": {}, + "networks": {}, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 169, + 193, + 212, + 229, + 244, + 259, + 274, + 289, + 304, + 334, + 364, + 394, + 415, + 442, + 537, + 702, + 796 + ], + "errorMessage": "OnCompletion is NoOp" + }, + { + "pc": [ + 886 + ], + "errorMessage": "a is not a" + }, + { + "pc": [ + 995 + ], + "errorMessage": "application exists" + }, + { + "pc": [ + 987 + ], + "errorMessage": "asset exists" + }, + { + "pc": [ + 893 + ], + "errorMessage": "b is not b" + }, + { + "pc": [ + 872 + ], + "errorMessage": "is creating" + }, + { + "pc": [ + 172, + 196, + 215, + 232, + 247, + 262, + 277, + 292, + 307, + 337, + 367, + 397, + 418, + 445, + 540, + 705, + 799 + ], + "errorMessage": "is not creating" + }, + { + "pc": [ + 429, + 496 + ], + "errorMessage": "overflow" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceIn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4IGFjY2VzcyBpcyBvdXQgb2YgYm91bmRzCiAgICBkaWcgMgogICAgcHVzaGludCAxNiAvLyAxNgogICAgZXh0cmFjdF91aW50MTYKICAgIGRpZyAzCiAgICBsZW4KICAgIHVuY292ZXIgNAogICAgY292ZXIgMgogICAgc3Vic3RyaW5nMwogICAgZXh0cmFjdCAyIDAKICAgIC8vIHR5cGVkX2FiaV9jYWxsL2xvZ2dlci5weTo4NQogICAgLy8gQGFyYzQuYWJpbWV0aG9kCiAgICBjYWxsc3ViIGVjaG9fbmVzdGVkX3R1cGxlCiAgICBkaWcgNAogICAgbGVuCiAgICBpdG9iCiAgICBleHRyYWN0IDYgMgogICAgdW5jb3ZlciA1CiAgICBjb25jYXQKICAgIGR1cAogICAgbGVuCiAgICBwdXNoaW50IDQgLy8gNAogICAgKwogICAgaXRvYgogICAgZXh0cmFjdCA2IDIKICAgIGJ5dGVjXzIgLy8gMHgwMDA0CiAgICBzd2FwCiAgICBjb25jYXQKICAgIHN3YXAKICAgIGNvbmNhdAogICAgdW5jb3ZlciA0CiAgICBjb25jYXQKICAgIHVuY292ZXIgMwogICAgaXRvYgogICAgZGlnIDIKICAgIGxlbgogICAgaXRvYgogICAgZXh0cmFjdCA2IDIKICAgIHVuY292ZXIgMwogICAgY29uY2F0CiAgICBzd2FwCiAgICB1bmNvdmVyIDMKICAgIGNvbmNhdAogICAgcHVzaGJ5dGVzIDB4MDAxMgogICAgY29uY2F0CiAgICBzd2FwCiAgICBjb25jYXQKICAgIGRpZyAxCiAgICBsZW4KICAgIHB1c2hpbnQgNCAvLyA0CiAgICArCiAgICBpdG9iCiAgICBleHRyYWN0IDYgMgogICAgYnl0ZWNfMiAvLyAweDAwMDQKICAgIHN3YXAKICAgIGNvbmNhdAogICAgdW5jb3ZlciAyCiAgICBjb25jYXQKICAgIHN3YXAKICAgIGNvbmNhdAogICAgYnl0ZWNfMCAvLyAweDE1MWY3Yzc1CiAgICBzd2FwCiAgICBjb25jYXQKICAgIGxvZwogIC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WUsDFU8ETgJSVwIAiAGrSwQVFlcGAk8FUEkVgQQIFlcGAipMUExQTwRQTwMWSwIVFlcGAk8DUExPA1CAAgASUExQSwEVgQQIFlcGAipMUE8CUExQKExQsCKJMRkURDEYRDYaATYaAjYaAzYaBDYaBTYaBjYaBzYaCDYaCTYaCjYaCzYaDDYaDTYaDjYaD1cAATYaD1cBATYaD1cCATYaD1cDATYaD1cEBDYaD1cIAYgBLihMULAiiTEZFEQxGEQ2GgFJVwAIF0sBgQhZSwIVTwNOAlJXAgA2GgJJVwAIF0sBgQhZSwIVTwNOAlJXAgCIARKAAQAjTwJUKExQsCKJMRlAAAYxGBREIokjiYoCAIv+gAFhEkSL/4ABYhJEiYoBAYv/VwIAKUxQSRUWVwYCTFCJigABgSqJigEAi/+wiYoBAIv/sImKAQCL/1cCALCJigEAi/8jU4ICBUZhbHNlBFRydWVPAk2wiYoBAIv/VwIAsImKAwCL/XEERIv+UIv/cghEULCJigEBKYv/UImKAQEpi/9QiYoBAYv/IgiJigEBi/8roImKBAQpi/xQKYv9UIv+IgiL/yugiYoFBSmL+1CL/FcCAClMUEkVFlcGAkxQi/0iCIv+FyIIFimL/1CJihQBi/qL+1CL/FCL/VCL/lCL/1A2Gg9LARJESRUWVwYCTFCJigQBi/yL/hKL/Yv/EhCJ", + "clear": "CoEBQw==" + }, + "compilerInfo": { + "compiler": "puya", + "compilerVersion": { + "major": 99, + "minor": 99, + "patch": 99 + } + } +} \ No newline at end of file diff --git a/test_cases/typed_abi_call/puya.log b/test_cases/typed_abi_call/puya.log index 8f865132f2..dea0b2ac6b 100644 --- a/test_cases/typed_abi_call/puya.log +++ b/test_cases/typed_abi_call/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['typed_abi_call'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['typed_abi_call'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing typed_abi_call/out/module.awst debug: Sealing block@0: // L12 @@ -15626,6 +15626,7 @@ debug: Inserted test_named_tuples_block@0.ops[60]: 'l-store-copy tmp%4#0 1' debug: Replaced test_named_tuples_block@0.ops[73]: 'v-load tmp%4#0' with 'l-load tmp%4#0' debug: Found 3 edge set/s for test_cases.typed_abi_call.typed_c2c.Greeter.__puya_arc4_router__ info: Writing typed_abi_call/out/Logger.arc32.json +info: Writing typed_abi_call/out/Logger.arc56.json info: Writing typed_abi_call/out/Logger.approval.teal info: Writing typed_abi_call/out/Logger.clear.teal info: Writing typed_abi_call/out/Logger.approval.bin @@ -15633,6 +15634,7 @@ info: Writing typed_abi_call/out/Logger.clear.bin info: Writing typed_abi_call/out/Logger.approval.puya.map info: Writing typed_abi_call/out/Logger.clear.puya.map info: Writing typed_abi_call/out/Greeter.arc32.json +info: Writing typed_abi_call/out/Greeter.arc56.json info: Writing typed_abi_call/out/Greeter.approval.teal info: Writing typed_abi_call/out/Greeter.clear.teal info: Writing typed_abi_call/out/Greeter.approval.bin diff --git a/test_cases/typed_abi_call_txn/out/Caller.arc56.json b/test_cases/typed_abi_call_txn/out/Caller.arc56.json new file mode 100644 index 0000000000..3ba4c7dd4d --- /dev/null +++ b/test_cases/typed_abi_call_txn/out/Caller.arc56.json @@ -0,0 +1,228 @@ +{ + "arcs": [ + 22, + 28 + ], + "name": "Caller", + "structs": {}, + "methods": [ + { + "name": "test_call_with_txn", + "args": [ + { + "type": "byte[]", + "name": "a" + }, + { + "type": "byte[]", + "name": "b" + }, + { + "type": "application", + "name": "app" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "test_call_with_acfg", + "args": [ + { + "type": "byte[]", + "name": "a" + }, + { + "type": "byte[]", + "name": "b" + }, + { + "type": "application", + "name": "app" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "test_call_with_infer", + "args": [ + { + "type": "byte[]", + "name": "a" + }, + { + "type": "byte[]", + "name": "b" + }, + { + "type": "application", + "name": "app" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "test_call_with_acfg_no_return", + "args": [ + { + "type": "byte[]", + "name": "a" + }, + { + "type": "byte[]", + "name": "b" + }, + { + "type": "application", + "name": "app" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "events": [], + "templateVariables": {}, + "networks": {}, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 287, + 358, + 427 + ], + "errorMessage": "ARC4 prefix is valid" + }, + { + "pc": [ + 80, + 110, + 140, + 170 + ], + "errorMessage": "OnCompletion is NoOp" + }, + { + "pc": [ + 289 + ], + "errorMessage": "expected asset id" + }, + { + "pc": [ + 508 + ], + "errorMessage": "expected asset to be created" + }, + { + "pc": [ + 205 + ], + "errorMessage": "is creating" + }, + { + "pc": [ + 83, + 113, + 143, + 173 + ], + "errorMessage": "is not creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLnR5cGVkX2FiaV9jYWxsX3R4bi5jYWxsZXIuQ2FsbGVyLmFwcHJvdmFsX3Byb2dyYW06CiAgICBpbnRjYmxvY2sgMCAxIDMgNgogICAgYnl0ZWNibG9jayAiVEVTVCIgIlRTVCIgMHgxNTFmN2M3NSAweDZkNDcwMGFkCiAgICBjYWxsc3ViIF9fcHV5YV9hcmM0X3JvdXRlcl9fCiAgICByZXR1cm4KCgovLyB0ZXN0X2Nhc2VzLnR5cGVkX2FiaV9jYWxsX3R4bi5jYWxsZXIuQ2FsbGVyLl9fcHV5YV9hcmM0X3JvdXRlcl9fKCkgLT4gdWludDY0OgpfX3B1eWFfYXJjNF9yb3V0ZXJfXzoKICAgIC8vIHR5cGVkX2FiaV9jYWxsX3R4bi9jYWxsZXIucHk6MTQKICAgIC8vIGNsYXNzIENhbGxlcihBUkM0Q29udHJhY3QpOgogICAgcHJvdG8gMCAxCiAgICB0eG4gTnVtQXBwQXJncwogICAgYnogX19wdXlhX2FyYzRfcm91dGVyX19fYmFyZV9yb3V0aW5nQDgKICAgIHB1c2hieXRlc3MgMHgyODRjMWU2MSAweGFhMzNjMWJhIDB4NGY5NjA3MWEgMHhiYjAwOThhMiAvLyBtZXRob2QgInRlc3RfY2FsbF93aXRoX3R4bihieXRlW10sYnl0ZVtdLGFwcGxpY2F0aW9uKXZvaWQiLCBtZXRob2QgInRlc3RfY2FsbF93aXRoX2FjZmcoYnl0ZVtdLGJ5dGVbXSxhcHBsaWNhdGlvbil2b2lkIiwgbWV0aG9kICJ0ZXN0X2NhbGxfd2l0aF9pbmZlcihieXRlW10sYnl0ZVtdLGFwcGxpY2F0aW9uKXZvaWQiLCBtZXRob2QgInRlc3RfY2Fs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3NldElECiAgICAvLyB0eXBlZF9hYmlfY2FsbF90eG4vY2FsbGVyLnB5Ojc1CiAgICAvLyBhc3NlcnQgYXNzZXRfaWQsICJleHBlY3RlZCBhc3NldCB0byBiZSBjcmVhdGVkIgogICAgYXNzZXJ0IC8vIGV4cGVjdGVkIGFzc2V0IHRvIGJlIGNyZWF0ZWQKICAgIHJldHN1Ygo=", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLnR5cGVkX2FiaV9jYWxsX3R4bi5jYWxsZXIuQ2FsbGVyLmNsZWFyX3N0YXRlX3Byb2dyYW06CiAgICBwdXNoaW50IDEgLy8gMQogICAgcmV0dXJuCg==" + }, + "byteCode": { + "approval": "CiAEAAEDBiYEBFRFU1QDVFNUBBUffHUEbUcArYgAAUOKAAExG0EAnYIEBChMHmEEqjPBugRPlgcaBLsAmKI2GgCOBAACACAAPgBcIokxGRREMRhENhoBVwIANhoCVwIANhoDF8AyiABpI4kxGRREMRhENhoBVwIANhoCVwIANhoDF8AyiACcI4kxGRREMRhENhoBVwIANhoCVwIANhoDF8AyiADDI4kxGRREMRhENhoBVwIANhoCVwIANhoDF8AyiADqI4kxGUAABjEYFEQjiSKJigMAsSOyIiiyJimyJSSyECKyAbaL/RUWVwYCi/1Qi/4VFlcGAov+UIv/shiABKH1BA2yGkyyGrIaJbIQIrIBs7cBPklXBABMVwAEKhJEF0SJigMAsSOyIiiyJimyJSSyECKyAbaL/RUWVwYCi/1Qi/4VFlcGAov+UIv/shgrshpMshqyGiWyECKyAbO3AT5XAAQqEkSJigMAsSOyIiiyJimyJSSyECKyAbaL/RUWVwYCi/1Qi/4VFlcGAov+UIv/shgrshpMshqyGiWyECKyAbO3AT5XAAQqEkSJigMAsSOyIiiyJimyJSSyECKyAbaL/RUWVwYCi/1Qi/4VFlcGAov+UIABMbIFi/+yGIAEyEAHfbIaTLIasholshAisgGztAWAATESRLcAPESJ", + "clear": "CoEBQw==" + }, + "compilerInfo": { + "compiler": "puya", + "compilerVersion": { + "major": 99, + "minor": 99, + "patch": 99 + } + } +} \ No newline at end of file diff --git a/test_cases/typed_abi_call_txn/out/TxnContract.arc56.json b/test_cases/typed_abi_call_txn/out/TxnContract.arc56.json new file mode 100644 index 0000000000..40304137ca --- /dev/null +++ b/test_cases/typed_abi_call_txn/out/TxnContract.arc56.json @@ -0,0 +1,214 @@ +{ + "arcs": [ + 22, + 28 + ], + "name": "TxnContract", + "structs": {}, + "methods": [ + { + "name": "call_with_txn", + "args": [ + { + "type": "byte[]", + "name": "a" + }, + { + "type": "txn", + "name": "acfg" + }, + { + "type": "byte[]", + "name": "b" + } + ], + "returns": { + "type": "uint64" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "call_with_acfg", + "args": [ + { + "type": "byte[]", + "name": "a" + }, + { + "type": "acfg", + "name": "acfg" + }, + { + "type": "byte[]", + "name": "b" + } + ], + "returns": { + "type": "uint64" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "call_with_acfg_no_return", + "args": [ + { + "type": "byte[]", + "name": "a" + }, + { + "type": "acfg", + "name": "acfg" + }, + { + "type": "byte[]", + "name": "b" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "events": [], + "templateVariables": {}, + "networks": {}, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 62, + 95, + 134 + ], + "errorMessage": "OnCompletion is NoOp" + }, + { + "pc": [ + 185, + 212, + 232 + ], + "errorMessage": "a is not a" + }, + { + "pc": [ + 190, + 217, + 237 + ], + "errorMessage": "b is not b" + }, + { + "pc": [ + 197 + ], + "errorMessage": "expected asset config" + }, + { + "pc": [ + 203, + 223, + 242 + ], + "errorMessage": "expected asset id" + }, + { + "pc": [ + 173 + ], + "errorMessage": "is creating" + }, + { + "pc": [ + 65, + 98, + 137 + ], + "errorMessage": "is not creating" + }, + { + "pc": [ + 114, + 153 + ], + "errorMessage": "transaction type is acfg" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLnR5cGVkX2FiaV9jYWxsX3R4bi50eG5fY29udHJhY3QuVHhuQ29udHJhY3QuYXBwcm92YWxfcHJvZ3JhbToKICAgIGludGNibG9jayAxIDMgMAogICAgYnl0ZWNibG9jayAweDYxIDB4NjIgMHgxNTFmN2M3NQogICAgY2FsbHN1YiBfX3B1eWFfYXJjNF9yb3V0ZXJfXwogICAgcmV0dXJuCgoKLy8gdGVzdF9jYXNlcy50eXBlZF9hYmlfY2FsbF90eG4udHhuX2NvbnRyYWN0LlR4bkNvbnRyYWN0Ll9fcHV5YV9hcmM0X3JvdXRlcl9fKCkgLT4gdWludDY0OgpfX3B1eWFfYXJjNF9yb3V0ZXJfXzoKICAgIC8vIHR5cGVkX2FiaV9jYWxsX3R4bi90eG5fY29udHJhY3QucHk6MTEKICAgIC8vIGNsYXNzIFR4bkNvbnRyYWN0KEFSQzRDb250cmFjdCk6CiAgICBwcm90byAwIDEKICAgIHR4biBOdW1BcHBBcmdzCiAgICBieiBfX3B1eWFfYXJjNF9yb3V0ZXJfX19iYXJlX3JvdXRpbmdANwogICAgcHVzaGJ5dGVzcyAweGExZjUwNDBkIDB4NmQ0NzAwYWQgMHhjODQwMDc3ZCAvLyBtZXRob2QgImNhbGxfd2l0aF90eG4oYnl0ZVtdLHR4bixieXRlW10p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gMSAvLyAxCiAgICByZXR1cm4K" + }, + "byteCode": { + "approval": "CiADAQMAJgMBYQFiBBUffHWIAAFDigABMRtBAIiCAwSh9QQNBG1HAK0EyEAHfTYaAI4DAAIAIwBKJIkxGRREMRhENhoBVwIAMRYiCTYaAlcCAIgAXRYqTFCwIokxGRREMRhENhoBVwIAMRYiCUk4ECMSRDYaAlcCAIgAURYqTFCwIokxGRREMRhENhoBVwIAMRYiCUk4ECMSRDYaAlcCAIgAPiKJMRlAAAYxGBREIokkiYoDAYv9KBJEi/8pEkSL/jgQIxJEi/44PElEiYoDAYv9KBJEi/8pEkSL/jg8SUSJigMAi/0oEkSL/ykSRIv+ODxEiQ==", + "clear": "CoEBQw==" + }, + "compilerInfo": { + "compiler": "puya", + "compilerVersion": { + "major": 99, + "minor": 99, + "patch": 99 + } + } +} \ No newline at end of file diff --git a/test_cases/typed_abi_call_txn/puya.log b/test_cases/typed_abi_call_txn/puya.log index 7047110655..0e0822dd29 100644 --- a/test_cases/typed_abi_call_txn/puya.log +++ b/test_cases/typed_abi_call_txn/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['typed_abi_call_txn'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['typed_abi_call_txn'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing typed_abi_call_txn/out/module.awst debug: Sealing block@0: // L12 @@ -2034,6 +2034,7 @@ debug: Inserted test_call_with_acfg_no_return_block@0.ops[27]: 'l-store-copy enc debug: Replaced test_call_with_acfg_no_return_block@0.ops[52]: 'v-load encoded_value%0#0' with 'l-load encoded_value%0#0' debug: Found 3 edge set/s for test_cases.typed_abi_call_txn.caller.Caller.__puya_arc4_router__ info: Writing typed_abi_call_txn/out/TxnContract.arc32.json +info: Writing typed_abi_call_txn/out/TxnContract.arc56.json info: Writing typed_abi_call_txn/out/TxnContract.approval.teal info: Writing typed_abi_call_txn/out/TxnContract.clear.teal info: Writing typed_abi_call_txn/out/TxnContract.approval.bin @@ -2041,6 +2042,7 @@ info: Writing typed_abi_call_txn/out/TxnContract.clear.bin info: Writing typed_abi_call_txn/out/TxnContract.approval.puya.map info: Writing typed_abi_call_txn/out/TxnContract.clear.puya.map info: Writing typed_abi_call_txn/out/Caller.arc32.json +info: Writing typed_abi_call_txn/out/Caller.arc56.json info: Writing typed_abi_call_txn/out/Caller.approval.teal info: Writing typed_abi_call_txn/out/Caller.clear.teal info: Writing typed_abi_call_txn/out/Caller.approval.bin diff --git a/test_cases/unary/puya.log b/test_cases/unary/puya.log index e5af9178b5..f7f6e1cec4 100644 --- a/test_cases/unary/puya.log +++ b/test_cases/unary/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['unary'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['unary'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing unary/out/module.awst debug: Sealing block@0: // L12 diff --git a/test_cases/unassigned_expression/out/Unassigned.arc56.json b/test_cases/unassigned_expression/out/Unassigned.arc56.json new file mode 100644 index 0000000000..89680e2ba2 --- /dev/null +++ b/test_cases/unassigned_expression/out/Unassigned.arc56.json @@ -0,0 +1,138 @@ +{ + "arcs": [ + 22, + 28 + ], + "name": "Unassigned", + "structs": {}, + "methods": [ + { + "name": "discard_op", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "discard_subroutine", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "discard_constants", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "events": [], + "templateVariables": {}, + "networks": {}, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 50, + 62, + 74 + ], + "errorMessage": "OnCompletion is NoOp" + }, + { + "pc": [ + 88 + ], + "errorMessage": "is creating" + }, + { + "pc": [ + 53, + 65, + 77 + ], + "errorMessage": "is not creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLnVuYXNzaWduZWRfZXhwcmVzc2lvbi5jb250cmFjdC5VbmFzc2lnbmVkLmFwcHJvdmFsX3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lbGYpIC0+IE5vbmU6CiAgICBwcm90byAwIDAKICAgIC8vIHVuYXNzaWduZWRfZXhwcmVzc2lvbi9jb250cmFjdC5weToxMQogICAgLy8gZ2V0X2FfdmFsdWUoKQogICAgY2FsbHN1YiBnZXRfYV92YWx1ZQogICAgcG9wCiAgICByZXRzdWIKCgovLyB0ZXN0X2Nhc2VzLnVuYXNzaWduZWRfZXhwcmVzc2lvbi5jb250cmFjdC5nZXRfYV92YWx1ZSgpIC0+IHVpbnQ2NDoKZ2V0X2FfdmFsdWU6CiAgICAvLyB1bmFzc2lnbmVkX2V4cHJlc3Npb24vY29udHJhY3QucHk6MjAtMjEKICAgIC8vIEBzdWJyb3V0aW5lCiAgICAvLyBkZWYgZ2V0X2FfdmFsdWUoKSAtPiBVSW50NjQ6CiAgICBwcm90byAwIDEKICAgIC8vIHVuYXNzaWduZWRfZXhwcmVzc2lvbi9jb250cmFjdC5weToyMgogICAgLy8gcmV0dXJuIFVJbnQ2NCg0MikKICAgIHB1c2hpbnQgNDIgLy8gNDIKICAgIHJldHN1Ygo=", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0X2Nhc2VzLnVuYXNzaWduZWRfZXhwcmVzc2lvbi5jb250cmFjdC5VbmFzc2lnbmVkLmNsZWFyX3N0YXRlX3Byb2dyYW06CiAgICBwdXNoaW50IDEgLy8gMQogICAgcmV0dXJuCg==" + }, + "byteCode": { + "approval": "CiACAQCIAAFDigABMRtBAD+CAwS71hacBLZnvBQEB1bb8TYaAI4DAAIADgAaI4kxGRREMRhEiAAkIokxGRREMRhEiAAgIokxGRREMRhEIokxGUAABjEYFEQiiSOJigAAgQqvSImKAACIAAJIiYoAAYEqiQ==", + "clear": "CoEBQw==" + }, + "compilerInfo": { + "compiler": "puya", + "compilerVersion": { + "major": 99, + "minor": 99, + "patch": 99 + } + } +} \ No newline at end of file diff --git a/test_cases/unassigned_expression/puya.log b/test_cases/unassigned_expression/puya.log index 17aef82cef..5a0245216c 100644 --- a/test_cases/unassigned_expression/puya.log +++ b/test_cases/unassigned_expression/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['unassigned_expression'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['unassigned_expression'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv unassigned_expression/contract.py:7:9 warning: expression result is ignored unassigned_expression/contract.py:11:9 warning: expression result is ignored @@ -673,6 +673,7 @@ debug: Inserted __puya_arc4_router_____algopy_default_create@8.ops[5]: 'l-store- debug: Replaced __puya_arc4_router_____algopy_default_create@8.ops[7]: 'v-load tmp%17#0' with 'l-load tmp%17#0' debug: Found 3 edge set/s for test_cases.unassigned_expression.contract.Unassigned.__puya_arc4_router__ info: Writing unassigned_expression/out/Unassigned.arc32.json +info: Writing unassigned_expression/out/Unassigned.arc56.json info: Writing unassigned_expression/out/Unassigned.approval.teal info: Writing unassigned_expression/out/Unassigned.clear.teal info: Writing unassigned_expression/out/Unassigned.approval.bin diff --git a/test_cases/undefined_phi_args/puya.log b/test_cases/undefined_phi_args/puya.log index 33b74c7f66..52c7093a00 100644 --- a/test_cases/undefined_phi_args/puya.log +++ b/test_cases/undefined_phi_args/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['undefined_phi_args'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['undefined_phi_args'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv info: writing undefined_phi_args/out/module.awst debug: Sealing block@0: // L12 diff --git a/test_cases/unssa/puya.log b/test_cases/unssa/puya.log index bb4c4bb2e0..c5131152fd 100644 --- a/test_cases/unssa/puya.log +++ b/test_cases/unssa/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['unssa'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['unssa'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv unssa/contract.py:6:9 warning: expression result is ignored unssa/contract.py:13:9 warning: expression result is ignored diff --git a/test_cases/with_reentrancy/puya.log b/test_cases/with_reentrancy/puya.log index bc676ebf62..25430d3d29 100644 --- a/test_cases/with_reentrancy/puya.log +++ b/test_cases/with_reentrancy/puya.log @@ -1,4 +1,4 @@ -debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['with_reentrancy'], output_awst=True, output_awst_json=False, output_client=True, log_level=) +debug: PuyaPyOptions(output_teal=True, output_source_map=True, output_arc32=True, output_arc56=True, output_ssa_ir=True, output_optimization_ir=True, output_destructured_ir=True, output_memory_ir=True, output_bytecode=True, debug_level=1, optimization_level=1, target_avm_version=10, cli_template_definitions={}, template_vars_prefix='TMPL_', locals_coalescing_strategy=, paths=['with_reentrancy'], output_awst=True, output_awst_json=False, output_client=True, log_level=) info: Found python prefix: /.venv with_reentrancy/contract.py:9:9 warning: expression result is ignored info: writing with_reentrancy/out/module.awst diff --git a/tests/test_compile.py b/tests/test_compile.py index bb222b8205..12966bd6fa 100644 --- a/tests/test_compile.py +++ b/tests/test_compile.py @@ -1,3 +1,4 @@ +import json import os import shutil import subprocess @@ -40,6 +41,7 @@ def _should_output(path: Path, puyapy_options: PuyaPyOptions) -> bool: for pattern, include_in_output in { "*.teal": puyapy_options.output_teal, "*.arc32.json": puyapy_options.output_arc32, + "*.arc56.json": puyapy_options.output_arc56, "*.awst": puyapy_options.output_awst, "*.ssa.ir": puyapy_options.output_ssa_ir, "*.ssa.opt_pass_*.ir": puyapy_options.output_optimization_ir, @@ -81,6 +83,10 @@ def compile_test_case( encoding="utf8", ) + # normalize ARC-56 output + for arc56_file in dst_out_dir.rglob("*.arc56.json"): + _normalize_arc56(arc56_file) + def _normalize_path(path: Path | str) -> str: return str(path).replace("\\", "/") @@ -124,6 +130,7 @@ def compile_with_level1_optimizations(test_case: PuyaTestCase) -> None: output_bytecode=True, output_source_map=True, output_arc32=True, + output_arc56=True, output_awst=True, output_ssa_ir=True, output_optimization_ir=True, @@ -173,3 +180,12 @@ def check_for_diff(path: Path) -> str | None: ) stdout += result.stdout.decode("utf8") return stdout or None + + +def _normalize_arc56(path: Path) -> None: + arc56 = json.loads(path.read_text()) + compiler_version = arc56.get("compilerInfo", {}).get("compilerVersion", {}) + compiler_version["major"] = 99 + compiler_version["minor"] = 99 + compiler_version["patch"] = 99 + path.write_text(json.dumps(arc56, indent=4), encoding="utf8") diff --git a/tests/utils/__init__.py b/tests/utils/__init__.py index e9c657145b..50cbf75b10 100644 --- a/tests/utils/__init__.py +++ b/tests/utils/__init__.py @@ -20,7 +20,7 @@ from tests import EXAMPLES_DIR, TEST_CASES_DIR -APPROVAL_EXTENSIONS = frozenset((".teal", ".awst", ".ir", ".mir", ".arc32.json")) +APPROVAL_EXTENSIONS = frozenset((".teal", ".awst", ".ir", ".mir", ".arc32.json", ".arc56.json")) UNSTABLE_LOG_PREFIXES = { LogLevel.debug: ( "Building AWST for ",