diff --git a/src/puya/awst/nodes.py b/src/puya/awst/nodes.py index e3a4527c5a..5b6c66dc91 100644 --- a/src/puya/awst/nodes.py +++ b/src/puya/awst/nodes.py @@ -692,6 +692,7 @@ class TxnFields: TxnFields.approval_program_pages, TxnFields.clear_state_program_pages, ] +TXN_FIELDS_BY_IMMEDIATE = {f.immediate: f for f in TXN_FIELDS} INNER_PARAM_TXN_FIELDS = [f for f in TXN_FIELDS if f.is_inner_param] diff --git a/src/puya/awst_build/eb/arc4/abi_call.py b/src/puya/awst_build/eb/arc4/abi_call.py index 1a3468b103..f10174f177 100644 --- a/src/puya/awst_build/eb/arc4/abi_call.py +++ b/src/puya/awst_build/eb/arc4/abi_call.py @@ -11,7 +11,7 @@ from puya import log from puya.awst import wtypes from puya.awst.nodes import ( - TXN_FIELDS, + TXN_FIELDS_BY_IMMEDIATE, ARC4Decode, BytesConstant, BytesEncoding, @@ -58,23 +58,24 @@ logger = log.get_logger(__name__) _APP_TRANSACTION_FIELDS = { - get_field_python_name(f): f - for f in TXN_FIELDS - if f.immediate - in ( - "ApplicationID", - "OnCompletion", - "ApprovalProgram", - "ClearStateProgram", - "GlobalNumUInt", - "GlobalNumByteSlice", - "LocalNumUInt", - "LocalNumByteSlice", - "ExtraProgramPages", - "Fee", - "Sender", - "Note", - "RekeyTo", + get_field_python_name(field): field + for field in ( + TXN_FIELDS_BY_IMMEDIATE[immediate] + for immediate in ( + "ApplicationID", + "OnCompletion", + "ApprovalProgram", + "ClearStateProgram", + "GlobalNumUint", + "GlobalNumByteSlice", + "LocalNumUint", + "LocalNumByteSlice", + "ExtraProgramPages", + "Fee", + "Sender", + "Note", + "RekeyTo", + ) ) }