import typing
from collections.abc import Mapping

from puyapy.awst_build import pytypes
from puyapy.awst_build.intrinsic_models import (
    FunctionOpMapping,
    OpMappingWithOverloads,
    PropertyOpMapping,
)

ENUM_CLASSES: typing.Final[Mapping[str, Mapping[str, str]]] = dict(
    EC=dict(
        BN254g1="BN254g1",
        BN254g2="BN254g2",
        BLS12_381g1="BLS12_381g1",
        BLS12_381g2="BLS12_381g2",
    ),
    Base64=dict(
        URLEncoding="URLEncoding",
        StdEncoding="StdEncoding",
    ),
    ECDSA=dict(
        Secp256k1="Secp256k1",
        Secp256r1="Secp256r1",
    ),
    MiMCConfigurations=dict(
        BN254Mp110="BN254Mp110",
        BLS12_381Mp111="BLS12_381Mp111",
    ),
    VrfVerify=dict(
        VrfAlgorand="VrfAlgorand",
    ),
)

FUNC_TO_AST_MAPPER: typing.Final[Mapping[str, OpMappingWithOverloads]] = dict(
    addw=OpMappingWithOverloads(
        result=pytypes.GenericTupleType.parameterise(
            (pytypes.UInt64Type, pytypes.UInt64Type), source_location=None
        ),
        arity=2,
        overloads=[
            FunctionOpMapping(
                "addw",
                args=[(pytypes.UInt64Type,), (pytypes.UInt64Type,)],
            ),
        ],
    ),
    app_opted_in=OpMappingWithOverloads(
        result=pytypes.BoolType,
        arity=2,
        overloads=[
            FunctionOpMapping(
                "app_opted_in",
                args=[
                    (pytypes.AccountType, pytypes.UInt64Type),
                    (pytypes.ApplicationType, pytypes.UInt64Type),
                ],
            ),
        ],
    ),
    arg=OpMappingWithOverloads(
        result=pytypes.BytesType,
        arity=1,
        overloads=[
            FunctionOpMapping(
                "args",
                args=[(pytypes.UInt64Type,)],
            ),
            FunctionOpMapping(
                "arg",
                immediates=[int],
                args=[0],
            ),
        ],
    ),
    balance=OpMappingWithOverloads(
        result=pytypes.UInt64Type,
        arity=1,
        overloads=[
            FunctionOpMapping(
                "balance",
                args=[(pytypes.AccountType, pytypes.UInt64Type)],
            ),
        ],
    ),
    base64_decode=OpMappingWithOverloads(
        result=pytypes.BytesType,
        arity=2,
        overloads=[
            FunctionOpMapping(
                "base64_decode",
                immediates=[str],
                args=[0, (pytypes.BytesType,)],
            ),
        ],
    ),
    bitlen=OpMappingWithOverloads(
        result=pytypes.UInt64Type,
        arity=1,
        overloads=[
            FunctionOpMapping(
                "bitlen",
                args=[(pytypes.BytesType, pytypes.UInt64Type)],
            ),
        ],
    ),
    bsqrt=OpMappingWithOverloads(
        result=pytypes.BigUIntType,
        arity=1,
        overloads=[
            FunctionOpMapping(
                "bsqrt",
                args=[(pytypes.BigUIntType,)],
            ),
        ],
    ),
    btoi=OpMappingWithOverloads(
        result=pytypes.UInt64Type,
        arity=1,
        overloads=[
            FunctionOpMapping(
                "btoi",
                args=[(pytypes.BytesType,)],
            ),
        ],
    ),
    bzero=OpMappingWithOverloads(
        result=pytypes.BytesType,
        arity=1,
        overloads=[
            FunctionOpMapping(
                "bzero",
                args=[(pytypes.UInt64Type,)],
            ),
        ],
    ),
    concat=OpMappingWithOverloads(
        result=pytypes.BytesType,
        arity=2,
        overloads=[
            FunctionOpMapping(
                "concat",
                args=[(pytypes.BytesType,), (pytypes.BytesType,)],
            ),
        ],
    ),
    divmodw=OpMappingWithOverloads(
        result=pytypes.GenericTupleType.parameterise(
            (pytypes.UInt64Type, pytypes.UInt64Type, pytypes.UInt64Type, pytypes.UInt64Type),
            source_location=None,
        ),
        arity=4,
        overloads=[
            FunctionOpMapping(
                "divmodw",
                args=[
                    (pytypes.UInt64Type,),
                    (pytypes.UInt64Type,),
                    (pytypes.UInt64Type,),
                    (pytypes.UInt64Type,),
                ],
            ),
        ],
    ),
    divw=OpMappingWithOverloads(
        result=pytypes.UInt64Type,
        arity=3,
        overloads=[
            FunctionOpMapping(
                "divw",
                args=[(pytypes.UInt64Type,), (pytypes.UInt64Type,), (pytypes.UInt64Type,)],
            ),
        ],
    ),
    ecdsa_pk_decompress=OpMappingWithOverloads(
        result=pytypes.GenericTupleType.parameterise(
            (pytypes.BytesType, pytypes.BytesType), source_location=None
        ),
        arity=2,
        overloads=[
            FunctionOpMapping(
                "ecdsa_pk_decompress",
                immediates=[str],
                args=[0, (pytypes.BytesType,)],
            ),
        ],
    ),
    ecdsa_pk_recover=OpMappingWithOverloads(
        result=pytypes.GenericTupleType.parameterise(
            (pytypes.BytesType, pytypes.BytesType), source_location=None
        ),
        arity=5,
        overloads=[
            FunctionOpMapping(
                "ecdsa_pk_recover",
                immediates=[str],
                args=[
                    0,
                    (pytypes.BytesType,),
                    (pytypes.UInt64Type,),
                    (pytypes.BytesType,),
                    (pytypes.BytesType,),
                ],
            ),
        ],
    ),
    ecdsa_verify=OpMappingWithOverloads(
        result=pytypes.BoolType,
        arity=6,
        overloads=[
            FunctionOpMapping(
                "ecdsa_verify",
                immediates=[str],
                args=[
                    0,
                    (pytypes.BytesType,),
                    (pytypes.BytesType,),
                    (pytypes.BytesType,),
                    (pytypes.BytesType,),
                    (pytypes.BytesType,),
                ],
            ),
        ],
    ),
    ed25519verify=OpMappingWithOverloads(
        result=pytypes.BoolType,
        arity=3,
        overloads=[
            FunctionOpMapping(
                "ed25519verify",
                args=[(pytypes.BytesType,), (pytypes.BytesType,), (pytypes.BytesType,)],
            ),
        ],
    ),
    ed25519verify_bare=OpMappingWithOverloads(
        result=pytypes.BoolType,
        arity=3,
        overloads=[
            FunctionOpMapping(
                "ed25519verify_bare",
                args=[(pytypes.BytesType,), (pytypes.BytesType,), (pytypes.BytesType,)],
            ),
        ],
    ),
    err=OpMappingWithOverloads(
        result=pytypes.NeverType,
        arity=0,
        overloads=[
            FunctionOpMapping(
                "err",
            ),
        ],
    ),
    exit=OpMappingWithOverloads(
        result=pytypes.NeverType,
        arity=1,
        overloads=[
            FunctionOpMapping(
                "return",
                args=[(pytypes.UInt64Type,)],
            ),
        ],
    ),
    exp=OpMappingWithOverloads(
        result=pytypes.UInt64Type,
        arity=2,
        overloads=[
            FunctionOpMapping(
                "exp",
                args=[(pytypes.UInt64Type,), (pytypes.UInt64Type,)],
            ),
        ],
    ),
    expw=OpMappingWithOverloads(
        result=pytypes.GenericTupleType.parameterise(
            (pytypes.UInt64Type, pytypes.UInt64Type), source_location=None
        ),
        arity=2,
        overloads=[
            FunctionOpMapping(
                "expw",
                args=[(pytypes.UInt64Type,), (pytypes.UInt64Type,)],
            ),
        ],
    ),
    extract=OpMappingWithOverloads(
        result=pytypes.BytesType,
        arity=3,
        overloads=[
            FunctionOpMapping(
                "extract3",
                args=[(pytypes.BytesType,), (pytypes.UInt64Type,), (pytypes.UInt64Type,)],
            ),
            FunctionOpMapping(
                "extract",
                immediates=[int, int],
                args=[(pytypes.BytesType,), 0, 1],
            ),
        ],
    ),
    extract_uint16=OpMappingWithOverloads(
        result=pytypes.UInt64Type,
        arity=2,
        overloads=[
            FunctionOpMapping(
                "extract_uint16",
                args=[(pytypes.BytesType,), (pytypes.UInt64Type,)],
            ),
        ],
    ),
    extract_uint32=OpMappingWithOverloads(
        result=pytypes.UInt64Type,
        arity=2,
        overloads=[
            FunctionOpMapping(
                "extract_uint32",
                args=[(pytypes.BytesType,), (pytypes.UInt64Type,)],
            ),
        ],
    ),
    extract_uint64=OpMappingWithOverloads(
        result=pytypes.UInt64Type,
        arity=2,
        overloads=[
            FunctionOpMapping(
                "extract_uint64",
                args=[(pytypes.BytesType,), (pytypes.UInt64Type,)],
            ),
        ],
    ),
    falcon_verify=OpMappingWithOverloads(
        result=pytypes.BoolType,
        arity=3,
        overloads=[
            FunctionOpMapping(
                "falcon_verify",
                args=[(pytypes.BytesType,), (pytypes.BytesType,), (pytypes.BytesType,)],
            ),
        ],
    ),
    gaid=OpMappingWithOverloads(
        result=pytypes.UInt64Type,
        arity=1,
        overloads=[
            FunctionOpMapping(
                "gaids",
                args=[(pytypes.UInt64Type,)],
            ),
            FunctionOpMapping(
                "gaid",
                immediates=[int],
                args=[0],
            ),
        ],
    ),
    getbit=OpMappingWithOverloads(
        result=pytypes.UInt64Type,
        arity=2,
        overloads=[
            FunctionOpMapping(
                "getbit",
                args=[(pytypes.BytesType, pytypes.UInt64Type), (pytypes.UInt64Type,)],
            ),
        ],
    ),
    getbyte=OpMappingWithOverloads(
        result=pytypes.UInt64Type,
        arity=2,
        overloads=[
            FunctionOpMapping(
                "getbyte",
                args=[(pytypes.BytesType,), (pytypes.UInt64Type,)],
            ),
        ],
    ),
    gload_bytes=OpMappingWithOverloads(
        result=pytypes.BytesType,
        arity=2,
        overloads=[
            FunctionOpMapping(
                "gloadss",
                args=[(pytypes.UInt64Type,), (pytypes.UInt64Type,)],
            ),
            FunctionOpMapping(
                "gload",
                immediates=[int, int],
                args=[0, 1],
            ),
            FunctionOpMapping(
                "gloads",
                immediates=[int],
                args=[(pytypes.UInt64Type,), 0],
            ),
        ],
    ),
    gload_uint64=OpMappingWithOverloads(
        result=pytypes.UInt64Type,
        arity=2,
        overloads=[
            FunctionOpMapping(
                "gloadss",
                args=[(pytypes.UInt64Type,), (pytypes.UInt64Type,)],
            ),
            FunctionOpMapping(
                "gload",
                immediates=[int, int],
                args=[0, 1],
            ),
            FunctionOpMapping(
                "gloads",
                immediates=[int],
                args=[(pytypes.UInt64Type,), 0],
            ),
        ],
    ),
    itob=OpMappingWithOverloads(
        result=pytypes.BytesType,
        arity=1,
        overloads=[
            FunctionOpMapping(
                "itob",
                args=[(pytypes.UInt64Type,)],
            ),
        ],
    ),
    keccak256=OpMappingWithOverloads(
        result=pytypes.BytesType,
        arity=1,
        overloads=[
            FunctionOpMapping(
                "keccak256",
                args=[(pytypes.BytesType,)],
            ),
        ],
    ),
    mimc=OpMappingWithOverloads(
        result=pytypes.BytesType,
        arity=2,
        overloads=[
            FunctionOpMapping(
                "mimc",
                immediates=[str],
                args=[0, (pytypes.BytesType,)],
            ),
        ],
    ),
    min_balance=OpMappingWithOverloads(
        result=pytypes.UInt64Type,
        arity=1,
        overloads=[
            FunctionOpMapping(
                "min_balance",
                args=[(pytypes.AccountType, pytypes.UInt64Type)],
            ),
        ],
    ),
    mulw=OpMappingWithOverloads(
        result=pytypes.GenericTupleType.parameterise(
            (pytypes.UInt64Type, pytypes.UInt64Type), source_location=None
        ),
        arity=2,
        overloads=[
            FunctionOpMapping(
                "mulw",
                args=[(pytypes.UInt64Type,), (pytypes.UInt64Type,)],
            ),
        ],
    ),
    online_stake=OpMappingWithOverloads(
        result=pytypes.UInt64Type,
        arity=0,
        overloads=[
            FunctionOpMapping(
                "online_stake",
            ),
        ],
    ),
    replace=OpMappingWithOverloads(
        result=pytypes.BytesType,
        arity=3,
        overloads=[
            FunctionOpMapping(
                "replace3",
                args=[(pytypes.BytesType,), (pytypes.UInt64Type,), (pytypes.BytesType,)],
            ),
            FunctionOpMapping(
                "replace2",
                immediates=[int],
                args=[(pytypes.BytesType,), 0, (pytypes.BytesType,)],
            ),
        ],
    ),
    select_bytes=OpMappingWithOverloads(
        result=pytypes.BytesType,
        arity=3,
        overloads=[
            FunctionOpMapping(
                "select",
                args=[
                    (pytypes.BytesType,),
                    (pytypes.BytesType,),
                    (pytypes.BoolType, pytypes.UInt64Type),
                ],
            ),
        ],
    ),
    select_uint64=OpMappingWithOverloads(
        result=pytypes.UInt64Type,
        arity=3,
        overloads=[
            FunctionOpMapping(
                "select",
                args=[
                    (pytypes.UInt64Type,),
                    (pytypes.UInt64Type,),
                    (pytypes.BoolType, pytypes.UInt64Type),
                ],
            ),
        ],
    ),
    setbit_bytes=OpMappingWithOverloads(
        result=pytypes.BytesType,
        arity=3,
        overloads=[
            FunctionOpMapping(
                "setbit",
                args=[(pytypes.BytesType,), (pytypes.UInt64Type,), (pytypes.UInt64Type,)],
            ),
        ],
    ),
    setbit_uint64=OpMappingWithOverloads(
        result=pytypes.UInt64Type,
        arity=3,
        overloads=[
            FunctionOpMapping(
                "setbit",
                args=[(pytypes.UInt64Type,), (pytypes.UInt64Type,), (pytypes.UInt64Type,)],
            ),
        ],
    ),
    setbyte=OpMappingWithOverloads(
        result=pytypes.BytesType,
        arity=3,
        overloads=[
            FunctionOpMapping(
                "setbyte",
                args=[(pytypes.BytesType,), (pytypes.UInt64Type,), (pytypes.UInt64Type,)],
            ),
        ],
    ),
    sha256=OpMappingWithOverloads(
        result=pytypes.BytesType,
        arity=1,
        overloads=[
            FunctionOpMapping(
                "sha256",
                args=[(pytypes.BytesType,)],
            ),
        ],
    ),
    sha3_256=OpMappingWithOverloads(
        result=pytypes.BytesType,
        arity=1,
        overloads=[
            FunctionOpMapping(
                "sha3_256",
                args=[(pytypes.BytesType,)],
            ),
        ],
    ),
    sha512_256=OpMappingWithOverloads(
        result=pytypes.BytesType,
        arity=1,
        overloads=[
            FunctionOpMapping(
                "sha512_256",
                args=[(pytypes.BytesType,)],
            ),
        ],
    ),
    shl=OpMappingWithOverloads(
        result=pytypes.UInt64Type,
        arity=2,
        overloads=[
            FunctionOpMapping(
                "shl",
                args=[(pytypes.UInt64Type,), (pytypes.UInt64Type,)],
            ),
        ],
    ),
    shr=OpMappingWithOverloads(
        result=pytypes.UInt64Type,
        arity=2,
        overloads=[
            FunctionOpMapping(
                "shr",
                args=[(pytypes.UInt64Type,), (pytypes.UInt64Type,)],
            ),
        ],
    ),
    sqrt=OpMappingWithOverloads(
        result=pytypes.UInt64Type,
        arity=1,
        overloads=[
            FunctionOpMapping(
                "sqrt",
                args=[(pytypes.UInt64Type,)],
            ),
        ],
    ),
    substring=OpMappingWithOverloads(
        result=pytypes.BytesType,
        arity=3,
        overloads=[
            FunctionOpMapping(
                "substring3",
                args=[(pytypes.BytesType,), (pytypes.UInt64Type,), (pytypes.UInt64Type,)],
            ),
            FunctionOpMapping(
                "substring",
                immediates=[int, int],
                args=[(pytypes.BytesType,), 0, 1],
            ),
        ],
    ),
    sumhash512=OpMappingWithOverloads(
        result=pytypes.BytesType,
        arity=1,
        overloads=[
            FunctionOpMapping(
                "sumhash512",
                args=[(pytypes.BytesType,)],
            ),
        ],
    ),
    vrf_verify=OpMappingWithOverloads(
        result=pytypes.GenericTupleType.parameterise(
            (pytypes.BytesType, pytypes.BoolType), source_location=None
        ),
        arity=4,
        overloads=[
            FunctionOpMapping(
                "vrf_verify",
                immediates=[str],
                args=[0, (pytypes.BytesType,), (pytypes.BytesType,), (pytypes.BytesType,)],
            ),
        ],
    ),
)
NAMESPACE_CLASSES: typing.Final[
    Mapping[str, Mapping[str, PropertyOpMapping | OpMappingWithOverloads]]
] = dict(
    AcctParamsGet=dict(
        acct_balance=OpMappingWithOverloads(
            result=pytypes.GenericTupleType.parameterise(
                (pytypes.UInt64Type, pytypes.BoolType), source_location=None
            ),
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "acct_params_get",
                    immediates=["AcctBalance"],
                    args=[(pytypes.AccountType, pytypes.UInt64Type)],
                ),
            ],
        ),
        acct_min_balance=OpMappingWithOverloads(
            result=pytypes.GenericTupleType.parameterise(
                (pytypes.UInt64Type, pytypes.BoolType), source_location=None
            ),
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "acct_params_get",
                    immediates=["AcctMinBalance"],
                    args=[(pytypes.AccountType, pytypes.UInt64Type)],
                ),
            ],
        ),
        acct_auth_addr=OpMappingWithOverloads(
            result=pytypes.GenericTupleType.parameterise(
                (pytypes.AccountType, pytypes.BoolType), source_location=None
            ),
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "acct_params_get",
                    immediates=["AcctAuthAddr"],
                    args=[(pytypes.AccountType, pytypes.UInt64Type)],
                ),
            ],
        ),
        acct_total_num_uint=OpMappingWithOverloads(
            result=pytypes.GenericTupleType.parameterise(
                (pytypes.UInt64Type, pytypes.BoolType), source_location=None
            ),
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "acct_params_get",
                    immediates=["AcctTotalNumUint"],
                    args=[(pytypes.AccountType, pytypes.UInt64Type)],
                ),
            ],
        ),
        acct_total_num_byte_slice=OpMappingWithOverloads(
            result=pytypes.GenericTupleType.parameterise(
                (pytypes.UInt64Type, pytypes.BoolType), source_location=None
            ),
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "acct_params_get",
                    immediates=["AcctTotalNumByteSlice"],
                    args=[(pytypes.AccountType, pytypes.UInt64Type)],
                ),
            ],
        ),
        acct_total_extra_app_pages=OpMappingWithOverloads(
            result=pytypes.GenericTupleType.parameterise(
                (pytypes.UInt64Type, pytypes.BoolType), source_location=None
            ),
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "acct_params_get",
                    immediates=["AcctTotalExtraAppPages"],
                    args=[(pytypes.AccountType, pytypes.UInt64Type)],
                ),
            ],
        ),
        acct_total_apps_created=OpMappingWithOverloads(
            result=pytypes.GenericTupleType.parameterise(
                (pytypes.UInt64Type, pytypes.BoolType), source_location=None
            ),
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "acct_params_get",
                    immediates=["AcctTotalAppsCreated"],
                    args=[(pytypes.AccountType, pytypes.UInt64Type)],
                ),
            ],
        ),
        acct_total_apps_opted_in=OpMappingWithOverloads(
            result=pytypes.GenericTupleType.parameterise(
                (pytypes.UInt64Type, pytypes.BoolType), source_location=None
            ),
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "acct_params_get",
                    immediates=["AcctTotalAppsOptedIn"],
                    args=[(pytypes.AccountType, pytypes.UInt64Type)],
                ),
            ],
        ),
        acct_total_assets_created=OpMappingWithOverloads(
            result=pytypes.GenericTupleType.parameterise(
                (pytypes.UInt64Type, pytypes.BoolType), source_location=None
            ),
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "acct_params_get",
                    immediates=["AcctTotalAssetsCreated"],
                    args=[(pytypes.AccountType, pytypes.UInt64Type)],
                ),
            ],
        ),
        acct_total_assets=OpMappingWithOverloads(
            result=pytypes.GenericTupleType.parameterise(
                (pytypes.UInt64Type, pytypes.BoolType), source_location=None
            ),
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "acct_params_get",
                    immediates=["AcctTotalAssets"],
                    args=[(pytypes.AccountType, pytypes.UInt64Type)],
                ),
            ],
        ),
        acct_total_boxes=OpMappingWithOverloads(
            result=pytypes.GenericTupleType.parameterise(
                (pytypes.UInt64Type, pytypes.BoolType), source_location=None
            ),
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "acct_params_get",
                    immediates=["AcctTotalBoxes"],
                    args=[(pytypes.AccountType, pytypes.UInt64Type)],
                ),
            ],
        ),
        acct_total_box_bytes=OpMappingWithOverloads(
            result=pytypes.GenericTupleType.parameterise(
                (pytypes.UInt64Type, pytypes.BoolType), source_location=None
            ),
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "acct_params_get",
                    immediates=["AcctTotalBoxBytes"],
                    args=[(pytypes.AccountType, pytypes.UInt64Type)],
                ),
            ],
        ),
        acct_incentive_eligible=OpMappingWithOverloads(
            result=pytypes.GenericTupleType.parameterise(
                (pytypes.BoolType, pytypes.BoolType), source_location=None
            ),
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "acct_params_get",
                    immediates=["AcctIncentiveEligible"],
                    args=[(pytypes.AccountType, pytypes.UInt64Type)],
                ),
            ],
        ),
        acct_last_proposed=OpMappingWithOverloads(
            result=pytypes.GenericTupleType.parameterise(
                (pytypes.UInt64Type, pytypes.BoolType), source_location=None
            ),
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "acct_params_get",
                    immediates=["AcctLastProposed"],
                    args=[(pytypes.AccountType, pytypes.UInt64Type)],
                ),
            ],
        ),
        acct_last_heartbeat=OpMappingWithOverloads(
            result=pytypes.GenericTupleType.parameterise(
                (pytypes.UInt64Type, pytypes.BoolType), source_location=None
            ),
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "acct_params_get",
                    immediates=["AcctLastHeartbeat"],
                    args=[(pytypes.AccountType, pytypes.UInt64Type)],
                ),
            ],
        ),
    ),
    AppGlobal=dict(
        get_bytes=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "app_global_get",
                    args=[(pytypes.BytesType,)],
                ),
            ],
        ),
        get_uint64=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "app_global_get",
                    args=[(pytypes.BytesType,)],
                ),
            ],
        ),
        get_ex_bytes=OpMappingWithOverloads(
            result=pytypes.GenericTupleType.parameterise(
                (pytypes.BytesType, pytypes.BoolType), source_location=None
            ),
            arity=2,
            overloads=[
                FunctionOpMapping(
                    "app_global_get_ex",
                    args=[(pytypes.ApplicationType, pytypes.UInt64Type), (pytypes.BytesType,)],
                ),
            ],
        ),
        get_ex_uint64=OpMappingWithOverloads(
            result=pytypes.GenericTupleType.parameterise(
                (pytypes.UInt64Type, pytypes.BoolType), source_location=None
            ),
            arity=2,
            overloads=[
                FunctionOpMapping(
                    "app_global_get_ex",
                    args=[(pytypes.ApplicationType, pytypes.UInt64Type), (pytypes.BytesType,)],
                ),
            ],
        ),
        delete=OpMappingWithOverloads(
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "app_global_del",
                    args=[(pytypes.BytesType,)],
                ),
            ],
        ),
        put=OpMappingWithOverloads(
            arity=2,
            overloads=[
                FunctionOpMapping(
                    "app_global_put",
                    args=[(pytypes.BytesType,), (pytypes.BytesType, pytypes.UInt64Type)],
                ),
            ],
        ),
    ),
    AppLocal=dict(
        get_bytes=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=2,
            overloads=[
                FunctionOpMapping(
                    "app_local_get",
                    args=[(pytypes.AccountType, pytypes.UInt64Type), (pytypes.BytesType,)],
                ),
            ],
        ),
        get_uint64=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=2,
            overloads=[
                FunctionOpMapping(
                    "app_local_get",
                    args=[(pytypes.AccountType, pytypes.UInt64Type), (pytypes.BytesType,)],
                ),
            ],
        ),
        get_ex_bytes=OpMappingWithOverloads(
            result=pytypes.GenericTupleType.parameterise(
                (pytypes.BytesType, pytypes.BoolType), source_location=None
            ),
            arity=3,
            overloads=[
                FunctionOpMapping(
                    "app_local_get_ex",
                    args=[
                        (pytypes.AccountType, pytypes.UInt64Type),
                        (pytypes.ApplicationType, pytypes.UInt64Type),
                        (pytypes.BytesType,),
                    ],
                ),
            ],
        ),
        get_ex_uint64=OpMappingWithOverloads(
            result=pytypes.GenericTupleType.parameterise(
                (pytypes.UInt64Type, pytypes.BoolType), source_location=None
            ),
            arity=3,
            overloads=[
                FunctionOpMapping(
                    "app_local_get_ex",
                    args=[
                        (pytypes.AccountType, pytypes.UInt64Type),
                        (pytypes.ApplicationType, pytypes.UInt64Type),
                        (pytypes.BytesType,),
                    ],
                ),
            ],
        ),
        delete=OpMappingWithOverloads(
            arity=2,
            overloads=[
                FunctionOpMapping(
                    "app_local_del",
                    args=[(pytypes.AccountType, pytypes.UInt64Type), (pytypes.BytesType,)],
                ),
            ],
        ),
        put=OpMappingWithOverloads(
            arity=3,
            overloads=[
                FunctionOpMapping(
                    "app_local_put",
                    args=[
                        (pytypes.AccountType, pytypes.UInt64Type),
                        (pytypes.BytesType,),
                        (pytypes.BytesType, pytypes.UInt64Type),
                    ],
                ),
            ],
        ),
    ),
    AppParamsGet=dict(
        app_approval_program=OpMappingWithOverloads(
            result=pytypes.GenericTupleType.parameterise(
                (pytypes.BytesType, pytypes.BoolType), source_location=None
            ),
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "app_params_get",
                    immediates=["AppApprovalProgram"],
                    args=[(pytypes.ApplicationType, pytypes.UInt64Type)],
                ),
            ],
        ),
        app_clear_state_program=OpMappingWithOverloads(
            result=pytypes.GenericTupleType.parameterise(
                (pytypes.BytesType, pytypes.BoolType), source_location=None
            ),
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "app_params_get",
                    immediates=["AppClearStateProgram"],
                    args=[(pytypes.ApplicationType, pytypes.UInt64Type)],
                ),
            ],
        ),
        app_global_num_uint=OpMappingWithOverloads(
            result=pytypes.GenericTupleType.parameterise(
                (pytypes.UInt64Type, pytypes.BoolType), source_location=None
            ),
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "app_params_get",
                    immediates=["AppGlobalNumUint"],
                    args=[(pytypes.ApplicationType, pytypes.UInt64Type)],
                ),
            ],
        ),
        app_global_num_byte_slice=OpMappingWithOverloads(
            result=pytypes.GenericTupleType.parameterise(
                (pytypes.UInt64Type, pytypes.BoolType), source_location=None
            ),
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "app_params_get",
                    immediates=["AppGlobalNumByteSlice"],
                    args=[(pytypes.ApplicationType, pytypes.UInt64Type)],
                ),
            ],
        ),
        app_local_num_uint=OpMappingWithOverloads(
            result=pytypes.GenericTupleType.parameterise(
                (pytypes.UInt64Type, pytypes.BoolType), source_location=None
            ),
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "app_params_get",
                    immediates=["AppLocalNumUint"],
                    args=[(pytypes.ApplicationType, pytypes.UInt64Type)],
                ),
            ],
        ),
        app_local_num_byte_slice=OpMappingWithOverloads(
            result=pytypes.GenericTupleType.parameterise(
                (pytypes.UInt64Type, pytypes.BoolType), source_location=None
            ),
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "app_params_get",
                    immediates=["AppLocalNumByteSlice"],
                    args=[(pytypes.ApplicationType, pytypes.UInt64Type)],
                ),
            ],
        ),
        app_extra_program_pages=OpMappingWithOverloads(
            result=pytypes.GenericTupleType.parameterise(
                (pytypes.UInt64Type, pytypes.BoolType), source_location=None
            ),
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "app_params_get",
                    immediates=["AppExtraProgramPages"],
                    args=[(pytypes.ApplicationType, pytypes.UInt64Type)],
                ),
            ],
        ),
        app_creator=OpMappingWithOverloads(
            result=pytypes.GenericTupleType.parameterise(
                (pytypes.AccountType, pytypes.BoolType), source_location=None
            ),
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "app_params_get",
                    immediates=["AppCreator"],
                    args=[(pytypes.ApplicationType, pytypes.UInt64Type)],
                ),
            ],
        ),
        app_address=OpMappingWithOverloads(
            result=pytypes.GenericTupleType.parameterise(
                (pytypes.AccountType, pytypes.BoolType), source_location=None
            ),
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "app_params_get",
                    immediates=["AppAddress"],
                    args=[(pytypes.ApplicationType, pytypes.UInt64Type)],
                ),
            ],
        ),
    ),
    AssetHoldingGet=dict(
        asset_balance=OpMappingWithOverloads(
            result=pytypes.GenericTupleType.parameterise(
                (pytypes.UInt64Type, pytypes.BoolType), source_location=None
            ),
            arity=2,
            overloads=[
                FunctionOpMapping(
                    "asset_holding_get",
                    immediates=["AssetBalance"],
                    args=[
                        (pytypes.AccountType, pytypes.UInt64Type),
                        (pytypes.AssetType, pytypes.UInt64Type),
                    ],
                ),
            ],
        ),
        asset_frozen=OpMappingWithOverloads(
            result=pytypes.GenericTupleType.parameterise(
                (pytypes.BoolType, pytypes.BoolType), source_location=None
            ),
            arity=2,
            overloads=[
                FunctionOpMapping(
                    "asset_holding_get",
                    immediates=["AssetFrozen"],
                    args=[
                        (pytypes.AccountType, pytypes.UInt64Type),
                        (pytypes.AssetType, pytypes.UInt64Type),
                    ],
                ),
            ],
        ),
    ),
    AssetParamsGet=dict(
        asset_total=OpMappingWithOverloads(
            result=pytypes.GenericTupleType.parameterise(
                (pytypes.UInt64Type, pytypes.BoolType), source_location=None
            ),
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "asset_params_get",
                    immediates=["AssetTotal"],
                    args=[(pytypes.AssetType, pytypes.UInt64Type)],
                ),
            ],
        ),
        asset_decimals=OpMappingWithOverloads(
            result=pytypes.GenericTupleType.parameterise(
                (pytypes.UInt64Type, pytypes.BoolType), source_location=None
            ),
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "asset_params_get",
                    immediates=["AssetDecimals"],
                    args=[(pytypes.AssetType, pytypes.UInt64Type)],
                ),
            ],
        ),
        asset_default_frozen=OpMappingWithOverloads(
            result=pytypes.GenericTupleType.parameterise(
                (pytypes.BoolType, pytypes.BoolType), source_location=None
            ),
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "asset_params_get",
                    immediates=["AssetDefaultFrozen"],
                    args=[(pytypes.AssetType, pytypes.UInt64Type)],
                ),
            ],
        ),
        asset_unit_name=OpMappingWithOverloads(
            result=pytypes.GenericTupleType.parameterise(
                (pytypes.BytesType, pytypes.BoolType), source_location=None
            ),
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "asset_params_get",
                    immediates=["AssetUnitName"],
                    args=[(pytypes.AssetType, pytypes.UInt64Type)],
                ),
            ],
        ),
        asset_name=OpMappingWithOverloads(
            result=pytypes.GenericTupleType.parameterise(
                (pytypes.BytesType, pytypes.BoolType), source_location=None
            ),
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "asset_params_get",
                    immediates=["AssetName"],
                    args=[(pytypes.AssetType, pytypes.UInt64Type)],
                ),
            ],
        ),
        asset_url=OpMappingWithOverloads(
            result=pytypes.GenericTupleType.parameterise(
                (pytypes.BytesType, pytypes.BoolType), source_location=None
            ),
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "asset_params_get",
                    immediates=["AssetURL"],
                    args=[(pytypes.AssetType, pytypes.UInt64Type)],
                ),
            ],
        ),
        asset_metadata_hash=OpMappingWithOverloads(
            result=pytypes.GenericTupleType.parameterise(
                (pytypes.BytesType, pytypes.BoolType), source_location=None
            ),
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "asset_params_get",
                    immediates=["AssetMetadataHash"],
                    args=[(pytypes.AssetType, pytypes.UInt64Type)],
                ),
            ],
        ),
        asset_manager=OpMappingWithOverloads(
            result=pytypes.GenericTupleType.parameterise(
                (pytypes.AccountType, pytypes.BoolType), source_location=None
            ),
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "asset_params_get",
                    immediates=["AssetManager"],
                    args=[(pytypes.AssetType, pytypes.UInt64Type)],
                ),
            ],
        ),
        asset_reserve=OpMappingWithOverloads(
            result=pytypes.GenericTupleType.parameterise(
                (pytypes.AccountType, pytypes.BoolType), source_location=None
            ),
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "asset_params_get",
                    immediates=["AssetReserve"],
                    args=[(pytypes.AssetType, pytypes.UInt64Type)],
                ),
            ],
        ),
        asset_freeze=OpMappingWithOverloads(
            result=pytypes.GenericTupleType.parameterise(
                (pytypes.AccountType, pytypes.BoolType), source_location=None
            ),
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "asset_params_get",
                    immediates=["AssetFreeze"],
                    args=[(pytypes.AssetType, pytypes.UInt64Type)],
                ),
            ],
        ),
        asset_clawback=OpMappingWithOverloads(
            result=pytypes.GenericTupleType.parameterise(
                (pytypes.AccountType, pytypes.BoolType), source_location=None
            ),
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "asset_params_get",
                    immediates=["AssetClawback"],
                    args=[(pytypes.AssetType, pytypes.UInt64Type)],
                ),
            ],
        ),
        asset_creator=OpMappingWithOverloads(
            result=pytypes.GenericTupleType.parameterise(
                (pytypes.AccountType, pytypes.BoolType), source_location=None
            ),
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "asset_params_get",
                    immediates=["AssetCreator"],
                    args=[(pytypes.AssetType, pytypes.UInt64Type)],
                ),
            ],
        ),
    ),
    Block=dict(
        blk_seed=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "block",
                    immediates=["BlkSeed"],
                    args=[(pytypes.UInt64Type,)],
                ),
            ],
        ),
        blk_timestamp=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "block",
                    immediates=["BlkTimestamp"],
                    args=[(pytypes.UInt64Type,)],
                ),
            ],
        ),
        blk_proposer=OpMappingWithOverloads(
            result=pytypes.AccountType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "block",
                    immediates=["BlkProposer"],
                    args=[(pytypes.UInt64Type,)],
                ),
            ],
        ),
        blk_fees_collected=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "block",
                    immediates=["BlkFeesCollected"],
                    args=[(pytypes.UInt64Type,)],
                ),
            ],
        ),
        blk_bonus=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "block",
                    immediates=["BlkBonus"],
                    args=[(pytypes.UInt64Type,)],
                ),
            ],
        ),
        blk_branch=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "block",
                    immediates=["BlkBranch"],
                    args=[(pytypes.UInt64Type,)],
                ),
            ],
        ),
        blk_fee_sink=OpMappingWithOverloads(
            result=pytypes.AccountType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "block",
                    immediates=["BlkFeeSink"],
                    args=[(pytypes.UInt64Type,)],
                ),
            ],
        ),
        blk_protocol=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "block",
                    immediates=["BlkProtocol"],
                    args=[(pytypes.UInt64Type,)],
                ),
            ],
        ),
        blk_txn_counter=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "block",
                    immediates=["BlkTxnCounter"],
                    args=[(pytypes.UInt64Type,)],
                ),
            ],
        ),
        blk_proposer_payout=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "block",
                    immediates=["BlkProposerPayout"],
                    args=[(pytypes.UInt64Type,)],
                ),
            ],
        ),
    ),
    Box=dict(
        create=OpMappingWithOverloads(
            result=pytypes.BoolType,
            arity=2,
            overloads=[
                FunctionOpMapping(
                    "box_create",
                    args=[(pytypes.BytesType,), (pytypes.UInt64Type,)],
                ),
            ],
        ),
        delete=OpMappingWithOverloads(
            result=pytypes.BoolType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "box_del",
                    args=[(pytypes.BytesType,)],
                ),
            ],
        ),
        extract=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=3,
            overloads=[
                FunctionOpMapping(
                    "box_extract",
                    args=[(pytypes.BytesType,), (pytypes.UInt64Type,), (pytypes.UInt64Type,)],
                ),
            ],
        ),
        get=OpMappingWithOverloads(
            result=pytypes.GenericTupleType.parameterise(
                (pytypes.BytesType, pytypes.BoolType), source_location=None
            ),
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "box_get",
                    args=[(pytypes.BytesType,)],
                ),
            ],
        ),
        length=OpMappingWithOverloads(
            result=pytypes.GenericTupleType.parameterise(
                (pytypes.UInt64Type, pytypes.BoolType), source_location=None
            ),
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "box_len",
                    args=[(pytypes.BytesType,)],
                ),
            ],
        ),
        put=OpMappingWithOverloads(
            arity=2,
            overloads=[
                FunctionOpMapping(
                    "box_put",
                    args=[(pytypes.BytesType,), (pytypes.BytesType,)],
                ),
            ],
        ),
        replace=OpMappingWithOverloads(
            arity=3,
            overloads=[
                FunctionOpMapping(
                    "box_replace",
                    args=[(pytypes.BytesType,), (pytypes.UInt64Type,), (pytypes.BytesType,)],
                ),
            ],
        ),
        resize=OpMappingWithOverloads(
            arity=2,
            overloads=[
                FunctionOpMapping(
                    "box_resize",
                    args=[(pytypes.BytesType,), (pytypes.UInt64Type,)],
                ),
            ],
        ),
        splice=OpMappingWithOverloads(
            arity=4,
            overloads=[
                FunctionOpMapping(
                    "box_splice",
                    args=[
                        (pytypes.BytesType,),
                        (pytypes.UInt64Type,),
                        (pytypes.UInt64Type,),
                        (pytypes.BytesType,),
                    ],
                ),
            ],
        ),
    ),
    EllipticCurve=dict(
        add=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=3,
            overloads=[
                FunctionOpMapping(
                    "ec_add",
                    immediates=[str],
                    args=[0, (pytypes.BytesType,), (pytypes.BytesType,)],
                ),
            ],
        ),
        map_to=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=2,
            overloads=[
                FunctionOpMapping(
                    "ec_map_to",
                    immediates=[str],
                    args=[0, (pytypes.BytesType,)],
                ),
            ],
        ),
        scalar_mul_multi=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=3,
            overloads=[
                FunctionOpMapping(
                    "ec_multi_scalar_mul",
                    immediates=[str],
                    args=[0, (pytypes.BytesType,), (pytypes.BytesType,)],
                ),
            ],
        ),
        pairing_check=OpMappingWithOverloads(
            result=pytypes.BoolType,
            arity=3,
            overloads=[
                FunctionOpMapping(
                    "ec_pairing_check",
                    immediates=[str],
                    args=[0, (pytypes.BytesType,), (pytypes.BytesType,)],
                ),
            ],
        ),
        scalar_mul=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=3,
            overloads=[
                FunctionOpMapping(
                    "ec_scalar_mul",
                    immediates=[str],
                    args=[0, (pytypes.BytesType,), (pytypes.BytesType,)],
                ),
            ],
        ),
        subgroup_check=OpMappingWithOverloads(
            result=pytypes.BoolType,
            arity=2,
            overloads=[
                FunctionOpMapping(
                    "ec_subgroup_check",
                    immediates=[str],
                    args=[0, (pytypes.BytesType,)],
                ),
            ],
        ),
    ),
    GITxn=dict(
        sender=OpMappingWithOverloads(
            result=pytypes.AccountType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gitxn",
                    immediates=[int, "Sender"],
                    args=[0],
                ),
            ],
        ),
        fee=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gitxn",
                    immediates=[int, "Fee"],
                    args=[0],
                ),
            ],
        ),
        first_valid=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gitxn",
                    immediates=[int, "FirstValid"],
                    args=[0],
                ),
            ],
        ),
        first_valid_time=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gitxn",
                    immediates=[int, "FirstValidTime"],
                    args=[0],
                ),
            ],
        ),
        last_valid=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gitxn",
                    immediates=[int, "LastValid"],
                    args=[0],
                ),
            ],
        ),
        note=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gitxn",
                    immediates=[int, "Note"],
                    args=[0],
                ),
            ],
        ),
        lease=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gitxn",
                    immediates=[int, "Lease"],
                    args=[0],
                ),
            ],
        ),
        receiver=OpMappingWithOverloads(
            result=pytypes.AccountType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gitxn",
                    immediates=[int, "Receiver"],
                    args=[0],
                ),
            ],
        ),
        amount=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gitxn",
                    immediates=[int, "Amount"],
                    args=[0],
                ),
            ],
        ),
        close_remainder_to=OpMappingWithOverloads(
            result=pytypes.AccountType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gitxn",
                    immediates=[int, "CloseRemainderTo"],
                    args=[0],
                ),
            ],
        ),
        vote_pk=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gitxn",
                    immediates=[int, "VotePK"],
                    args=[0],
                ),
            ],
        ),
        selection_pk=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gitxn",
                    immediates=[int, "SelectionPK"],
                    args=[0],
                ),
            ],
        ),
        vote_first=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gitxn",
                    immediates=[int, "VoteFirst"],
                    args=[0],
                ),
            ],
        ),
        vote_last=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gitxn",
                    immediates=[int, "VoteLast"],
                    args=[0],
                ),
            ],
        ),
        vote_key_dilution=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gitxn",
                    immediates=[int, "VoteKeyDilution"],
                    args=[0],
                ),
            ],
        ),
        type=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gitxn",
                    immediates=[int, "Type"],
                    args=[0],
                ),
            ],
        ),
        type_enum=OpMappingWithOverloads(
            result=pytypes.TransactionTypeType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gitxn",
                    immediates=[int, "TypeEnum"],
                    args=[0],
                ),
            ],
        ),
        xfer_asset=OpMappingWithOverloads(
            result=pytypes.AssetType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gitxn",
                    immediates=[int, "XferAsset"],
                    args=[0],
                ),
            ],
        ),
        asset_amount=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gitxn",
                    immediates=[int, "AssetAmount"],
                    args=[0],
                ),
            ],
        ),
        asset_sender=OpMappingWithOverloads(
            result=pytypes.AccountType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gitxn",
                    immediates=[int, "AssetSender"],
                    args=[0],
                ),
            ],
        ),
        asset_receiver=OpMappingWithOverloads(
            result=pytypes.AccountType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gitxn",
                    immediates=[int, "AssetReceiver"],
                    args=[0],
                ),
            ],
        ),
        asset_close_to=OpMappingWithOverloads(
            result=pytypes.AccountType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gitxn",
                    immediates=[int, "AssetCloseTo"],
                    args=[0],
                ),
            ],
        ),
        group_index=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gitxn",
                    immediates=[int, "GroupIndex"],
                    args=[0],
                ),
            ],
        ),
        tx_id=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gitxn",
                    immediates=[int, "TxID"],
                    args=[0],
                ),
            ],
        ),
        application_id=OpMappingWithOverloads(
            result=pytypes.ApplicationType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gitxn",
                    immediates=[int, "ApplicationID"],
                    args=[0],
                ),
            ],
        ),
        on_completion=OpMappingWithOverloads(
            result=pytypes.OnCompleteActionType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gitxn",
                    immediates=[int, "OnCompletion"],
                    args=[0],
                ),
            ],
        ),
        application_args=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=2,
            overloads=[
                FunctionOpMapping(
                    "gitxnas",
                    immediates=[int, "ApplicationArgs"],
                    args=[0, (pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gitxna",
                    immediates=[int, "ApplicationArgs", int],
                    args=[0, 2],
                ),
            ],
        ),
        num_app_args=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gitxn",
                    immediates=[int, "NumAppArgs"],
                    args=[0],
                ),
            ],
        ),
        accounts=OpMappingWithOverloads(
            result=pytypes.AccountType,
            arity=2,
            overloads=[
                FunctionOpMapping(
                    "gitxnas",
                    immediates=[int, "Accounts"],
                    args=[0, (pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gitxna",
                    immediates=[int, "Accounts", int],
                    args=[0, 2],
                ),
            ],
        ),
        num_accounts=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gitxn",
                    immediates=[int, "NumAccounts"],
                    args=[0],
                ),
            ],
        ),
        approval_program=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gitxn",
                    immediates=[int, "ApprovalProgram"],
                    args=[0],
                ),
            ],
        ),
        clear_state_program=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gitxn",
                    immediates=[int, "ClearStateProgram"],
                    args=[0],
                ),
            ],
        ),
        rekey_to=OpMappingWithOverloads(
            result=pytypes.AccountType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gitxn",
                    immediates=[int, "RekeyTo"],
                    args=[0],
                ),
            ],
        ),
        config_asset=OpMappingWithOverloads(
            result=pytypes.AssetType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gitxn",
                    immediates=[int, "ConfigAsset"],
                    args=[0],
                ),
            ],
        ),
        config_asset_total=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gitxn",
                    immediates=[int, "ConfigAssetTotal"],
                    args=[0],
                ),
            ],
        ),
        config_asset_decimals=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gitxn",
                    immediates=[int, "ConfigAssetDecimals"],
                    args=[0],
                ),
            ],
        ),
        config_asset_default_frozen=OpMappingWithOverloads(
            result=pytypes.BoolType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gitxn",
                    immediates=[int, "ConfigAssetDefaultFrozen"],
                    args=[0],
                ),
            ],
        ),
        config_asset_unit_name=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gitxn",
                    immediates=[int, "ConfigAssetUnitName"],
                    args=[0],
                ),
            ],
        ),
        config_asset_name=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gitxn",
                    immediates=[int, "ConfigAssetName"],
                    args=[0],
                ),
            ],
        ),
        config_asset_url=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gitxn",
                    immediates=[int, "ConfigAssetURL"],
                    args=[0],
                ),
            ],
        ),
        config_asset_metadata_hash=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gitxn",
                    immediates=[int, "ConfigAssetMetadataHash"],
                    args=[0],
                ),
            ],
        ),
        config_asset_manager=OpMappingWithOverloads(
            result=pytypes.AccountType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gitxn",
                    immediates=[int, "ConfigAssetManager"],
                    args=[0],
                ),
            ],
        ),
        config_asset_reserve=OpMappingWithOverloads(
            result=pytypes.AccountType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gitxn",
                    immediates=[int, "ConfigAssetReserve"],
                    args=[0],
                ),
            ],
        ),
        config_asset_freeze=OpMappingWithOverloads(
            result=pytypes.AccountType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gitxn",
                    immediates=[int, "ConfigAssetFreeze"],
                    args=[0],
                ),
            ],
        ),
        config_asset_clawback=OpMappingWithOverloads(
            result=pytypes.AccountType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gitxn",
                    immediates=[int, "ConfigAssetClawback"],
                    args=[0],
                ),
            ],
        ),
        freeze_asset=OpMappingWithOverloads(
            result=pytypes.AssetType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gitxn",
                    immediates=[int, "FreezeAsset"],
                    args=[0],
                ),
            ],
        ),
        freeze_asset_account=OpMappingWithOverloads(
            result=pytypes.AccountType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gitxn",
                    immediates=[int, "FreezeAssetAccount"],
                    args=[0],
                ),
            ],
        ),
        freeze_asset_frozen=OpMappingWithOverloads(
            result=pytypes.BoolType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gitxn",
                    immediates=[int, "FreezeAssetFrozen"],
                    args=[0],
                ),
            ],
        ),
        assets=OpMappingWithOverloads(
            result=pytypes.AssetType,
            arity=2,
            overloads=[
                FunctionOpMapping(
                    "gitxnas",
                    immediates=[int, "Assets"],
                    args=[0, (pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gitxna",
                    immediates=[int, "Assets", int],
                    args=[0, 2],
                ),
            ],
        ),
        num_assets=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gitxn",
                    immediates=[int, "NumAssets"],
                    args=[0],
                ),
            ],
        ),
        applications=OpMappingWithOverloads(
            result=pytypes.ApplicationType,
            arity=2,
            overloads=[
                FunctionOpMapping(
                    "gitxnas",
                    immediates=[int, "Applications"],
                    args=[0, (pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gitxna",
                    immediates=[int, "Applications", int],
                    args=[0, 2],
                ),
            ],
        ),
        num_applications=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gitxn",
                    immediates=[int, "NumApplications"],
                    args=[0],
                ),
            ],
        ),
        global_num_uint=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gitxn",
                    immediates=[int, "GlobalNumUint"],
                    args=[0],
                ),
            ],
        ),
        global_num_byte_slice=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gitxn",
                    immediates=[int, "GlobalNumByteSlice"],
                    args=[0],
                ),
            ],
        ),
        local_num_uint=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gitxn",
                    immediates=[int, "LocalNumUint"],
                    args=[0],
                ),
            ],
        ),
        local_num_byte_slice=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gitxn",
                    immediates=[int, "LocalNumByteSlice"],
                    args=[0],
                ),
            ],
        ),
        extra_program_pages=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gitxn",
                    immediates=[int, "ExtraProgramPages"],
                    args=[0],
                ),
            ],
        ),
        nonparticipation=OpMappingWithOverloads(
            result=pytypes.BoolType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gitxn",
                    immediates=[int, "Nonparticipation"],
                    args=[0],
                ),
            ],
        ),
        logs=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=2,
            overloads=[
                FunctionOpMapping(
                    "gitxnas",
                    immediates=[int, "Logs"],
                    args=[0, (pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gitxna",
                    immediates=[int, "Logs", int],
                    args=[0, 2],
                ),
            ],
        ),
        num_logs=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gitxn",
                    immediates=[int, "NumLogs"],
                    args=[0],
                ),
            ],
        ),
        created_asset_id=OpMappingWithOverloads(
            result=pytypes.AssetType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gitxn",
                    immediates=[int, "CreatedAssetID"],
                    args=[0],
                ),
            ],
        ),
        created_application_id=OpMappingWithOverloads(
            result=pytypes.ApplicationType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gitxn",
                    immediates=[int, "CreatedApplicationID"],
                    args=[0],
                ),
            ],
        ),
        last_log=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gitxn",
                    immediates=[int, "LastLog"],
                    args=[0],
                ),
            ],
        ),
        state_proof_pk=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gitxn",
                    immediates=[int, "StateProofPK"],
                    args=[0],
                ),
            ],
        ),
        approval_program_pages=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=2,
            overloads=[
                FunctionOpMapping(
                    "gitxnas",
                    immediates=[int, "ApprovalProgramPages"],
                    args=[0, (pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gitxna",
                    immediates=[int, "ApprovalProgramPages", int],
                    args=[0, 2],
                ),
            ],
        ),
        num_approval_program_pages=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gitxn",
                    immediates=[int, "NumApprovalProgramPages"],
                    args=[0],
                ),
            ],
        ),
        clear_state_program_pages=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=2,
            overloads=[
                FunctionOpMapping(
                    "gitxnas",
                    immediates=[int, "ClearStateProgramPages"],
                    args=[0, (pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gitxna",
                    immediates=[int, "ClearStateProgramPages", int],
                    args=[0, 2],
                ),
            ],
        ),
        num_clear_state_program_pages=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gitxn",
                    immediates=[int, "NumClearStateProgramPages"],
                    args=[0],
                ),
            ],
        ),
    ),
    GTxn=dict(
        sender=OpMappingWithOverloads(
            result=pytypes.AccountType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gtxns",
                    immediates=["Sender"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxn",
                    immediates=[int, "Sender"],
                    args=[0],
                ),
            ],
        ),
        fee=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gtxns",
                    immediates=["Fee"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxn",
                    immediates=[int, "Fee"],
                    args=[0],
                ),
            ],
        ),
        first_valid=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gtxns",
                    immediates=["FirstValid"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxn",
                    immediates=[int, "FirstValid"],
                    args=[0],
                ),
            ],
        ),
        first_valid_time=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gtxns",
                    immediates=["FirstValidTime"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxn",
                    immediates=[int, "FirstValidTime"],
                    args=[0],
                ),
            ],
        ),
        last_valid=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gtxns",
                    immediates=["LastValid"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxn",
                    immediates=[int, "LastValid"],
                    args=[0],
                ),
            ],
        ),
        note=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gtxns",
                    immediates=["Note"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxn",
                    immediates=[int, "Note"],
                    args=[0],
                ),
            ],
        ),
        lease=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gtxns",
                    immediates=["Lease"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxn",
                    immediates=[int, "Lease"],
                    args=[0],
                ),
            ],
        ),
        receiver=OpMappingWithOverloads(
            result=pytypes.AccountType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gtxns",
                    immediates=["Receiver"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxn",
                    immediates=[int, "Receiver"],
                    args=[0],
                ),
            ],
        ),
        amount=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gtxns",
                    immediates=["Amount"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxn",
                    immediates=[int, "Amount"],
                    args=[0],
                ),
            ],
        ),
        close_remainder_to=OpMappingWithOverloads(
            result=pytypes.AccountType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gtxns",
                    immediates=["CloseRemainderTo"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxn",
                    immediates=[int, "CloseRemainderTo"],
                    args=[0],
                ),
            ],
        ),
        vote_pk=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gtxns",
                    immediates=["VotePK"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxn",
                    immediates=[int, "VotePK"],
                    args=[0],
                ),
            ],
        ),
        selection_pk=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gtxns",
                    immediates=["SelectionPK"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxn",
                    immediates=[int, "SelectionPK"],
                    args=[0],
                ),
            ],
        ),
        vote_first=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gtxns",
                    immediates=["VoteFirst"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxn",
                    immediates=[int, "VoteFirst"],
                    args=[0],
                ),
            ],
        ),
        vote_last=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gtxns",
                    immediates=["VoteLast"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxn",
                    immediates=[int, "VoteLast"],
                    args=[0],
                ),
            ],
        ),
        vote_key_dilution=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gtxns",
                    immediates=["VoteKeyDilution"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxn",
                    immediates=[int, "VoteKeyDilution"],
                    args=[0],
                ),
            ],
        ),
        type=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gtxns",
                    immediates=["Type"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxn",
                    immediates=[int, "Type"],
                    args=[0],
                ),
            ],
        ),
        type_enum=OpMappingWithOverloads(
            result=pytypes.TransactionTypeType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gtxns",
                    immediates=["TypeEnum"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxn",
                    immediates=[int, "TypeEnum"],
                    args=[0],
                ),
            ],
        ),
        xfer_asset=OpMappingWithOverloads(
            result=pytypes.AssetType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gtxns",
                    immediates=["XferAsset"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxn",
                    immediates=[int, "XferAsset"],
                    args=[0],
                ),
            ],
        ),
        asset_amount=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gtxns",
                    immediates=["AssetAmount"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxn",
                    immediates=[int, "AssetAmount"],
                    args=[0],
                ),
            ],
        ),
        asset_sender=OpMappingWithOverloads(
            result=pytypes.AccountType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gtxns",
                    immediates=["AssetSender"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxn",
                    immediates=[int, "AssetSender"],
                    args=[0],
                ),
            ],
        ),
        asset_receiver=OpMappingWithOverloads(
            result=pytypes.AccountType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gtxns",
                    immediates=["AssetReceiver"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxn",
                    immediates=[int, "AssetReceiver"],
                    args=[0],
                ),
            ],
        ),
        asset_close_to=OpMappingWithOverloads(
            result=pytypes.AccountType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gtxns",
                    immediates=["AssetCloseTo"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxn",
                    immediates=[int, "AssetCloseTo"],
                    args=[0],
                ),
            ],
        ),
        group_index=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gtxns",
                    immediates=["GroupIndex"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxn",
                    immediates=[int, "GroupIndex"],
                    args=[0],
                ),
            ],
        ),
        tx_id=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gtxns",
                    immediates=["TxID"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxn",
                    immediates=[int, "TxID"],
                    args=[0],
                ),
            ],
        ),
        application_id=OpMappingWithOverloads(
            result=pytypes.ApplicationType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gtxns",
                    immediates=["ApplicationID"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxn",
                    immediates=[int, "ApplicationID"],
                    args=[0],
                ),
            ],
        ),
        on_completion=OpMappingWithOverloads(
            result=pytypes.OnCompleteActionType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gtxns",
                    immediates=["OnCompletion"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxn",
                    immediates=[int, "OnCompletion"],
                    args=[0],
                ),
            ],
        ),
        application_args=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=2,
            overloads=[
                FunctionOpMapping(
                    "gtxnsas",
                    immediates=["ApplicationArgs"],
                    args=[(pytypes.UInt64Type,), (pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxnsa",
                    immediates=["ApplicationArgs", int],
                    args=[(pytypes.UInt64Type,), 1],
                ),
                FunctionOpMapping(
                    "gtxna",
                    immediates=[int, "ApplicationArgs", int],
                    args=[0, 2],
                ),
                FunctionOpMapping(
                    "gtxnas",
                    immediates=[int, "ApplicationArgs"],
                    args=[0, (pytypes.UInt64Type,)],
                ),
            ],
        ),
        num_app_args=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gtxns",
                    immediates=["NumAppArgs"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxn",
                    immediates=[int, "NumAppArgs"],
                    args=[0],
                ),
            ],
        ),
        accounts=OpMappingWithOverloads(
            result=pytypes.AccountType,
            arity=2,
            overloads=[
                FunctionOpMapping(
                    "gtxnsas",
                    immediates=["Accounts"],
                    args=[(pytypes.UInt64Type,), (pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxnsa",
                    immediates=["Accounts", int],
                    args=[(pytypes.UInt64Type,), 1],
                ),
                FunctionOpMapping(
                    "gtxna",
                    immediates=[int, "Accounts", int],
                    args=[0, 2],
                ),
                FunctionOpMapping(
                    "gtxnas",
                    immediates=[int, "Accounts"],
                    args=[0, (pytypes.UInt64Type,)],
                ),
            ],
        ),
        num_accounts=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gtxns",
                    immediates=["NumAccounts"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxn",
                    immediates=[int, "NumAccounts"],
                    args=[0],
                ),
            ],
        ),
        approval_program=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gtxns",
                    immediates=["ApprovalProgram"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxn",
                    immediates=[int, "ApprovalProgram"],
                    args=[0],
                ),
            ],
        ),
        clear_state_program=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gtxns",
                    immediates=["ClearStateProgram"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxn",
                    immediates=[int, "ClearStateProgram"],
                    args=[0],
                ),
            ],
        ),
        rekey_to=OpMappingWithOverloads(
            result=pytypes.AccountType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gtxns",
                    immediates=["RekeyTo"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxn",
                    immediates=[int, "RekeyTo"],
                    args=[0],
                ),
            ],
        ),
        config_asset=OpMappingWithOverloads(
            result=pytypes.AssetType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gtxns",
                    immediates=["ConfigAsset"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxn",
                    immediates=[int, "ConfigAsset"],
                    args=[0],
                ),
            ],
        ),
        config_asset_total=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gtxns",
                    immediates=["ConfigAssetTotal"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxn",
                    immediates=[int, "ConfigAssetTotal"],
                    args=[0],
                ),
            ],
        ),
        config_asset_decimals=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gtxns",
                    immediates=["ConfigAssetDecimals"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxn",
                    immediates=[int, "ConfigAssetDecimals"],
                    args=[0],
                ),
            ],
        ),
        config_asset_default_frozen=OpMappingWithOverloads(
            result=pytypes.BoolType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gtxns",
                    immediates=["ConfigAssetDefaultFrozen"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxn",
                    immediates=[int, "ConfigAssetDefaultFrozen"],
                    args=[0],
                ),
            ],
        ),
        config_asset_unit_name=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gtxns",
                    immediates=["ConfigAssetUnitName"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxn",
                    immediates=[int, "ConfigAssetUnitName"],
                    args=[0],
                ),
            ],
        ),
        config_asset_name=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gtxns",
                    immediates=["ConfigAssetName"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxn",
                    immediates=[int, "ConfigAssetName"],
                    args=[0],
                ),
            ],
        ),
        config_asset_url=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gtxns",
                    immediates=["ConfigAssetURL"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxn",
                    immediates=[int, "ConfigAssetURL"],
                    args=[0],
                ),
            ],
        ),
        config_asset_metadata_hash=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gtxns",
                    immediates=["ConfigAssetMetadataHash"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxn",
                    immediates=[int, "ConfigAssetMetadataHash"],
                    args=[0],
                ),
            ],
        ),
        config_asset_manager=OpMappingWithOverloads(
            result=pytypes.AccountType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gtxns",
                    immediates=["ConfigAssetManager"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxn",
                    immediates=[int, "ConfigAssetManager"],
                    args=[0],
                ),
            ],
        ),
        config_asset_reserve=OpMappingWithOverloads(
            result=pytypes.AccountType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gtxns",
                    immediates=["ConfigAssetReserve"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxn",
                    immediates=[int, "ConfigAssetReserve"],
                    args=[0],
                ),
            ],
        ),
        config_asset_freeze=OpMappingWithOverloads(
            result=pytypes.AccountType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gtxns",
                    immediates=["ConfigAssetFreeze"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxn",
                    immediates=[int, "ConfigAssetFreeze"],
                    args=[0],
                ),
            ],
        ),
        config_asset_clawback=OpMappingWithOverloads(
            result=pytypes.AccountType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gtxns",
                    immediates=["ConfigAssetClawback"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxn",
                    immediates=[int, "ConfigAssetClawback"],
                    args=[0],
                ),
            ],
        ),
        freeze_asset=OpMappingWithOverloads(
            result=pytypes.AssetType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gtxns",
                    immediates=["FreezeAsset"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxn",
                    immediates=[int, "FreezeAsset"],
                    args=[0],
                ),
            ],
        ),
        freeze_asset_account=OpMappingWithOverloads(
            result=pytypes.AccountType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gtxns",
                    immediates=["FreezeAssetAccount"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxn",
                    immediates=[int, "FreezeAssetAccount"],
                    args=[0],
                ),
            ],
        ),
        freeze_asset_frozen=OpMappingWithOverloads(
            result=pytypes.BoolType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gtxns",
                    immediates=["FreezeAssetFrozen"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxn",
                    immediates=[int, "FreezeAssetFrozen"],
                    args=[0],
                ),
            ],
        ),
        assets=OpMappingWithOverloads(
            result=pytypes.AssetType,
            arity=2,
            overloads=[
                FunctionOpMapping(
                    "gtxnsas",
                    immediates=["Assets"],
                    args=[(pytypes.UInt64Type,), (pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxnsa",
                    immediates=["Assets", int],
                    args=[(pytypes.UInt64Type,), 1],
                ),
                FunctionOpMapping(
                    "gtxna",
                    immediates=[int, "Assets", int],
                    args=[0, 2],
                ),
                FunctionOpMapping(
                    "gtxnas",
                    immediates=[int, "Assets"],
                    args=[0, (pytypes.UInt64Type,)],
                ),
            ],
        ),
        num_assets=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gtxns",
                    immediates=["NumAssets"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxn",
                    immediates=[int, "NumAssets"],
                    args=[0],
                ),
            ],
        ),
        applications=OpMappingWithOverloads(
            result=pytypes.ApplicationType,
            arity=2,
            overloads=[
                FunctionOpMapping(
                    "gtxnsas",
                    immediates=["Applications"],
                    args=[(pytypes.UInt64Type,), (pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxnsa",
                    immediates=["Applications", int],
                    args=[(pytypes.UInt64Type,), 1],
                ),
                FunctionOpMapping(
                    "gtxna",
                    immediates=[int, "Applications", int],
                    args=[0, 2],
                ),
                FunctionOpMapping(
                    "gtxnas",
                    immediates=[int, "Applications"],
                    args=[0, (pytypes.UInt64Type,)],
                ),
            ],
        ),
        num_applications=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gtxns",
                    immediates=["NumApplications"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxn",
                    immediates=[int, "NumApplications"],
                    args=[0],
                ),
            ],
        ),
        global_num_uint=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gtxns",
                    immediates=["GlobalNumUint"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxn",
                    immediates=[int, "GlobalNumUint"],
                    args=[0],
                ),
            ],
        ),
        global_num_byte_slice=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gtxns",
                    immediates=["GlobalNumByteSlice"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxn",
                    immediates=[int, "GlobalNumByteSlice"],
                    args=[0],
                ),
            ],
        ),
        local_num_uint=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gtxns",
                    immediates=["LocalNumUint"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxn",
                    immediates=[int, "LocalNumUint"],
                    args=[0],
                ),
            ],
        ),
        local_num_byte_slice=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gtxns",
                    immediates=["LocalNumByteSlice"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxn",
                    immediates=[int, "LocalNumByteSlice"],
                    args=[0],
                ),
            ],
        ),
        extra_program_pages=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gtxns",
                    immediates=["ExtraProgramPages"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxn",
                    immediates=[int, "ExtraProgramPages"],
                    args=[0],
                ),
            ],
        ),
        nonparticipation=OpMappingWithOverloads(
            result=pytypes.BoolType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gtxns",
                    immediates=["Nonparticipation"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxn",
                    immediates=[int, "Nonparticipation"],
                    args=[0],
                ),
            ],
        ),
        logs=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=2,
            overloads=[
                FunctionOpMapping(
                    "gtxnsas",
                    immediates=["Logs"],
                    args=[(pytypes.UInt64Type,), (pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxnsa",
                    immediates=["Logs", int],
                    args=[(pytypes.UInt64Type,), 1],
                ),
                FunctionOpMapping(
                    "gtxna",
                    immediates=[int, "Logs", int],
                    args=[0, 2],
                ),
                FunctionOpMapping(
                    "gtxnas",
                    immediates=[int, "Logs"],
                    args=[0, (pytypes.UInt64Type,)],
                ),
            ],
        ),
        num_logs=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gtxns",
                    immediates=["NumLogs"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxn",
                    immediates=[int, "NumLogs"],
                    args=[0],
                ),
            ],
        ),
        created_asset_id=OpMappingWithOverloads(
            result=pytypes.AssetType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gtxns",
                    immediates=["CreatedAssetID"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxn",
                    immediates=[int, "CreatedAssetID"],
                    args=[0],
                ),
            ],
        ),
        created_application_id=OpMappingWithOverloads(
            result=pytypes.ApplicationType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gtxns",
                    immediates=["CreatedApplicationID"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxn",
                    immediates=[int, "CreatedApplicationID"],
                    args=[0],
                ),
            ],
        ),
        last_log=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gtxns",
                    immediates=["LastLog"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxn",
                    immediates=[int, "LastLog"],
                    args=[0],
                ),
            ],
        ),
        state_proof_pk=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gtxns",
                    immediates=["StateProofPK"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxn",
                    immediates=[int, "StateProofPK"],
                    args=[0],
                ),
            ],
        ),
        approval_program_pages=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=2,
            overloads=[
                FunctionOpMapping(
                    "gtxnsas",
                    immediates=["ApprovalProgramPages"],
                    args=[(pytypes.UInt64Type,), (pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxnsa",
                    immediates=["ApprovalProgramPages", int],
                    args=[(pytypes.UInt64Type,), 1],
                ),
                FunctionOpMapping(
                    "gtxna",
                    immediates=[int, "ApprovalProgramPages", int],
                    args=[0, 2],
                ),
                FunctionOpMapping(
                    "gtxnas",
                    immediates=[int, "ApprovalProgramPages"],
                    args=[0, (pytypes.UInt64Type,)],
                ),
            ],
        ),
        num_approval_program_pages=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gtxns",
                    immediates=["NumApprovalProgramPages"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxn",
                    immediates=[int, "NumApprovalProgramPages"],
                    args=[0],
                ),
            ],
        ),
        clear_state_program_pages=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=2,
            overloads=[
                FunctionOpMapping(
                    "gtxnsas",
                    immediates=["ClearStateProgramPages"],
                    args=[(pytypes.UInt64Type,), (pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxnsa",
                    immediates=["ClearStateProgramPages", int],
                    args=[(pytypes.UInt64Type,), 1],
                ),
                FunctionOpMapping(
                    "gtxna",
                    immediates=[int, "ClearStateProgramPages", int],
                    args=[0, 2],
                ),
                FunctionOpMapping(
                    "gtxnas",
                    immediates=[int, "ClearStateProgramPages"],
                    args=[0, (pytypes.UInt64Type,)],
                ),
            ],
        ),
        num_clear_state_program_pages=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "gtxns",
                    immediates=["NumClearStateProgramPages"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "gtxn",
                    immediates=[int, "NumClearStateProgramPages"],
                    args=[0],
                ),
            ],
        ),
    ),
    Global=dict(
        min_txn_fee=PropertyOpMapping(
            "global",
            "MinTxnFee",
            pytypes.UInt64Type,
        ),
        min_balance=PropertyOpMapping(
            "global",
            "MinBalance",
            pytypes.UInt64Type,
        ),
        max_txn_life=PropertyOpMapping(
            "global",
            "MaxTxnLife",
            pytypes.UInt64Type,
        ),
        zero_address=PropertyOpMapping(
            "global",
            "ZeroAddress",
            pytypes.AccountType,
        ),
        group_size=PropertyOpMapping(
            "global",
            "GroupSize",
            pytypes.UInt64Type,
        ),
        logic_sig_version=PropertyOpMapping(
            "global",
            "LogicSigVersion",
            pytypes.UInt64Type,
        ),
        round=PropertyOpMapping(
            "global",
            "Round",
            pytypes.UInt64Type,
        ),
        latest_timestamp=PropertyOpMapping(
            "global",
            "LatestTimestamp",
            pytypes.UInt64Type,
        ),
        current_application_id=PropertyOpMapping(
            "global",
            "CurrentApplicationID",
            pytypes.ApplicationType,
        ),
        creator_address=PropertyOpMapping(
            "global",
            "CreatorAddress",
            pytypes.AccountType,
        ),
        current_application_address=PropertyOpMapping(
            "global",
            "CurrentApplicationAddress",
            pytypes.AccountType,
        ),
        group_id=PropertyOpMapping(
            "global",
            "GroupID",
            pytypes.BytesType,
        ),
        opcode_budget=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "global",
                    immediates=["OpcodeBudget"],
                ),
            ],
        ),
        caller_application_id=PropertyOpMapping(
            "global",
            "CallerApplicationID",
            pytypes.UInt64Type,
        ),
        caller_application_address=PropertyOpMapping(
            "global",
            "CallerApplicationAddress",
            pytypes.AccountType,
        ),
        asset_create_min_balance=PropertyOpMapping(
            "global",
            "AssetCreateMinBalance",
            pytypes.UInt64Type,
        ),
        asset_opt_in_min_balance=PropertyOpMapping(
            "global",
            "AssetOptInMinBalance",
            pytypes.UInt64Type,
        ),
        genesis_hash=PropertyOpMapping(
            "global",
            "GenesisHash",
            pytypes.BytesType,
        ),
        payouts_enabled=PropertyOpMapping(
            "global",
            "PayoutsEnabled",
            pytypes.BoolType,
        ),
        payouts_go_online_fee=PropertyOpMapping(
            "global",
            "PayoutsGoOnlineFee",
            pytypes.UInt64Type,
        ),
        payouts_percent=PropertyOpMapping(
            "global",
            "PayoutsPercent",
            pytypes.UInt64Type,
        ),
        payouts_min_balance=PropertyOpMapping(
            "global",
            "PayoutsMinBalance",
            pytypes.UInt64Type,
        ),
        payouts_max_balance=PropertyOpMapping(
            "global",
            "PayoutsMaxBalance",
            pytypes.UInt64Type,
        ),
    ),
    ITxn=dict(
        sender=OpMappingWithOverloads(
            result=pytypes.AccountType,
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn",
                    immediates=["Sender"],
                ),
            ],
        ),
        fee=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn",
                    immediates=["Fee"],
                ),
            ],
        ),
        first_valid=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn",
                    immediates=["FirstValid"],
                ),
            ],
        ),
        first_valid_time=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn",
                    immediates=["FirstValidTime"],
                ),
            ],
        ),
        last_valid=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn",
                    immediates=["LastValid"],
                ),
            ],
        ),
        note=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn",
                    immediates=["Note"],
                ),
            ],
        ),
        lease=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn",
                    immediates=["Lease"],
                ),
            ],
        ),
        receiver=OpMappingWithOverloads(
            result=pytypes.AccountType,
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn",
                    immediates=["Receiver"],
                ),
            ],
        ),
        amount=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn",
                    immediates=["Amount"],
                ),
            ],
        ),
        close_remainder_to=OpMappingWithOverloads(
            result=pytypes.AccountType,
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn",
                    immediates=["CloseRemainderTo"],
                ),
            ],
        ),
        vote_pk=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn",
                    immediates=["VotePK"],
                ),
            ],
        ),
        selection_pk=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn",
                    immediates=["SelectionPK"],
                ),
            ],
        ),
        vote_first=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn",
                    immediates=["VoteFirst"],
                ),
            ],
        ),
        vote_last=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn",
                    immediates=["VoteLast"],
                ),
            ],
        ),
        vote_key_dilution=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn",
                    immediates=["VoteKeyDilution"],
                ),
            ],
        ),
        type=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn",
                    immediates=["Type"],
                ),
            ],
        ),
        type_enum=OpMappingWithOverloads(
            result=pytypes.TransactionTypeType,
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn",
                    immediates=["TypeEnum"],
                ),
            ],
        ),
        xfer_asset=OpMappingWithOverloads(
            result=pytypes.AssetType,
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn",
                    immediates=["XferAsset"],
                ),
            ],
        ),
        asset_amount=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn",
                    immediates=["AssetAmount"],
                ),
            ],
        ),
        asset_sender=OpMappingWithOverloads(
            result=pytypes.AccountType,
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn",
                    immediates=["AssetSender"],
                ),
            ],
        ),
        asset_receiver=OpMappingWithOverloads(
            result=pytypes.AccountType,
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn",
                    immediates=["AssetReceiver"],
                ),
            ],
        ),
        asset_close_to=OpMappingWithOverloads(
            result=pytypes.AccountType,
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn",
                    immediates=["AssetCloseTo"],
                ),
            ],
        ),
        group_index=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn",
                    immediates=["GroupIndex"],
                ),
            ],
        ),
        tx_id=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn",
                    immediates=["TxID"],
                ),
            ],
        ),
        application_id=OpMappingWithOverloads(
            result=pytypes.ApplicationType,
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn",
                    immediates=["ApplicationID"],
                ),
            ],
        ),
        on_completion=OpMappingWithOverloads(
            result=pytypes.OnCompleteActionType,
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn",
                    immediates=["OnCompletion"],
                ),
            ],
        ),
        application_args=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "itxnas",
                    immediates=["ApplicationArgs"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "itxna",
                    immediates=["ApplicationArgs", int],
                    args=[1],
                ),
            ],
        ),
        num_app_args=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn",
                    immediates=["NumAppArgs"],
                ),
            ],
        ),
        accounts=OpMappingWithOverloads(
            result=pytypes.AccountType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "itxnas",
                    immediates=["Accounts"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "itxna",
                    immediates=["Accounts", int],
                    args=[1],
                ),
            ],
        ),
        num_accounts=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn",
                    immediates=["NumAccounts"],
                ),
            ],
        ),
        approval_program=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn",
                    immediates=["ApprovalProgram"],
                ),
            ],
        ),
        clear_state_program=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn",
                    immediates=["ClearStateProgram"],
                ),
            ],
        ),
        rekey_to=OpMappingWithOverloads(
            result=pytypes.AccountType,
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn",
                    immediates=["RekeyTo"],
                ),
            ],
        ),
        config_asset=OpMappingWithOverloads(
            result=pytypes.AssetType,
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn",
                    immediates=["ConfigAsset"],
                ),
            ],
        ),
        config_asset_total=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn",
                    immediates=["ConfigAssetTotal"],
                ),
            ],
        ),
        config_asset_decimals=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn",
                    immediates=["ConfigAssetDecimals"],
                ),
            ],
        ),
        config_asset_default_frozen=OpMappingWithOverloads(
            result=pytypes.BoolType,
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn",
                    immediates=["ConfigAssetDefaultFrozen"],
                ),
            ],
        ),
        config_asset_unit_name=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn",
                    immediates=["ConfigAssetUnitName"],
                ),
            ],
        ),
        config_asset_name=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn",
                    immediates=["ConfigAssetName"],
                ),
            ],
        ),
        config_asset_url=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn",
                    immediates=["ConfigAssetURL"],
                ),
            ],
        ),
        config_asset_metadata_hash=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn",
                    immediates=["ConfigAssetMetadataHash"],
                ),
            ],
        ),
        config_asset_manager=OpMappingWithOverloads(
            result=pytypes.AccountType,
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn",
                    immediates=["ConfigAssetManager"],
                ),
            ],
        ),
        config_asset_reserve=OpMappingWithOverloads(
            result=pytypes.AccountType,
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn",
                    immediates=["ConfigAssetReserve"],
                ),
            ],
        ),
        config_asset_freeze=OpMappingWithOverloads(
            result=pytypes.AccountType,
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn",
                    immediates=["ConfigAssetFreeze"],
                ),
            ],
        ),
        config_asset_clawback=OpMappingWithOverloads(
            result=pytypes.AccountType,
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn",
                    immediates=["ConfigAssetClawback"],
                ),
            ],
        ),
        freeze_asset=OpMappingWithOverloads(
            result=pytypes.AssetType,
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn",
                    immediates=["FreezeAsset"],
                ),
            ],
        ),
        freeze_asset_account=OpMappingWithOverloads(
            result=pytypes.AccountType,
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn",
                    immediates=["FreezeAssetAccount"],
                ),
            ],
        ),
        freeze_asset_frozen=OpMappingWithOverloads(
            result=pytypes.BoolType,
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn",
                    immediates=["FreezeAssetFrozen"],
                ),
            ],
        ),
        assets=OpMappingWithOverloads(
            result=pytypes.AssetType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "itxnas",
                    immediates=["Assets"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "itxna",
                    immediates=["Assets", int],
                    args=[1],
                ),
            ],
        ),
        num_assets=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn",
                    immediates=["NumAssets"],
                ),
            ],
        ),
        applications=OpMappingWithOverloads(
            result=pytypes.ApplicationType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "itxnas",
                    immediates=["Applications"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "itxna",
                    immediates=["Applications", int],
                    args=[1],
                ),
            ],
        ),
        num_applications=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn",
                    immediates=["NumApplications"],
                ),
            ],
        ),
        global_num_uint=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn",
                    immediates=["GlobalNumUint"],
                ),
            ],
        ),
        global_num_byte_slice=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn",
                    immediates=["GlobalNumByteSlice"],
                ),
            ],
        ),
        local_num_uint=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn",
                    immediates=["LocalNumUint"],
                ),
            ],
        ),
        local_num_byte_slice=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn",
                    immediates=["LocalNumByteSlice"],
                ),
            ],
        ),
        extra_program_pages=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn",
                    immediates=["ExtraProgramPages"],
                ),
            ],
        ),
        nonparticipation=OpMappingWithOverloads(
            result=pytypes.BoolType,
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn",
                    immediates=["Nonparticipation"],
                ),
            ],
        ),
        logs=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "itxnas",
                    immediates=["Logs"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "itxna",
                    immediates=["Logs", int],
                    args=[1],
                ),
            ],
        ),
        num_logs=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn",
                    immediates=["NumLogs"],
                ),
            ],
        ),
        created_asset_id=OpMappingWithOverloads(
            result=pytypes.AssetType,
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn",
                    immediates=["CreatedAssetID"],
                ),
            ],
        ),
        created_application_id=OpMappingWithOverloads(
            result=pytypes.ApplicationType,
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn",
                    immediates=["CreatedApplicationID"],
                ),
            ],
        ),
        last_log=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn",
                    immediates=["LastLog"],
                ),
            ],
        ),
        state_proof_pk=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn",
                    immediates=["StateProofPK"],
                ),
            ],
        ),
        approval_program_pages=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "itxnas",
                    immediates=["ApprovalProgramPages"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "itxna",
                    immediates=["ApprovalProgramPages", int],
                    args=[1],
                ),
            ],
        ),
        num_approval_program_pages=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn",
                    immediates=["NumApprovalProgramPages"],
                ),
            ],
        ),
        clear_state_program_pages=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "itxnas",
                    immediates=["ClearStateProgramPages"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "itxna",
                    immediates=["ClearStateProgramPages", int],
                    args=[1],
                ),
            ],
        ),
        num_clear_state_program_pages=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn",
                    immediates=["NumClearStateProgramPages"],
                ),
            ],
        ),
    ),
    ITxnCreate=dict(
        begin=OpMappingWithOverloads(
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn_begin",
                ),
            ],
        ),
        next=OpMappingWithOverloads(
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn_next",
                ),
            ],
        ),
        submit=OpMappingWithOverloads(
            arity=0,
            overloads=[
                FunctionOpMapping(
                    "itxn_submit",
                ),
            ],
        ),
        set_sender=OpMappingWithOverloads(
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "itxn_field",
                    immediates=["Sender"],
                    args=[(pytypes.AccountType,)],
                ),
            ],
        ),
        set_fee=OpMappingWithOverloads(
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "itxn_field",
                    immediates=["Fee"],
                    args=[(pytypes.UInt64Type,)],
                ),
            ],
        ),
        set_note=OpMappingWithOverloads(
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "itxn_field",
                    immediates=["Note"],
                    args=[(pytypes.BytesType,)],
                ),
            ],
        ),
        set_receiver=OpMappingWithOverloads(
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "itxn_field",
                    immediates=["Receiver"],
                    args=[(pytypes.AccountType,)],
                ),
            ],
        ),
        set_amount=OpMappingWithOverloads(
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "itxn_field",
                    immediates=["Amount"],
                    args=[(pytypes.UInt64Type,)],
                ),
            ],
        ),
        set_close_remainder_to=OpMappingWithOverloads(
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "itxn_field",
                    immediates=["CloseRemainderTo"],
                    args=[(pytypes.AccountType,)],
                ),
            ],
        ),
        set_vote_pk=OpMappingWithOverloads(
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "itxn_field",
                    immediates=["VotePK"],
                    args=[(pytypes.BytesType,)],
                ),
            ],
        ),
        set_selection_pk=OpMappingWithOverloads(
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "itxn_field",
                    immediates=["SelectionPK"],
                    args=[(pytypes.BytesType,)],
                ),
            ],
        ),
        set_vote_first=OpMappingWithOverloads(
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "itxn_field",
                    immediates=["VoteFirst"],
                    args=[(pytypes.UInt64Type,)],
                ),
            ],
        ),
        set_vote_last=OpMappingWithOverloads(
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "itxn_field",
                    immediates=["VoteLast"],
                    args=[(pytypes.UInt64Type,)],
                ),
            ],
        ),
        set_vote_key_dilution=OpMappingWithOverloads(
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "itxn_field",
                    immediates=["VoteKeyDilution"],
                    args=[(pytypes.UInt64Type,)],
                ),
            ],
        ),
        set_type=OpMappingWithOverloads(
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "itxn_field",
                    immediates=["Type"],
                    args=[(pytypes.BytesType,)],
                ),
            ],
        ),
        set_type_enum=OpMappingWithOverloads(
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "itxn_field",
                    immediates=["TypeEnum"],
                    args=[(pytypes.UInt64Type,)],
                ),
            ],
        ),
        set_xfer_asset=OpMappingWithOverloads(
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "itxn_field",
                    immediates=["XferAsset"],
                    args=[(pytypes.AssetType, pytypes.UInt64Type)],
                ),
            ],
        ),
        set_asset_amount=OpMappingWithOverloads(
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "itxn_field",
                    immediates=["AssetAmount"],
                    args=[(pytypes.UInt64Type,)],
                ),
            ],
        ),
        set_asset_sender=OpMappingWithOverloads(
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "itxn_field",
                    immediates=["AssetSender"],
                    args=[(pytypes.AccountType,)],
                ),
            ],
        ),
        set_asset_receiver=OpMappingWithOverloads(
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "itxn_field",
                    immediates=["AssetReceiver"],
                    args=[(pytypes.AccountType,)],
                ),
            ],
        ),
        set_asset_close_to=OpMappingWithOverloads(
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "itxn_field",
                    immediates=["AssetCloseTo"],
                    args=[(pytypes.AccountType,)],
                ),
            ],
        ),
        set_application_id=OpMappingWithOverloads(
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "itxn_field",
                    immediates=["ApplicationID"],
                    args=[(pytypes.ApplicationType, pytypes.UInt64Type)],
                ),
            ],
        ),
        set_on_completion=OpMappingWithOverloads(
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "itxn_field",
                    immediates=["OnCompletion"],
                    args=[(pytypes.UInt64Type,)],
                ),
            ],
        ),
        set_application_args=OpMappingWithOverloads(
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "itxn_field",
                    immediates=["ApplicationArgs"],
                    args=[(pytypes.BytesType,)],
                ),
            ],
        ),
        set_accounts=OpMappingWithOverloads(
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "itxn_field",
                    immediates=["Accounts"],
                    args=[(pytypes.AccountType,)],
                ),
            ],
        ),
        set_approval_program=OpMappingWithOverloads(
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "itxn_field",
                    immediates=["ApprovalProgram"],
                    args=[(pytypes.BytesType,)],
                ),
            ],
        ),
        set_clear_state_program=OpMappingWithOverloads(
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "itxn_field",
                    immediates=["ClearStateProgram"],
                    args=[(pytypes.BytesType,)],
                ),
            ],
        ),
        set_rekey_to=OpMappingWithOverloads(
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "itxn_field",
                    immediates=["RekeyTo"],
                    args=[(pytypes.AccountType,)],
                ),
            ],
        ),
        set_config_asset=OpMappingWithOverloads(
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "itxn_field",
                    immediates=["ConfigAsset"],
                    args=[(pytypes.AssetType, pytypes.UInt64Type)],
                ),
            ],
        ),
        set_config_asset_total=OpMappingWithOverloads(
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "itxn_field",
                    immediates=["ConfigAssetTotal"],
                    args=[(pytypes.UInt64Type,)],
                ),
            ],
        ),
        set_config_asset_decimals=OpMappingWithOverloads(
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "itxn_field",
                    immediates=["ConfigAssetDecimals"],
                    args=[(pytypes.UInt64Type,)],
                ),
            ],
        ),
        set_config_asset_default_frozen=OpMappingWithOverloads(
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "itxn_field",
                    immediates=["ConfigAssetDefaultFrozen"],
                    args=[(pytypes.BoolType, pytypes.UInt64Type)],
                ),
            ],
        ),
        set_config_asset_unit_name=OpMappingWithOverloads(
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "itxn_field",
                    immediates=["ConfigAssetUnitName"],
                    args=[(pytypes.BytesType,)],
                ),
            ],
        ),
        set_config_asset_name=OpMappingWithOverloads(
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "itxn_field",
                    immediates=["ConfigAssetName"],
                    args=[(pytypes.BytesType,)],
                ),
            ],
        ),
        set_config_asset_url=OpMappingWithOverloads(
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "itxn_field",
                    immediates=["ConfigAssetURL"],
                    args=[(pytypes.BytesType,)],
                ),
            ],
        ),
        set_config_asset_metadata_hash=OpMappingWithOverloads(
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "itxn_field",
                    immediates=["ConfigAssetMetadataHash"],
                    args=[(pytypes.BytesType,)],
                ),
            ],
        ),
        set_config_asset_manager=OpMappingWithOverloads(
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "itxn_field",
                    immediates=["ConfigAssetManager"],
                    args=[(pytypes.AccountType,)],
                ),
            ],
        ),
        set_config_asset_reserve=OpMappingWithOverloads(
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "itxn_field",
                    immediates=["ConfigAssetReserve"],
                    args=[(pytypes.AccountType,)],
                ),
            ],
        ),
        set_config_asset_freeze=OpMappingWithOverloads(
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "itxn_field",
                    immediates=["ConfigAssetFreeze"],
                    args=[(pytypes.AccountType,)],
                ),
            ],
        ),
        set_config_asset_clawback=OpMappingWithOverloads(
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "itxn_field",
                    immediates=["ConfigAssetClawback"],
                    args=[(pytypes.AccountType,)],
                ),
            ],
        ),
        set_freeze_asset=OpMappingWithOverloads(
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "itxn_field",
                    immediates=["FreezeAsset"],
                    args=[(pytypes.AssetType, pytypes.UInt64Type)],
                ),
            ],
        ),
        set_freeze_asset_account=OpMappingWithOverloads(
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "itxn_field",
                    immediates=["FreezeAssetAccount"],
                    args=[(pytypes.AccountType,)],
                ),
            ],
        ),
        set_freeze_asset_frozen=OpMappingWithOverloads(
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "itxn_field",
                    immediates=["FreezeAssetFrozen"],
                    args=[(pytypes.BoolType, pytypes.UInt64Type)],
                ),
            ],
        ),
        set_assets=OpMappingWithOverloads(
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "itxn_field",
                    immediates=["Assets"],
                    args=[(pytypes.UInt64Type,)],
                ),
            ],
        ),
        set_applications=OpMappingWithOverloads(
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "itxn_field",
                    immediates=["Applications"],
                    args=[(pytypes.UInt64Type,)],
                ),
            ],
        ),
        set_global_num_uint=OpMappingWithOverloads(
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "itxn_field",
                    immediates=["GlobalNumUint"],
                    args=[(pytypes.UInt64Type,)],
                ),
            ],
        ),
        set_global_num_byte_slice=OpMappingWithOverloads(
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "itxn_field",
                    immediates=["GlobalNumByteSlice"],
                    args=[(pytypes.UInt64Type,)],
                ),
            ],
        ),
        set_local_num_uint=OpMappingWithOverloads(
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "itxn_field",
                    immediates=["LocalNumUint"],
                    args=[(pytypes.UInt64Type,)],
                ),
            ],
        ),
        set_local_num_byte_slice=OpMappingWithOverloads(
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "itxn_field",
                    immediates=["LocalNumByteSlice"],
                    args=[(pytypes.UInt64Type,)],
                ),
            ],
        ),
        set_extra_program_pages=OpMappingWithOverloads(
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "itxn_field",
                    immediates=["ExtraProgramPages"],
                    args=[(pytypes.UInt64Type,)],
                ),
            ],
        ),
        set_nonparticipation=OpMappingWithOverloads(
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "itxn_field",
                    immediates=["Nonparticipation"],
                    args=[(pytypes.BoolType, pytypes.UInt64Type)],
                ),
            ],
        ),
        set_state_proof_pk=OpMappingWithOverloads(
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "itxn_field",
                    immediates=["StateProofPK"],
                    args=[(pytypes.BytesType,)],
                ),
            ],
        ),
        set_approval_program_pages=OpMappingWithOverloads(
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "itxn_field",
                    immediates=["ApprovalProgramPages"],
                    args=[(pytypes.BytesType,)],
                ),
            ],
        ),
        set_clear_state_program_pages=OpMappingWithOverloads(
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "itxn_field",
                    immediates=["ClearStateProgramPages"],
                    args=[(pytypes.BytesType,)],
                ),
            ],
        ),
    ),
    JsonRef=dict(
        json_string=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=2,
            overloads=[
                FunctionOpMapping(
                    "json_ref",
                    immediates=["JSONString"],
                    args=[(pytypes.BytesType,), (pytypes.BytesType,)],
                ),
            ],
        ),
        json_uint64=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=2,
            overloads=[
                FunctionOpMapping(
                    "json_ref",
                    immediates=["JSONUint64"],
                    args=[(pytypes.BytesType,), (pytypes.BytesType,)],
                ),
            ],
        ),
        json_object=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=2,
            overloads=[
                FunctionOpMapping(
                    "json_ref",
                    immediates=["JSONObject"],
                    args=[(pytypes.BytesType,), (pytypes.BytesType,)],
                ),
            ],
        ),
    ),
    Scratch=dict(
        load_bytes=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "loads",
                    args=[(pytypes.UInt64Type,)],
                ),
            ],
        ),
        load_uint64=OpMappingWithOverloads(
            result=pytypes.UInt64Type,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "loads",
                    args=[(pytypes.UInt64Type,)],
                ),
            ],
        ),
        store=OpMappingWithOverloads(
            arity=2,
            overloads=[
                FunctionOpMapping(
                    "stores",
                    args=[(pytypes.UInt64Type,), (pytypes.BytesType, pytypes.UInt64Type)],
                ),
            ],
        ),
    ),
    Txn=dict(
        sender=PropertyOpMapping(
            "txn",
            "Sender",
            pytypes.AccountType,
        ),
        fee=PropertyOpMapping(
            "txn",
            "Fee",
            pytypes.UInt64Type,
        ),
        first_valid=PropertyOpMapping(
            "txn",
            "FirstValid",
            pytypes.UInt64Type,
        ),
        first_valid_time=PropertyOpMapping(
            "txn",
            "FirstValidTime",
            pytypes.UInt64Type,
        ),
        last_valid=PropertyOpMapping(
            "txn",
            "LastValid",
            pytypes.UInt64Type,
        ),
        note=PropertyOpMapping(
            "txn",
            "Note",
            pytypes.BytesType,
        ),
        lease=PropertyOpMapping(
            "txn",
            "Lease",
            pytypes.BytesType,
        ),
        receiver=PropertyOpMapping(
            "txn",
            "Receiver",
            pytypes.AccountType,
        ),
        amount=PropertyOpMapping(
            "txn",
            "Amount",
            pytypes.UInt64Type,
        ),
        close_remainder_to=PropertyOpMapping(
            "txn",
            "CloseRemainderTo",
            pytypes.AccountType,
        ),
        vote_pk=PropertyOpMapping(
            "txn",
            "VotePK",
            pytypes.BytesType,
        ),
        selection_pk=PropertyOpMapping(
            "txn",
            "SelectionPK",
            pytypes.BytesType,
        ),
        vote_first=PropertyOpMapping(
            "txn",
            "VoteFirst",
            pytypes.UInt64Type,
        ),
        vote_last=PropertyOpMapping(
            "txn",
            "VoteLast",
            pytypes.UInt64Type,
        ),
        vote_key_dilution=PropertyOpMapping(
            "txn",
            "VoteKeyDilution",
            pytypes.UInt64Type,
        ),
        type=PropertyOpMapping(
            "txn",
            "Type",
            pytypes.BytesType,
        ),
        type_enum=PropertyOpMapping(
            "txn",
            "TypeEnum",
            pytypes.TransactionTypeType,
        ),
        xfer_asset=PropertyOpMapping(
            "txn",
            "XferAsset",
            pytypes.AssetType,
        ),
        asset_amount=PropertyOpMapping(
            "txn",
            "AssetAmount",
            pytypes.UInt64Type,
        ),
        asset_sender=PropertyOpMapping(
            "txn",
            "AssetSender",
            pytypes.AccountType,
        ),
        asset_receiver=PropertyOpMapping(
            "txn",
            "AssetReceiver",
            pytypes.AccountType,
        ),
        asset_close_to=PropertyOpMapping(
            "txn",
            "AssetCloseTo",
            pytypes.AccountType,
        ),
        group_index=PropertyOpMapping(
            "txn",
            "GroupIndex",
            pytypes.UInt64Type,
        ),
        tx_id=PropertyOpMapping(
            "txn",
            "TxID",
            pytypes.BytesType,
        ),
        application_id=PropertyOpMapping(
            "txn",
            "ApplicationID",
            pytypes.ApplicationType,
        ),
        on_completion=PropertyOpMapping(
            "txn",
            "OnCompletion",
            pytypes.OnCompleteActionType,
        ),
        application_args=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "txnas",
                    immediates=["ApplicationArgs"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "txna",
                    immediates=["ApplicationArgs", int],
                    args=[1],
                ),
            ],
        ),
        num_app_args=PropertyOpMapping(
            "txn",
            "NumAppArgs",
            pytypes.UInt64Type,
        ),
        accounts=OpMappingWithOverloads(
            result=pytypes.AccountType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "txnas",
                    immediates=["Accounts"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "txna",
                    immediates=["Accounts", int],
                    args=[1],
                ),
            ],
        ),
        num_accounts=PropertyOpMapping(
            "txn",
            "NumAccounts",
            pytypes.UInt64Type,
        ),
        approval_program=PropertyOpMapping(
            "txn",
            "ApprovalProgram",
            pytypes.BytesType,
        ),
        clear_state_program=PropertyOpMapping(
            "txn",
            "ClearStateProgram",
            pytypes.BytesType,
        ),
        rekey_to=PropertyOpMapping(
            "txn",
            "RekeyTo",
            pytypes.AccountType,
        ),
        config_asset=PropertyOpMapping(
            "txn",
            "ConfigAsset",
            pytypes.AssetType,
        ),
        config_asset_total=PropertyOpMapping(
            "txn",
            "ConfigAssetTotal",
            pytypes.UInt64Type,
        ),
        config_asset_decimals=PropertyOpMapping(
            "txn",
            "ConfigAssetDecimals",
            pytypes.UInt64Type,
        ),
        config_asset_default_frozen=PropertyOpMapping(
            "txn",
            "ConfigAssetDefaultFrozen",
            pytypes.BoolType,
        ),
        config_asset_unit_name=PropertyOpMapping(
            "txn",
            "ConfigAssetUnitName",
            pytypes.BytesType,
        ),
        config_asset_name=PropertyOpMapping(
            "txn",
            "ConfigAssetName",
            pytypes.BytesType,
        ),
        config_asset_url=PropertyOpMapping(
            "txn",
            "ConfigAssetURL",
            pytypes.BytesType,
        ),
        config_asset_metadata_hash=PropertyOpMapping(
            "txn",
            "ConfigAssetMetadataHash",
            pytypes.BytesType,
        ),
        config_asset_manager=PropertyOpMapping(
            "txn",
            "ConfigAssetManager",
            pytypes.AccountType,
        ),
        config_asset_reserve=PropertyOpMapping(
            "txn",
            "ConfigAssetReserve",
            pytypes.AccountType,
        ),
        config_asset_freeze=PropertyOpMapping(
            "txn",
            "ConfigAssetFreeze",
            pytypes.AccountType,
        ),
        config_asset_clawback=PropertyOpMapping(
            "txn",
            "ConfigAssetClawback",
            pytypes.AccountType,
        ),
        freeze_asset=PropertyOpMapping(
            "txn",
            "FreezeAsset",
            pytypes.AssetType,
        ),
        freeze_asset_account=PropertyOpMapping(
            "txn",
            "FreezeAssetAccount",
            pytypes.AccountType,
        ),
        freeze_asset_frozen=PropertyOpMapping(
            "txn",
            "FreezeAssetFrozen",
            pytypes.BoolType,
        ),
        assets=OpMappingWithOverloads(
            result=pytypes.AssetType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "txnas",
                    immediates=["Assets"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "txna",
                    immediates=["Assets", int],
                    args=[1],
                ),
            ],
        ),
        num_assets=PropertyOpMapping(
            "txn",
            "NumAssets",
            pytypes.UInt64Type,
        ),
        applications=OpMappingWithOverloads(
            result=pytypes.ApplicationType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "txnas",
                    immediates=["Applications"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "txna",
                    immediates=["Applications", int],
                    args=[1],
                ),
            ],
        ),
        num_applications=PropertyOpMapping(
            "txn",
            "NumApplications",
            pytypes.UInt64Type,
        ),
        global_num_uint=PropertyOpMapping(
            "txn",
            "GlobalNumUint",
            pytypes.UInt64Type,
        ),
        global_num_byte_slice=PropertyOpMapping(
            "txn",
            "GlobalNumByteSlice",
            pytypes.UInt64Type,
        ),
        local_num_uint=PropertyOpMapping(
            "txn",
            "LocalNumUint",
            pytypes.UInt64Type,
        ),
        local_num_byte_slice=PropertyOpMapping(
            "txn",
            "LocalNumByteSlice",
            pytypes.UInt64Type,
        ),
        extra_program_pages=PropertyOpMapping(
            "txn",
            "ExtraProgramPages",
            pytypes.UInt64Type,
        ),
        nonparticipation=PropertyOpMapping(
            "txn",
            "Nonparticipation",
            pytypes.BoolType,
        ),
        logs=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "txnas",
                    immediates=["Logs"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "txna",
                    immediates=["Logs", int],
                    args=[1],
                ),
            ],
        ),
        num_logs=PropertyOpMapping(
            "txn",
            "NumLogs",
            pytypes.UInt64Type,
        ),
        created_asset_id=PropertyOpMapping(
            "txn",
            "CreatedAssetID",
            pytypes.AssetType,
        ),
        created_application_id=PropertyOpMapping(
            "txn",
            "CreatedApplicationID",
            pytypes.ApplicationType,
        ),
        last_log=PropertyOpMapping(
            "txn",
            "LastLog",
            pytypes.BytesType,
        ),
        state_proof_pk=PropertyOpMapping(
            "txn",
            "StateProofPK",
            pytypes.BytesType,
        ),
        approval_program_pages=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "txnas",
                    immediates=["ApprovalProgramPages"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "txna",
                    immediates=["ApprovalProgramPages", int],
                    args=[1],
                ),
            ],
        ),
        num_approval_program_pages=PropertyOpMapping(
            "txn",
            "NumApprovalProgramPages",
            pytypes.UInt64Type,
        ),
        clear_state_program_pages=OpMappingWithOverloads(
            result=pytypes.BytesType,
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "txnas",
                    immediates=["ClearStateProgramPages"],
                    args=[(pytypes.UInt64Type,)],
                ),
                FunctionOpMapping(
                    "txna",
                    immediates=["ClearStateProgramPages", int],
                    args=[1],
                ),
            ],
        ),
        num_clear_state_program_pages=PropertyOpMapping(
            "txn",
            "NumClearStateProgramPages",
            pytypes.UInt64Type,
        ),
    ),
    VoterParamsGet=dict(
        voter_balance=OpMappingWithOverloads(
            result=pytypes.GenericTupleType.parameterise(
                (pytypes.UInt64Type, pytypes.BoolType), source_location=None
            ),
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "voter_params_get",
                    immediates=["VoterBalance"],
                    args=[(pytypes.AccountType, pytypes.UInt64Type)],
                ),
            ],
        ),
        voter_incentive_eligible=OpMappingWithOverloads(
            result=pytypes.GenericTupleType.parameterise(
                (pytypes.BoolType, pytypes.BoolType), source_location=None
            ),
            arity=1,
            overloads=[
                FunctionOpMapping(
                    "voter_params_get",
                    immediates=["VoterIncentiveEligible"],
                    args=[(pytypes.AccountType, pytypes.UInt64Type)],
                ),
            ],
        ),
    ),
)