{"question":"","answer":"Back to top\nView this page\nToggle Light \/ Dark \/ Auto color theme\nToggle table of contents sidebar\nAlgorand Python\n\u00b6\nAlgorand Python is a partial implementation of the Python programming language that runs on the AVM. It includes a statically typed framework for development of Algorand smart contracts and logic signatures, with Pythonic interfaces to underlying AVM functionality that works with standard Python tooling.\nAlgorand Python is compiled for execution on the AVM by PuyaPy, an optimising compiler that ensures the resulting AVM bytecode execution semantics that match the given Python code. PuyaPy produces output that is directly compatible with\nAlgoKit typed clients\nto make deployment and calling easy.\nQuick start\n\u00b6\nThe easiest way to use Algorand Python is to instantiate a template with AlgoKit via\nalgokit\ninit\n-t\npython\n. This will give you a full development environment with intellisense, linting, automatic formatting, breakpoint debugging, deployment and CI\/CD.\nAlternatively, if you want to start from scratch you can do the following:\nEnsure you have Python 3.12+\nInstall\nAlgoKit CLI\nCheck you can run the compiler:\nalgokit\ncompile\npy\n-h\nInstall Algorand Python into your project\npoetry\nadd\nalgorand-python\nCreate a contract in a (e.g.)\ncontract.py\nfile:\nfrom\nalgopy\nimport\nARC4Contract\n,\narc4\nclass\nHelloWorldContract\n(\nARC4Contract\n):\n@arc4\n.\nabimethod\ndef\nhello\n(\nself\n,\nname\n:\narc4\n.\nString\n)\n->\narc4\n.\nString\n:\nreturn\n\"Hello, \"\n+\nname\nCompile the contract:\nalgokit\ncompile\npy\ncontract.py\nYou should now have\nHelloWorldContract.approval.teal\nand\nHelloWorldContract.clear.teal\non the file system!\nWe generally recommend using ARC-32 and\ngenerated typed clients\nto have the most optimal deployment and consumption experience; to do this you need to ask PuyaPy to output an ARC-32 compatible app spec file:\nalgokit\ncompile\npy\ncontract.py\n--output-arc32\n--no-output-teal\nYou should now have\nHelloWorldContract.arc32.json\n, which can be generated into a client e.g. using AlgoKit CLI:\nalgokit\ngenerate\nclient\nHelloWorldContract.arc32.json\n--output\nclient.py\nFrom here you can dive into the\nexamples\nor look at the\ndocumentation\n.\nProgramming with Algorand Python\n\u00b6\nTo get started developing with Algorand Python, please take a look at the\nLanguage Guide\n.\nUsing the PuyaPy compiler\n\u00b6\nTo see detailed guidance for using the PuyaPy compiler, please take a look at the\nCompiler guide\n.\nNext\nLanguage Guide\nCopyright \u00a9 2024, Algorand Foundation\nMade with\nSphinx\nand\n@pradyunsg\n's\nFuro"} {"question":"","answer":"Back to top\nView this page\nToggle Light \/ Dark \/ Auto color theme\nToggle table of contents sidebar\nProgram structure\n\u00b6\nAn Algorand Python smart contract is defined within a single class. You can extend other\ncontracts (through inheritance), and also define standalone functions and reference them. This also\nworks across different Python packages - in other words, you can have a Python library with common\nfunctions and re-use that library across multiple projects!\nModules\n\u00b6\nAlgorand Python modules are files that end in\n.py\n, as with standard Python. Sub-modules are\nsupported as well, so you\u2019re free to organise your Algorand Python code however you see fit.\nThe standard python import rules apply, including\nrelative vs absolute import\nrequirements.\nA given module can contain zero, one, or many smart contracts and\/or logic signatures.\nA module can contain\ncontracts\n,\nsubroutines\n,\nlogic signatures\n, and\ncompile-time constant code and values\n.\nTyping\n\u00b6\nAlgorand Python code must be fully typed with\ntype annotations\n.\nIn practice, this mostly means annotating the arguments and return types of all functions.\nSubroutines\n\u00b6\nSubroutines are \u201cinternal\u201d or \u201cprivate\u201d methods to a contract. They can exist as part of a contract\nclass, or at the module level so they can be used by multiple classes or even across multiple\nprojects.\nYou can pass parameters to subroutines and define local variables, both of which automatically get\nmanaged for you with semantics that match Python semantics.\nAll subroutines must be decorated with\nalgopy.subroutine\n, like so:\ndef\nfoo\n()\n->\nNone\n:\n# compiler error: not decorated with subroutine\n...\n@algopy\n.\nsubroutine\ndef\nbar\n()\n->\nNone\n:\n...\nNote\nRequiring this decorator serves two key purposes:\nYou get an understandable error message if you try and use a third party package that wasn\u2019t\nbuilt for Algorand Python\nIt provides for the ability to modify the functions on the fly when running in Python itself, in\na future testing framework.\nArgument and return types to a subroutine can be any Algorand Python variable type (except for\nsome inner transaction types\n).\nReturning multiple values is allowed, this is annotated in the standard Python way with\ntuple\n:\n@algopy\n.\nsubroutine\ndef\nreturn_two_things\n()\n->\ntuple\n[\nalgopy\n.\nUInt64\n,\nalgopy\n.\nString\n]:\n...\nKeyword only and positional only argument list modifiers are supported:\n@algopy\n.\nsubroutine\ndef\nmy_method\n(\na\n:\nalgopy\n.\nUInt64\n,\n\/\n,\nb\n:\nalgopy\n.\nUInt64\n,\n*\n,\nc\n:\nalgopy\n.\nUInt64\n)\n->\nNone\n:\n...\nIn this example,\na\ncan only be passed positionally,\nb\ncan be passed either by position or by\nname, and\nc\ncan only be passed by name.\nThe following argument\/return types are not currently supported:\nType unions\nVariadic args like\n*args\n,\n**kwargs\nPython types such as\nint\nDefault values are not supported\nContract classes\n\u00b6\nAn\nAlgorand smart contract\nconsists of two distinct \u201cprograms\u201d; an approval program, and a\nclear-state program. These are tied together in Algorand Python as a single class.\nAll contracts must inherit from the base class\nalgopy.Contract\n- either directly or indirectly,\nwhich can include inheriting from\nalgopy.ARC4Contract\n.\nThe life-cycle of a smart contract matches the semantics of Python classes when you consider\ndeploying a smart contract as \u201cinstantiating\u201d the class. Any calls to that smart contract are made\nto that instance of the smart contract, and any state assigned to\nself.\nwill persist across\ndifferent invocations (provided the transaction it was a part of succeeds, of course). You can\ndeploy the same contract class multiple times, each will become a distinct and isolated instance.\nContract classes can optionally implement an\n__init__\nmethod, which will be executed exactly\nonce, on first deployment. This method takes no arguments, but can contain arbitrary code,\nincluding reading directly from the transaction arguments via\nTxn\n. This makes\nit a good place to put common initialisation code, particularly in ARC-4 contracts with multiple\nmethods that allow for creation.\nThe contract class body should not contain any logic or variable initialisations, only method\ndefinitions. Forward type declarations are allowed.\nExample:\nclass\nMyContract\n(\nalgopy\n.\nContract\n):\nfoo\n:\nalgopy\n.\nUInt64\n# okay\nbar\n=\nalgopy\n.\nUInt64\n(\n1\n)\n# not allowed\nif\nTrue\n:\n# also not allowed\nbar\n=\nalgopy\n.\nUInt64\n(\n2\n)\nOnly concrete (ie non-abstract) classes produce output artifacts for deployment. To mark a class\nas explicitly abstract, inherit from\nabc.ABC\n.\nNote\nThe compiler will produce a warning if a Contract class is implicitly abstract, i.e. if any\nabstract methods are unimplemented.\nFor more about inheritance and it\u2019s role in code reuse, see the section\nin\nCode reuse\nContract class configuration\n\u00b6\nWhen defining a contract subclass you can pass configuration options to the\nalgopy.Contract\nbase class\nper the API documentation\n.\nNamely you can pass in:\nname\n- Which will affect the output TEAL file name if there are multiple non-abstract contracts\nin the same file and will also be used as the contract name in the ARC-32 application.json instead of the class name.\nscratch_slots\n- Which allows you to mark a slot ID or range of slot IDs as \u201coff limits\u201d to Puya\nso you can manually use them.\nstate_totals\n- Which allows defining what values should be used for global and local uint and bytes storage values\nwhen creating a contract and will appear in ARC-32 app spec.\nFull example:\nGLOBAL_UINTS\n=\n3\nclass\nMyContract\n(\nalgopy\n.\nContract\n,\nname\n=\n\"CustomName\"\n,\nscratch_slots\n=\n[\n5\n,\n25\n,\nalgopy\n.\nurange\n(\n110\n,\n115\n)],\nstate_totals\n=\nalgopy\n.\nStateTotals\n(\nlocal_bytes\n=\n1\n,\nlocal_uints\n=\n2\n,\nglobal_bytes\n=\n4\n,\nglobal_uints\n=\nGLOBAL_UINTS\n),\n):\n...\nExample: Simplest possible\nalgopy.Contract\nimplementation\n\u00b6\nFor a non-ARC4 contract, the contract class must implement an\napproval_program\nand\na\nclear_state_program\nmethod.\nAs an example, this is a valid contract that always approves:\nclass\nContract\n(\nalgopy\n.\nContract\n):\ndef\napproval_program\n(\nself\n)\n->\nbool\n:\nreturn\nTrue\ndef\nclear_state_program\n(\nself\n)\n->\nbool\n:\nreturn\nTrue\nThe return value of these methods can be either a\nbool\nthat indicates whether the transaction\nshould approve or not, or a\nalgopy.UInt64\nvalue, where\nUInt64(0)\nindicates that the transaction\nshould be rejected and any other value indicates that it should be approved.\nExample: Simple call counter\n\u00b6\nHere is a very simple example contract that maintains a counter of how many times it has\nbeen called (including on create).\nclass\nCounter\n(\nalgopy\n.\nContract\n):\ndef\n__init__\n(\nself\n)\n->\nNone\n:\nself\n.\ncounter\n=\nalgopy\n.\nUInt64\n(\n0\n)\ndef\napproval_program\n(\nself\n)\n->\nbool\n:\nmatch\nalgopy\n.\nTxn\n.\non_completion\n:\ncase\nalgopy\n.\nOnCompleteAction\n.\nNoOp\n:\nself\n.\nincrement_counter\n()\nreturn\nTrue\ncase\n_\n:\n# reject all OnCompletionAction's other than NoOp\nreturn\nFalse\ndef\nclear_state_program\n(\nself\n)\n->\nbool\n:\nreturn\nTrue\n@algopy\n.\nsubroutine\ndef\nincrement_counter\n(\nself\n)\n->\nNone\n:\nself\n.\ncounter\n+=\n1\nSome things to note:\nself.counter\nwill be stored in the application\u2019s\nGlobal State\n.\nThe return type of\n__init__\nmust be\nNone\n, per standard typed Python.\nAny methods other than\n__init__\n,\napproval_program\nor\nclear_state_program\nmust be decorated\nwith\n@subroutine\n.\nExample: Simplest possible\nalgopy.ARC4Contract\nimplementation\n\u00b6\nAnd here is a valid ARC4 contract:\nclass\nABIContract\n(\nalgopy\n.\nARC4Contract\n):\npass\nA default\n@algopy.arc4.baremethod\nthat allows contract creation is automatically inserted if no\nother public method allows execution on create.\nThe approval program is always automatically generated, and consists of a router which delegates\nbased on the transaction application args to the correct public method.\nA default\nclear_state_program\nis implemented which always approves, but this can be overridden.\nExample: An ARC4 call counter\n\u00b6\nimport\nalgopy\nclass\nARC4Counter\n(\nalgopy\n.\nARC4Contract\n):\ndef\n__init__\n(\nself\n)\n->\nNone\n:\nself\n.\ncounter\n=\nalgopy\n.\nUInt64\n(\n0\n)\n@algopy\n.\narc4\n.\nabimethod\n(\ncreate\n=\n\"allow\"\n)\ndef\ninvoke\n(\nself\n)\n->\nalgopy\n.\narc4\n.\nUInt64\n:\nself\n.\nincrement_counter\n()\nreturn\nalgopy\n.\narc4\n.\nUInt64\n(\nself\n.\ncounter\n)\n@algopy\n.\nsubroutine\ndef\nincrement_counter\n(\nself\n)\n->\nNone\n:\nself\n.\ncounter\n+=\n1\nThis functions very similarly to the\nsimple example\n.\nThings to note here:\nSince the\ninvoke\nmethod has\ncreate=\"allow\"\n, it can be called both as the method to create the\napp and also to invoke it after creation. This also means that no default bare-method create will\nbe generated, so the only way to create the contract is through this method.\nThe default options for\nabimethod\nis to only allow\nNoOp\nas an on-completion-action, so we\ndon\u2019t need to check this manually.\nThe current call count is returned from the\ninvoke\nmethod.\nEvery method in an\nAR4Contract\nexcept for the optional\n__init__\nand\nclear_state_program\nmethods must be decorated with one of\nalgopy.arc4.abimethod\n,\nalogpy.arc4.baremethod\n, or\nalgopy.subroutine\n.\nsubroutines\nwon\u2019t be directly callable through the default router.\nSee the\nARC-4 section\nof this language guide for more info on the above.\nLogic signatures\n\u00b6\nLogic signatures on Algorand\nare stateless, and consist of a single program. As such, they are implemented as functions in Algorand Python\nrather than classes.\n@algopy\n.\nlogicsig\ndef\nmy_log_sig\n()\n->\nbool\n:\n...\nSimilar to\napproval_program\nor\nclear_state_program\nmethods, the function must take no\narguments, and return either\nbool\nor\nalgopy.UInt64\n. The meaning is the same: a\nTrue\nvalue or non-zero\nUInt64\nvalue indicates success,\nFalse\nor\nUInt64(0)\nindicates failure.\nLogic signatures can make use of subroutines that are not nested in contract classes.\nNext\nTypes\nPrevious\nLanguage Guide\nCopyright \u00a9 2024, Algorand Foundation\nMade with\nSphinx\nand\n@pradyunsg\n's\nFuro"} {"question":"","answer":"Back to top\nView this page\nToggle Light \/ Dark \/ Auto color theme\nToggle table of contents sidebar\nTypes\n\u00b6\nAlgorand Python exposes a number of types that provide a statically typed representation of the behaviour that is possible on the Algorand Virtual Machine.\nTypes\nAVM types\nUInt64\nBytes\nString\nBigUInt\nbool\nAccount\nAsset\nApplication\nPython built-in types\nbool\ntuple\ntyping.NamedTuple\nNone\nint, str, bytes, float\nTemplate variables\nARC-4 types\nAVM types\n\u00b6\nThe most basic\ntypes on the AVM\nare\nuint64\nand\nbytes[]\n, representing unsigned 64-bit integers and byte arrays respectively.\nThese are represented by\nUInt64\nand\nBytes\nin Algorand Python.\nThere are further \u201cbounded\u201d types supported by the AVM, which are backed by these two simple primitives.\nFor example,\nbigint\nrepresents a variably sized (up to 512-bits), unsigned integer, but is actually\nbacked by a\nbytes[]\n. This is represented by\nBigUInt\nin Algorand Python.\nUInt64\n\u00b6\nalgopy.UInt64\nrepresents the underlying AVM\nuint64\ntype.\nIt supports all the same operators as\nint\n, except for\n\/\n, you must use\n\/\/\nfor truncating\ndivision instead.\n# you can instantiate with an integer literal\nnum\n=\nalgopy\n.\nUInt64\n(\n1\n)\n# no arguments default to the zero value\nzero\n=\nalgopy\n.\nUInt64\n()\n# zero is False, any other value is True\nassert\nnot\nzero\nassert\nnum\n# Like Python's `int`, `UInt64` is immutable, so augmented assignment operators return new values\none\n=\nnum\nnum\n+=\n1\nassert\none\n==\n1\nassert\nnum\n==\n2\n# note that once you have a variable of type UInt64, you don't need to type any variables\n# derived from that or wrap int literals\nnum2\n=\nnum\n+\n200\n\/\/\n3\nFurther examples available here\n.\nBytes\n\u00b6\nalgopy.Bytes\nrepresents the underlying AVM\nbytes[]\ntype. It is intended\nto represent binary data, for UTF-8 it might be preferable to use\nString\n.\n# you can instantiate with a bytes literal\ndata\n=\nalgopy\n.\nBytes\n(\nb\n\"abc\"\n)\n# no arguments defaults to an empty value\nempty\n=\nalgopy\n.\nBytes\n()\n# empty is False, non-empty is True\nassert\ndata\nassert\nnot\nempty\n# Like Python's `bytes`, `Bytes` is immutable, augmented assignment operators return new values\nabc\n=\ndata\ndata\n+=\nb\n\"def\"\nassert\nabc\n==\nb\n\"abc\"\nassert\ndata\n==\nb\n\"abcdef\"\n# indexing and slicing are supported, and both return a Bytes\nassert\nabc\n[\n0\n]\n==\nb\n\"a\"\nassert\ndata\n[:\n3\n]\n==\nabc\n# check if a bytes sequence occurs within another\nassert\nabc\nin\ndata\nHint\nIndexing a\nBytes\nreturning a\nBytes\ndiffers from the behaviour of Python\u2019s bytes type, which\nreturns an\nint\n.\n# you can iterate\nfor\ni\nin\nabc\n:\n...\n# construct from encoded values\nbase32_seq\n=\nalgopy\n.\nBytes\n.\nfrom_base32\n(\n'74======'\n)\nbase64_seq\n=\nalgopy\n.\nBytes\n.\nfrom_base64\n(\n'RkY='\n)\nhex_seq\n=\nalgopy\n.\nBytes\n.\nfrom_hex\n(\n'FF'\n)\n# binary manipulations ^, &, |, and ~ are supported\ndata\n^=\n~\n((\nbase32_seq\n&\nbase64_seq\n)\n|\nhex_seq\n)\n# access the length via the .length property\nassert\nabc\n.\nlength\n==\n3\nNote\nSee\nPython builtins\nfor an explanation of why\nlen()\nisn\u2019t supported.\nSee a full example\n.\nString\n\u00b6\nString\nis a special Algorand Python type that represents a UTF8 encoded string.\nIt\u2019s backed by\nBytes\n, which can be accessed through the\n.bytes\n.\nIt works similarly to\nBytes\n, except that it works with\nstr\nliterals rather than\nbytes\nliterals. Additionally, due to a lack of AVM support for unicode data, indexing and length\noperations are not currently supported (simply getting the length of a UTF8 string is an\nO(N)\noperation, which would be quite costly in a smart contract). If you are happy using the length as\nthe number of bytes, then you can call\n.bytes.length\n.\n# you can instantiate with a string literal\ndata\n=\nalgopy\n.\nString\n(\n\"abc\"\n)\n# no arguments defaults to an empty value\nempty\n=\nalgopy\n.\nString\n()\n# empty is False, non-empty is True\nassert\ndata\nassert\nnot\nempty\n# Like Python's `str`, `String` is immutable, augmented assignment operators return new values\nabc\n=\ndata\ndata\n+=\n\"def\"\nassert\nabc\n==\n\"abc\"\nassert\ndata\n==\n\"abcdef\"\n# whilst indexing and slicing are not supported, the following tests are:\nassert\nabc\n.\nstartswith\n(\n\"ab\"\n)\nassert\nabc\n.\nendswith\n(\n\"bc\"\n)\nassert\nabc\nin\ndata\n# you can also join multiple Strings together with a seperator:\nassert\nalgopy\n.\nString\n(\n\", \"\n)\n.\njoin\n((\nabc\n,\nabc\n))\n==\n\"abc, abc\"\n# access the underlying bytes\nassert\nabc\n.\nbytes\n==\nb\n\"abc\"\nSee a full example\n.\nBigUInt\n\u00b6\nalgopy.BigUInt\nrepresents a variable length (max 512-bit) unsigned integer stored\nas\nbytes[]\nin the AVM.\nIt supports all the same operators as\nint\n, except for power (\n**\n), left and right shift (\n<<\nand\n>>\n) and\n\/\n(as with\nUInt64\n, you must use\n\/\/\nfor truncating division instead).\nNote that the op code costs for\nbigint\nmath are an order of magnitude higher than those for\nuint64\nmath. If you just need to handle overflow, take a look at the wide ops such as\naddw\n,\nmulw\n, etc - all of which are exposed through the\nalgopy.op\nmodule.\nAnother contrast between\nbigint\nand\nuint64\nmath is that\nbigint\nmath ops don\u2019t immediately\nerror on overflow - if the result exceeds 512-bits, then you can still access the value via\n.bytes\n, but any further math operations will fail.\n# you can instantiate with an integer literal\nnum\n=\nalgopy\n.\nBigUInt\n(\n1\n)\n# no arguments default to the zero value\nzero\n=\nalgopy\n.\nBigUInt\n()\n# zero is False, any other value is True\nassert\nnot\nzero\nassert\nnum\n# Like Python's `int`, `BigUInt` is immutable, so augmented assignment operators return new values\none\n=\nnum\nnum\n+=\n1\nassert\none\n==\n1\nassert\nnum\n==\nUInt64\n(\n2\n)\n# note that once you have a variable of type BigUInt, you don't need to type any variables\n# derived from that or wrap int literals\nnum2\n=\nnum\n+\n200\n\/\/\n3\nFurther examples available here\n.\nbool\n\u00b6\nThe semantics of the AVM\nbool\nbounded type exactly match the semantics of Python\u2019s built-in\nbool\ntype\nand thus Algorand Python uses the in-built\nbool\ntype from Python.\nPer the behaviour in normal Python, Algorand Python automatically converts various types to\nbool\nwhen they\nappear in statements that expect a\nbool\ne.g.\nif\n\/\nwhile\n\/\nassert\nstatements, appear in Boolean expressions\n(e.g. next to\nand\nor\nor\nkeywords) or are explicitly casted to a bool.\nThe semantics of\nnot\n,\nand\nand\nor\nare special\nper how these keywords work in Python\n(e.g. short circuiting).\na\n=\nUInt64\n(\n1\n)\nb\n=\nUInt64\n(\n2\n)\nc\n=\na\nor\nb\nd\n=\nb\nand\na\ne\n=\nself\n.\nexpensive_op\n(\nUInt64\n(\n0\n))\nor\nself\n.\nside_effecting_op\n(\nUInt64\n(\n1\n))\nf\n=\nself\n.\nexpensive_op\n(\nUInt64\n(\n3\n))\nor\nself\n.\nside_effecting_op\n(\nUInt64\n(\n42\n))\ng\n=\nself\n.\nside_effecting_op\n(\nUInt64\n(\n0\n))\nand\nself\n.\nexpensive_op\n(\nUInt64\n(\n42\n))\nh\n=\nself\n.\nside_effecting_op\n(\nUInt64\n(\n2\n))\nand\nself\n.\nexpensive_op\n(\nUInt64\n(\n3\n))\ni\n=\na\nif\nb\n<\nc\nelse\nd\n+\ne\nif\na\n:\nlog\n(\n\"a is True\"\n)\nFurther examples available here\n.\nAccount\n\u00b6\nAccount\nrepresents a logical Account, backed by a\nbytes[32]\nrepresenting the\nbytes of the public key (without the checksum). It has various account related methods that can be called from the type.\nAlso see\nalgopy.arc4.Address\nif needing to represent the address as a distinct type.\nAsset\n\u00b6\nAsset\nrepresents a logical Asset, backed by a\nuint64\nID.\nIt has various asset related methods that can be called from the type.\nApplication\n\u00b6\nApplication\nrepresents a logical Application, backed by a\nuint64\nID.\nIt has various application related methods that can be called from the type.\nPython built-in types\n\u00b6\nUnfortunately, the\nAVM types\ndon\u2019t map to standard Python primitives. For instance,\nin Python, an\nint\nis unsigned, and effectively unbounded. A\nbytes\nsimilarly is limited only by\nthe memory available, whereas an AVM\nbytes[]\nhas a maximum length of 4096. In order to both maintain\nsemantic compatibility and allow for a framework implementation in plain Python that will fail under the\nsame conditions as when deployed to the AVM, support for Python primitives is limited.\nIn saying that, there are many places where built-in Python types can be used and over time the places these types can be used are expected to increase.\nbool\n\u00b6\nPer above\nAlgorand Python has full support for\nbool\n.\ntuple\n\u00b6\nPython tuples are supported as arguments to subroutines, local variables, return types.\ntyping.NamedTuple\n\u00b6\nPython named tuples are also supported using\ntyping.NamedTuple\n.\nNote\nDefault field values and subclassing a NamedTuple are not supported\nimport\ntyping\nimport\nalgopy\nclass\nPair\n(\ntyping\n.\nNamedTuple\n):\nfoo\n:\nalgopy\n.\nBytes\nbar\n:\nalgopy\n.\nBytes\nNone\n\u00b6\nNone\nis not supported as a value, but is supported as a type annotation to indicate a function or subroutine\nreturns no value.\nint, str, bytes, float\n\u00b6\nThe\nint\n,\nstr\nand\nbytes\nbuilt-in types are currently only supported as\nmodule-level constants\nor literals.\nThey can be passed as arguments to various Algorand Python methods that support them or\nwhen interacting with certain\nAVM types\ne.g. adding a number to a\nUInt64\n.\nfloat\nis not supported.\nTemplate variables\n\u00b6\nTemplate variables can be used to represent a placeholder for a deploy-time provided\nvalue. This can be declared using the\nTemplateVar[TYPE]\ntype where\nTYPE\nis the\nAlgorand Python type that it will be interpreted as.\nfrom\nalgopy\nimport\nBigUInt\n,\nBytes\n,\nTemplateVar\n,\nUInt64\n,\narc4\nfrom\nalgopy.arc4\nimport\nUInt512\nclass\nTemplateVariablesContract\n(\narc4\n.\nARC4Contract\n):\n@arc4\n.\nabimethod\n()\ndef\nget_bytes\n(\nself\n)\n->\nBytes\n:\nreturn\nTemplateVar\n[\nBytes\n](\n\"SOME_BYTES\"\n)\n@arc4\n.\nabimethod\n()\ndef\nget_big_uint\n(\nself\n)\n->\nUInt512\n:\nx\n=\nTemplateVar\n[\nBigUInt\n](\n\"SOME_BIG_UINT\"\n)\nreturn\nUInt512\n(\nx\n)\n@arc4\n.\nbaremethod\n(\nallow_actions\n=\n[\n\"UpdateApplication\"\n])\ndef\non_update\n(\nself\n)\n->\nNone\n:\nassert\nTemplateVar\n[\nbool\n](\n\"UPDATABLE\"\n)\n@arc4\n.\nbaremethod\n(\nallow_actions\n=\n[\n\"DeleteApplication\"\n])\ndef\non_delete\n(\nself\n)\n->\nNone\n:\nassert\nTemplateVar\n[\nUInt64\n](\n\"DELETABLE\"\n)\nThe resulting TEAL code that PuyaPy emits has placeholders with\nTMPL_{template\nvariable\nname}\nthat expects either an integer value or an encoded bytes value. This behaviour exactly\nmatches what\nAlgoKit Utils expects\n.\nFor more information look at the API reference for\nTemplateVar\n.\nARC-4 types\n\u00b6\nARC-4 data types are a first class concept in Algorand Python. They can be passed into ARC-4\nmethods (which will translate to the relevant ARC-4 method signature), passed into subroutines, or\ninstantiated into local variables. A limited set of operations are exposed on some ARC-4 types, but\noften it may make sense to convert the ARC-4 value to a native AVM type, in which case you can use\nthe\nnative\nproperty to retrieve the value. Most of the ARC-4 types also allow for mutation e.g.\nyou can edit values in arrays by index.\nPlease see the\nreference documentation\nfor the different classes that can\nbe used to represent ARC-4 values or the\nARC-4 documentation\nfor more information\nabout ARC-4.\nNext\nControl flow structures\nPrevious\nProgram structure\nCopyright \u00a9 2024, Algorand Foundation\nMade with\nSphinx\nand\n@pradyunsg\n's\nFuro"} {"question":"","answer":"Back to top\nView this page\nToggle Light \/ Dark \/ Auto color theme\nToggle table of contents sidebar\nControl flow structures\n\u00b6\nControl flow in Algorand Python is similar to standard Python control flow, with support for if statements, while loops, for loops, and match statements.\nIf statements\n\u00b6\nIf statements work the same as Python. The conditions must be an expression that evaluates to bool, which can include a\nString or Uint64\namong others.\nif\ncondition\n:\n# block of code to execute if condition is True\nelif\ncondition2\n:\n# block of code to execute if condition is False and condition2 is True\nelse\n:\n# block of code to execute if condition and condition2 are both False\nSee full example\n.\nTernary conditions\n\u00b6\nTernary conditions work the same as Python. The condition must be an expression that evaluates to bool, which can include a\nString or Uint64\namong others.\nvalue1\n=\nUInt64\n(\n5\n)\nvalue2\n=\nString\n(\n\">6\"\n)\nif\nvalue1\n>\n6\nelse\nString\n(\n\"<=6\"\n)\nWhile loops\n\u00b6\nWhile loops work the same as Python. The condition must be an expression that evaluates to bool, which can include a\nString or Uint64\namong others.\nYou can use\nbreak\nand\ncontinue\n.\nwhile\ncondition\n:\n# block of code to execute if condition is True\nSee full example\n.\nFor Loops\n\u00b6\nFor loops are used to iterate over sequences, ranges and\nARC-4 arrays\n. They work the same as Python.\nAlgorand Python provides functions like\nuenumerate\nand\nurange\nto facilitate creating sequences and ranges; in-built Python\nreversed\nmethod works with these.\nuenumerate\nis similar to Python\u2019s built-in enumerate function, but for UInt64 numbers; it allows you to loop over a sequence and have an automatic counter.\nurange\nis a function that generates a sequence of Uint64 numbers, which you can iterate over.\nreversed\nreturns a reversed iterator of a sequence.\nHere is an example of how you can use these functions in a contract:\ntest_array\n=\narc4\n.\nStaticArray\n(\narc4\n.\nUInt8\n(),\narc4\n.\nUInt8\n(),\narc4\n.\nUInt8\n(),\narc4\n.\nUInt8\n())\n# urange: reversed items, forward index\nfor\nindex\n,\nitem\nin\nuenumerate\n(\nreversed\n(\nurange\n(\n4\n))):\ntest_array\n[\nindex\n]\n=\narc4\n.\nUInt8\n(\nitem\n)\nassert\ntest_array\n.\nbytes\n==\nBytes\n.\nfrom_hex\n(\n\"03020100\"\n)\nSee full\nexamples\n.\nMatch Statements\n\u00b6\nMatch statements work the same as Python and work for [\u2026]\nmatch\nvalue\n:\ncase\npattern1\n:\n# block of code to execute if pattern1 matches\ncase\npattern2\n:\n# block of code to execute if pattern2 matches\ncase\n_\n:\n# Fallback\nNote: Captures and patterns are not supported. Currently, there is only support for basic case\/switch functionality; pattern matching and guard clauses are not currently supported.\nSee full example\n.\nNext\nModule level constructs\nPrevious\nTypes\nCopyright \u00a9 2024, Algorand Foundation\nMade with\nSphinx\nand\n@pradyunsg\n's\nFuro"} {"question":"","answer":"Back to top\nView this page\nToggle Light \/ Dark \/ Auto color theme\nToggle table of contents sidebar\nModule level constructs\n\u00b6\nYou can write compile-time constant code at a module level and then use them in place of\nPython built-in literal types\n.\nFor a full example of what syntax is currently possible see the\ntest case example\n.\nModule constants\n\u00b6\nModule constants are compile-time constant, and can contain\nbool\n,\nint\n,\nstr\nand\nbytes\n.\nYou can use fstrings and other compile-time constant values in module constants too.\nFor example:\nfrom\nalgopy\nimport\nUInt64\n,\nsubroutine\nSCALE\n=\n100000\nSCALED_PI\n=\n314159\n@subroutine\ndef\ncircle_area\n(\nradius\n:\nUInt64\n)\n->\nUInt64\n:\nscaled_result\n=\nSCALED_PI\n*\nradius\n**\n2\nresult\n=\nscaled_result\n\/\/\nSCALE\nreturn\nresult\n@subroutine\ndef\ncircle_area_100\n()\n->\nUInt64\n:\nreturn\ncircle_area\n(\nUInt64\n(\n100\n))\nIf statements\n\u00b6\nYou can use if statements with compile-time constants in module constants.\nFor example:\nFOO\n=\n42\nif\nFOO\n>\n12\n:\nBAR\n=\n123\nelse\n:\nBAR\n=\n456\nInteger math\n\u00b6\nModule constants can also be defined using common integer expressions.\nFor example:\nSEVEN\n=\n7\nTEN\n=\n7\n+\n3\nFORTY_NINE\n=\n7\n**\n2\nStrings\n\u00b6\nModule\nstr\nconstants can use f-string formatting and other common string expressions.\nFor example:\nNAME\n=\n\"There\"\nMY_FORMATTED_STRING\n=\nf\n\"Hello\n{\nNAME\n}\n\"\n# Hello There\nPADDED\n=\nf\n\"\n{\n123\n:\n05\n}\n\"\n# \"00123\"\nDUPLICATED\n=\n\"5\"\n*\n3\n# \"555\"\nType aliases\n\u00b6\nYou can create type aliases to make your contract terser and more expressive.\nFor example:\nimport\ntyping\nfrom\nalgopy\nimport\narc4\nVoteIndexArray\n:\ntyping\n.\nTypeAlias\n=\narc4\n.\nDynamicArray\n[\narc4\n.\nUInt8\n]\nRow\n:\ntyping\n.\nTypeAlias\n=\narc4\n.\nStaticArray\n[\narc4\n.\nUInt8\n,\ntyping\n.\nLiteral\n[\n3\n]]\nGame\n:\ntyping\n.\nTypeAlias\n=\narc4\n.\nStaticArray\n[\nRow\n,\ntyping\n.\nLiteral\n[\n3\n]]\nMove\n:\ntyping\n.\nTypeAlias\n=\ntuple\n[\narc4\n.\nUInt64\n,\narc4\n.\nUInt64\n]\nBytes32\n:\ntyping\n.\nTypeAlias\n=\narc4\n.\nStaticArray\n[\narc4\n.\nByte\n,\ntyping\n.\nLiteral\n[\n32\n]]\nProof\n:\ntyping\n.\nTypeAlias\n=\narc4\n.\nDynamicArray\n[\nBytes32\n]\nNext\nPython builtins\nPrevious\nControl flow structures\nCopyright \u00a9 2024, Algorand Foundation\nMade with\nSphinx\nand\n@pradyunsg\n's\nFuro"} {"question":"","answer":"Back to top\nView this page\nToggle Light \/ Dark \/ Auto color theme\nToggle table of contents sidebar\nPython builtins\n\u00b6\nSome common python builtins have equivalent\nalgopy\nversions, that use an\nUInt64\ninstead of a native\nint\n.\nlen\n\u00b6\nThe\nlen()\nbuiltin is not supported, instead\nalgopy\ntypes that have a length have a\n.length\nproperty of type\nUInt64\n. This is primarily\ndue to\nlen()\nalways returning\nint\nand the CPython implementation enforcing that it returns\nexactly\nint\n.\nrange\n\u00b6\nThe\nrange()\nbuiltin has an equivalent\nalgopy.urange\nthis behaves the same as the python builtin except that it returns\nan iteration of\nUInt64\nvalues instead of\nint\n.\nenumerate\n\u00b6\nThe\nenumerate()\nbuiltin has an equivalent\nalgopy.uenumerate\nthis behaves the same as the python builtin except that it returns\nan iteration of\nUInt64\nindex values and the corresponding item.\nreversed\n\u00b6\nThe\nreversed()\nbuiltin is supported when iterating within a\nfor\nloop and behaves the same as the python builtin.\ntypes\n\u00b6\nSee\nhere\nNext\nError handling and assertions\nPrevious\nModule level constructs\nCopyright \u00a9 2024, Algorand Foundation\nMade with\nSphinx\nand\n@pradyunsg\n's\nFuro"} {"question":"","answer":"Back to top\nView this page\nToggle Light \/ Dark \/ Auto color theme\nToggle table of contents sidebar\nError handling and assertions\n\u00b6\nIn Algorand Python, error handling and assertions play a crucial role in ensuring the correctness and robustness of smart contracts.\nAssertions\n\u00b6\nAssertions allow you to immediately fail a smart contract if a\nBoolean statement or value\nevaluates to\nFalse\n. If an assertion fails, it immediately stops the execution of the contract and marks the call as a failure.\nIn Algorand Python, you can use the Python built-in\nassert\nstatement to make assertions in your code.\nFor example:\n@subroutine\ndef\nset_value\n(\nvalue\n:\nUInt64\n):\nassert\nvalue\n>\n4\n,\n\"Value must be > 4\"\nAssertion error handling\n\u00b6\nThe (optional) string value provided with an assertion, if provided, will be added as a TEAL comment on the end of the assertion line. This works in concert with default AlgoKit Utils app client behaviour to show a TEAL stack trace of an error and thus show the error message to the caller (when source maps have been loaded).\nExplicit failure\n\u00b6\nFor scenarios where you need to fail a contract explicitly, you can use\nthe\nop.err()\noperation. This operation causes the TEAL program to immediately\nand unconditionally fail.\nAlternatively\nop.exit(0)\nwill achieve the same result. A non-zero value will\ndo the opposite and immediately succeed.\nException handling\n\u00b6\nThe AVM doesn\u2019t provide error trapping semantics so it\u2019s not possible to implement\nraise\nand\ncatch\n.\nFor more details see\nUnsupported Python features\n.\nNext\nStoring data on-chain\nPrevious\nPython builtins\nCopyright \u00a9 2024, Algorand Foundation\nMade with\nSphinx\nand\n@pradyunsg\n's\nFuro"} {"question":"","answer":"Back to top\nView this page\nToggle Light \/ Dark \/ Auto color theme\nToggle table of contents sidebar\nStoring data on-chain\n\u00b6\nAlgorand smart contracts have\nthree different types of on-chain storage\nthey can utilise:\nGlobal storage\n,\nLocal storage\n,\nBox Storage\n, and\nScratch storage\n.\nThe life-cycle of a smart contract matches the semantics of Python classes when you consider\ndeploying a smart contract as \u201cinstantiating\u201d the class. Any calls to that smart contract are made\nto that instance of the smart contract, and any state assigned to\nself.\nvariables will persist\nacross different invocations (provided the transaction it was a part of succeeds, of course). You can\ndeploy the same contract class multiple times, each will become a distinct and isolated instance.\nDuring a single smart contract execution there is also the ability to use \u201ctemporary\u201d storage\neither global to the contract execution via\nScratch storage\n, or local to\nthe current method via\nlocal variables and subroutine params\n.\nGlobal storage\n\u00b6\nGlobal storage is state that is stored against the contract instance and can be retrieved\nby key. There are\nAVM limits to the amount of global storage that can be allocated to a contract\n.\nThis is represented in Algorand Python by either:\nAssigning any\nAlgorand Python typed\nvalue to an instance variable (e.g.\nself.value\n=\nUInt64(3)\n).\nUse this approach if you just require a terse API for getting and setting a state value\nUsing an instance of\nGlobalState\n, which gives\nsome extra features\nto understand\nand control the value and the metadata of it (which propagates to the ARC-32 app spec file)\nUse this approach if you need to:\nOmit a default\/initial value\nDelete the stored value\nCheck if a value exists\nSpecify the exact key bytes\nInclude a description to be included in App Spec files (ARC32\/ARC56)\nFor example:\nself\n.\nglobal_int_full\n=\nGlobalState\n(\nUInt64\n(\n55\n),\nkey\n=\n\"gif\"\n,\ndescription\n=\n\"Global int full\"\n)\nself\n.\nglobal_int_simplified\n=\nUInt64\n(\n33\n)\nself\n.\nglobal_int_no_default\n=\nGlobalState\n(\nUInt64\n)\nself\n.\nglobal_bytes_full\n=\nGlobalState\n(\nBytes\n(\nb\n\"Hello\"\n))\nself\n.\nglobal_bytes_simplified\n=\nBytes\n(\nb\n\"Hello\"\n)\nself\n.\nglobal_bytes_no_default\n=\nGlobalState\n(\nBytes\n)\nglobal_int_full_set\n=\nbool\n(\nself\n.\nglobal_int_full\n)\nbytes_with_default_specified\n=\nself\n.\nglobal_bytes_no_default\n.\nget\n(\nb\n\"Default if no value set\"\n)\nerror_if_not_set\n=\nself\n.\nglobal_int_no_default\n.\nvalue\nThese values can be assigned anywhere you have access to\nself\ni.e. any instance methods\/subroutines. The information about\nglobal storage is automatically included in the ARC-32 app spec file and thus will automatically appear within\nany\ngenerated typed clients\n.\nLocal storage\n\u00b6\nLocal storage is state that is stored against the contract instance for a specific account and can be retrieved\nby key and account address. There are\nAVM limits to the amount of local storage that can be allocated to a contract\n.\nThis is represented in Algorand Python by using an instance of\nLocalState\n.\nFor example:\ndef\n__init__\n(\nself\n)\n->\nNone\n:\nself\n.\nlocal\n=\nLocalState\n(\nBytes\n)\nself\n.\nlocal_with_metadata\n=\nLocalState\n(\nUInt64\n,\nkey\n=\n\"lwm\"\n,\ndescription\n=\n\"Local with metadata\"\n)\n@subroutine\ndef\nget_guaranteed_data\n(\nself\n,\nfor_account\n:\nAccount\n)\n->\nBytes\n:\nreturn\nself\n.\nlocal\n[\nfor_account\n]\n@subroutine\ndef\nget_data_with_default\n(\nself\n,\nfor_account\n:\nAccount\n,\ndefault\n:\nBytes\n)\n->\nBytes\n:\nreturn\nself\n.\nlocal\n.\nget\n(\nfor_account\n,\ndefault\n)\n@subroutine\ndef\nget_data_or_assert\n(\nself\n,\nfor_account\n:\nAccount\n)\n->\nBytes\n:\nresult\n,\nexists\n=\nself\n.\nlocal\n.\nmaybe\n(\nfor_account\n)\nassert\nexists\n,\n\"no data for account\"\nreturn\nresult\n@subroutine\ndef\nset_data\n(\nself\n,\nfor_account\n:\nAccount\n,\nvalue\n:\nBytes\n)\n->\nNone\n:\nself\n.\nlocal\n[\nfor_account\n]\n=\nvalue\n@subroutine\ndef\ndelete_data\n(\nself\n,\nfor_account\n:\nAccount\n)\n->\nNone\n:\ndel\nself\n.\nlocal\n[\nfor_account\n]\nThese values can be assigned anywhere you have access to\nself\ni.e. any instance methods\/subroutines. The information about\nlocal storage is automatically included in the ARC-32 app spec file and thus will automatically appear within\nany\ngenerated typed clients\n.\nBox storage\n\u00b6\nWe provide 3 different types for accessing box storage:\nBox\n,\nBoxMap\n, and\nBoxRef\n. We also expose raw operations via the\nAVM ops\nmodule.\nBefore using box storage, be sure to familiarise yourself with the\nrequirements and restrictions\nof the underlying API.\nThe\nBox\ntype provides an abstraction over storing a single value in a single box. A box can be declared against\nself\nin an\n__init__\nmethod (in which case the key must be a compile time constant); or as a local variable within any\nsubroutine.\nBox\nproxy instances can be passed around like any other value.\nOnce declared, you can interact with the box via its instance methods.\nimport\ntyping\nas\nt\nfrom\nalgopy\nimport\nBox\n,\narc4\n,\nContract\n,\nop\nclass\nMyContract\n(\nContract\n):\ndef\n__init__\n(\nself\n)\n->\nNone\n:\nself\n.\nbox_a\n=\nBox\n(\narc4\n.\nStaticArray\n[\narc4\n.\nUInt32\n,\nt\n.\nLiteral\n[\n20\n]],\nkey\n=\nb\n\"a\"\n)\ndef\napproval_program\n(\nself\n)\n->\nbool\n:\nbox_b\n=\nBox\n(\narc4\n.\nString\n,\nkey\n=\nb\n\"b\"\n)\nbox_b\n.\nvalue\n=\narc4\n.\nString\n(\n\"Hello\"\n)\n# Check if the box exists\nif\nself\n.\nbox_a\n:\n# Reassign the value\nself\n.\nbox_a\n.\nvalue\n[\n2\n]\n=\narc4\n.\nUInt32\n(\n40\n)\nelse\n:\n# Assign a new value\nself\n.\nbox_a\n.\nvalue\n=\narc4\n.\nStaticArray\n[\narc4\n.\nUInt32\n,\nt\n.\nLiteral\n[\n20\n]]\n.\nfrom_bytes\n(\nop\n.\nbzero\n(\n20\n*\n4\n))\n# Read a value\nreturn\nself\n.\nbox_a\n.\nvalue\n[\n4\n]\n==\narc4\n.\nUInt32\n(\n2\n)\nBoxMap\nis similar to the\nBox\ntype, but allows for grouping a set of boxes with a common key and content type.\nA custom\nkey_prefix\ncan optionally be provided, with the default being to use the variable name as the prefix.\nThe key can be a\nBytes\nvalue, or anything that can be converted to\nBytes\n. The final box name is the combination of\nkey_prefix\n+\nkey\n.\nfrom\nalgopy\nimport\nBoxMap\n,\nContract\n,\nAccount\n,\nTxn\n,\nString\nclass\nMyContract\n(\nContract\n):\ndef\n__init__\n(\nself\n)\n->\nNone\n:\nself\n.\nmy_map\n=\nBoxMap\n(\nAccount\n,\nString\n,\nkey_prefix\n=\nb\n\"a_\"\n)\ndef\napproval_program\n(\nself\n)\n->\nbool\n:\n# Check if the box exists\nif\nTxn\n.\nsender\nin\nself\n.\nmy_map\n:\n# Reassign the value\nself\n.\nmy_map\n[\nTxn\n.\nsender\n]\n=\nString\n(\n\" World\"\n)\nelse\n:\n# Assign a new value\nself\n.\nmy_map\n[\nTxn\n.\nsender\n]\n=\nString\n(\n\"Hello\"\n)\n# Read a value\nreturn\nself\n.\nmy_map\n[\nTxn\n.\nsender\n]\n==\nString\n(\n\"Hello World\"\n)\nBoxRef\nis a specialised type for interacting with boxes which contain binary data. In addition to being able to set and read the box value, there are operations for extracting and replacing just a portion of the box data which\nis useful for minimizing the amount of reads and writes required, but also allows you to interact with byte arrays which are longer than the AVM can support (currently 4096).\nfrom\nalgopy\nimport\nBoxRef\n,\nContract\n,\nGlobal\n,\nTxn\nclass\nMyContract\n(\nContract\n):\ndef\napproval_program\n(\nself\n)\n->\nbool\n:\nmy_blob\n=\nBoxRef\n(\nkey\n=\nb\n\"blob\"\n)\nsender_bytes\n=\nTxn\n.\nsender\n.\nbytes\napp_address\n=\nGlobal\n.\ncurrent_application_address\n.\nbytes\nassert\nmy_blob\n.\ncreate\n(\n8000\n)\nmy_blob\n.\nreplace\n(\n0\n,\nsender_bytes\n)\nmy_blob\n.\nsplice\n(\n0\n,\n0\n,\napp_address\n)\nfirst_64\n=\nmy_blob\n.\nextract\n(\n0\n,\n32\n*\n2\n)\nassert\nfirst_64\n==\napp_address\n+\nsender_bytes\nassert\nmy_blob\n.\ndelete\n()\nvalue\n,\nexists\n=\nmy_blob\n.\nmaybe\n()\nassert\nnot\nexists\nassert\nmy_blob\n.\nget\n(\ndefault\n=\nsender_bytes\n)\n==\nsender_bytes\nmy_blob\n.\ncreate\n(\nsender_bytes\n+\napp_address\n)\nassert\nmy_blob\n,\n\"Blob exists\"\nassert\nmy_blob\n.\nlength\n==\n64\nreturn\nTrue\nIf none of these abstractions suit your needs, you can use the box storage\nAVM ops\nto interact with box storage. These ops match closely to the opcodes available on the AVM.\nFor example:\nop\n.\nBox\n.\ncreate\n(\nb\n\"key\"\n,\nsize\n)\nop\n.\nBox\n.\nput\n(\nTxn\n.\nsender\n.\nbytes\n,\nanswer_ids\n.\nbytes\n)\n(\nvotes\n,\nexists\n)\n=\nop\n.\nBox\n.\nget\n(\nTxn\n.\nsender\n.\nbytes\n)\nop\n.\nBox\n.\nreplace\n(\nTALLY_BOX_KEY\n,\nindex\n,\nop\n.\nitob\n(\ncurrent_vote\n+\n1\n))\nSee the\nvoting contract example\nfor a real-world example that uses box storage.\nScratch storage\n\u00b6\nTo use stratch storage you need to\nregister the scratch storage that you want to use\nand then you can use the scratch storage\nAVM ops\n.\nFor example:\nfrom\nalgopy\nimport\nBytes\n,\nContract\n,\nUInt64\n,\nop\n,\nurange\nTWO\n=\n2\nTWENTY\n=\n20\nclass\nMyContract\n(\nContract\n,\nscratch_slots\n=\n(\n1\n,\nTWO\n,\nurange\n(\n3\n,\nTWENTY\n))):\ndef\napproval_program\n(\nself\n)\n->\nbool\n:\nop\n.\nScratch\n.\nstore\n(\n1\n,\nUInt64\n(\n5\n))\nop\n.\nScratch\n.\nstore\n(\n2\n,\nBytes\n(\nb\n\"Hello World\"\n))\nfor\ni\nin\nurange\n(\n3\n,\n20\n):\nop\n.\nScratch\n.\nstore\n(\ni\n,\ni\n)\nassert\nop\n.\nScratch\n.\nload_uint64\n(\n1\n)\n==\nUInt64\n(\n5\n)\nassert\nop\n.\nScratch\n.\nload_bytes\n(\n2\n)\n==\nb\n\"Hello World\"\nassert\nop\n.\nScratch\n.\nload_uint64\n(\n5\n)\n==\nUInt64\n(\n5\n)\nreturn\nTrue\ndef\nclear_state_program\n(\nself\n)\n->\nbool\n:\nreturn\nTrue\nNext\nLogging\nPrevious\nError handling and assertions\nCopyright \u00a9 2024, Algorand Foundation\nMade with\nSphinx\nand\n@pradyunsg\n's\nFuro"} {"question":"","answer":"Back to top\nView this page\nToggle Light \/ Dark \/ Auto color theme\nToggle table of contents sidebar\nLogging\n\u00b6\nAlgorand Python provides a\nlog\nmethod\nthat allows you to emit debugging and event information as well as return values from your contracts to the caller.\nThis\nlog\nmethod is a superset of the\nAVM\nlog\nmethod\nthat adds extra functionality:\nYou can log multiple items rather than a single item\nItems are concatenated together with an optional separator (which defaults to:\n\"\"\n)\nItems are automatically converted to bytes for you\nSupport for:\nint\nliterals \/ module variables (encoded as raw bytes, not ASCII)\nUInt64\nvalues (encoded as raw bytes, not ASCII)\nstr\nliterals \/ module variables (encoded as UTF-8)\nbytes\nliterals \/ module variables (encoded as is)\nBytes\nvalues (encoded as is)\nBytesBacked\nvalues, which includes\nString\n,\nBigUInt\n,\nAccount\nand all of the\nARC-4 types\n(encoded as their underlying bytes values)\nLogged values are\navailable to the calling client\nand attached to the transaction record stored on the blockchain ledger.\nIf you want to emit ARC-28 events in the logs then there is a\npurpose-built function for that\n.\nHere\u2019s an example contract that uses the log method in various ways:\nfrom\nalgopy\nimport\nBigUInt\n,\nBytes\n,\nContract\n,\nlog\n,\nop\nclass\nMyContract\n(\nContract\n):\ndef\napproval_program\n(\nself\n)\n->\nbool\n:\nlog\n(\n0\n)\nlog\n(\nb\n\"1\"\n)\nlog\n(\n\"2\"\n)\nlog\n(\nop\n.\nTxn\n.\nnum_app_args\n+\n3\n)\nlog\n(\nBytes\n(\nb\n\"4\"\n)\nif\nop\n.\nTxn\n.\nnum_app_args\nelse\nBytes\n())\nlog\n(\nb\n\"5\"\n,\n6\n,\nop\n.\nTxn\n.\nnum_app_args\n+\n7\n,\nBigUInt\n(\n8\n),\nBytes\n(\nb\n\"9\"\n)\nif\nop\n.\nTxn\n.\nnum_app_args\nelse\nBytes\n(),\nsep\n=\n\"_\"\n,\n)\nreturn\nTrue\ndef\nclear_state_program\n(\nself\n)\n->\nbool\n:\nreturn\nTrue\nNext\nTransactions\nPrevious\nStoring data on-chain\nCopyright \u00a9 2024, Algorand Foundation\nMade with\nSphinx\nand\n@pradyunsg\n's\nFuro"} {"question":"","answer":"Back to top\nView this page\nToggle Light \/ Dark \/ Auto color theme\nToggle table of contents sidebar\nTransactions\n\u00b6\nAlgorand Python provides types for accessing fields of other transactions in a group, as well as\ncreating and submitting inner transactions from your smart contract.\nThe following types are available:\nGroup Transactions\nInner Transaction Field sets\nInner Transaction\nPaymentTransaction\nPayment\nPaymentInnerTransaction\nKeyRegistrationTransaction\nKeyRegistration\nKeyRegistrationInnerTransaction\nAssetConfigTransaction\nAssetConfig\nAssetConfigInnerTransaction\nAssetTransferTransaction\nAssetTransfer\nAssetTransferInnerTransaction\nAssetFreezeTransaction\nAssetFreeze\nAssetFreezeInnerTransaction\nApplicationCallTransaction\nApplicationCall\nApplicationCallInnerTransaction\nTransaction\nInnerTransaction\nInnerTransactionResult\nGroup Transactions\n\u00b6\nGroup transactions can be used as ARC4 parameters or instantiated from a group index.\nARC4 parameter\n\u00b6\nGroup transactions can be used as parameters in ARC4 method\nFor example to require a payment transaction in an ARC4 ABI method:\nimport\nalgopy\nclass\nMyContract\n(\nalgopy\n.\nARC4Contract\n):\n@algopy\n.\narc4\n.\nabimethod\n()\ndef\nprocess_payment\n(\nself\n:\nalgopy\n.\ngtxn\n.\nPaymentTransaction\n)\n->\nNone\n:\n...\nGroup Index\n\u00b6\nGroup transactions can also be created using the group index of the transaction.\nIf instantiating one of the type specific transactions they will be checked to ensure the transaction is of the expected type.\nTransaction\nis not checked for a specific type and provides access to all transaction fields\nFor example, to obtain a reference to a payment transaction:\nimport\nalgopy\n@algopy\n.\nsubroutine\n()\ndef\nprocess_payment\n(\ngroup_index\n:\nalgopy\n.\nUInt64\n)\n->\nNone\n:\npay_txn\n=\nalgopy\n.\ngtxn\n.\nPaymentTransaction\n(\ngroup_index\n)\n...\nInner Transactions\n\u00b6\nInner transactions are defined using the parameter types, and can then be submitted individually by calling the\n.submit()\nmethod, or as a group by calling\nsubmit_txns\nExamples\n\u00b6\nCreate and submit an inner transaction\n\u00b6\nfrom\nalgopy\nimport\nAccount\n,\nUInt64\n,\nitxn\n,\nsubroutine\n@subroutine\ndef\nexample\n(\namount\n:\nUInt64\n,\nreceiver\n:\nAccount\n)\n->\nNone\n:\nitxn\n.\nPayment\n(\namount\n=\namount\n,\nreceiver\n=\nreceiver\n,\nfee\n=\n0\n,\n)\n.\nsubmit\n()\nAccessing result of a submitted inner transaction\n\u00b6\nfrom\nalgopy\nimport\nAsset\n,\nitxn\n,\nsubroutine\n@subroutine\ndef\nexample\n()\n->\nAsset\n:\nasset_txn\n=\nitxn\n.\nAssetConfig\n(\nasset_name\n=\nb\n\"Puya\"\n,\nunit_name\n=\nb\n\"PYA\"\n,\ntotal\n=\n1000\n,\ndecimals\n=\n3\n,\nfee\n=\n0\n,\n)\n.\nsubmit\n()\nreturn\nasset_txn\n.\ncreated_asset\nSubmitting multiple transactions\n\u00b6\nfrom\nalgopy\nimport\nAsset\n,\nBytes\n,\nitxn\n,\nlog\n,\nsubroutine\n@subroutine\ndef\nexample\n()\n->\ntuple\n[\nAsset\n,\nBytes\n]:\nasset1_params\n=\nitxn\n.\nAssetConfig\n(\nasset_name\n=\nb\n\"Puya\"\n,\nunit_name\n=\nb\n\"PYA\"\n,\ntotal\n=\n1000\n,\ndecimals\n=\n3\n,\nfee\n=\n0\n,\n)\napp_params\n=\nitxn\n.\nApplicationCall\n(\napp_id\n=\n1234\n,\napp_args\n=\n(\nBytes\n(\nb\n\"arg1\"\n),\nBytes\n(\nb\n\"arg1\"\n))\n)\nasset1_txn\n,\napp_txn\n=\nitxn\n.\nsubmit_txns\n(\nasset1_params\n,\napp_params\n)\n# log some details\nlog\n(\napp_txn\n.\nlogs\n(\n0\n))\nlog\n(\nasset1_txn\n.\ntxn_id\n)\nlog\n(\napp_txn\n.\ntxn_id\n)\nreturn\nasset1_txn\n.\ncreated_asset\n,\napp_txn\n.\nlogs\n(\n1\n)\nCreate an ARC4 application, and then call it\n\u00b6\nfrom\nalgopy\nimport\nBytes\n,\narc4\n,\nitxn\n,\nsubroutine\nHELLO_WORLD_APPROVAL\n:\nbytes\n=\n...\nHELLO_WORLD_CLEAR\n:\nbytes\n=\n...\n@subroutine\ndef\nexample\n()\n->\nNone\n:\n# create an application\napplication_txn\n=\nitxn\n.\nApplicationCall\n(\napproval_program\n=\nHELLO_WORLD_APPROVAL\n,\nclear_state_program\n=\nHELLO_WORLD_CLEAR\n,\nfee\n=\n0\n,\n)\n.\nsubmit\n()\napp\n=\napplication_txn\n.\ncreated_app\n# invoke an ABI method\ncall_txn\n=\nitxn\n.\nApplicationCall\n(\napp_id\n=\napp\n,\napp_args\n=\n(\narc4\n.\narc4_signature\n(\n\"hello(string)string\"\n),\narc4\n.\nString\n(\n\"World\"\n)),\nfee\n=\n0\n,\n)\n.\nsubmit\n()\n# extract result\nhello_world_result\n=\narc4\n.\nString\n.\nfrom_log\n(\ncall_txn\n.\nlast_log\n)\nCreate and submit transactions in a loop\n\u00b6\nfrom\nalgopy\nimport\nAccount\n,\nUInt64\n,\nitxn\n,\nsubroutine\n@subroutine\ndef\nexample\n(\nreceivers\n:\ntuple\n[\nAccount\n,\nAccount\n,\nAccount\n])\n->\nNone\n:\nfor\nreceiver\nin\nreceivers\n:\nitxn\n.\nPayment\n(\namount\n=\nUInt64\n(\n1_000_000\n),\nreceiver\n=\nreceiver\n,\nfee\n=\n0\n,\n)\n.\nsubmit\n()\nLimitations\n\u00b6\nInner transactions are powerful, but currently do have some restrictions in how they are used.\nInner transaction objects cannot be passed to or returned from subroutines\n\u00b6\nfrom\nalgopy\nimport\nApplication\n,\nBytes\n,\nitxn\n,\nsubroutine\n@subroutine\ndef\nparameter_not_allowed\n(\ntxn\n:\nitxn\n.\nPaymentInnerTransaction\n)\n->\nNone\n:\n# this is a compile error\n...\n@subroutine\ndef\nreturn_not_allowed\n()\n->\nitxn\n.\nPaymentInnerTransaction\n:\n# this is a compile error\n...\n@subroutine\ndef\npassing_fields_allowed\n()\n->\nApplication\n:\ntxn\n=\nitxn\n.\nApplicationCall\n(\n...\n)\n.\nsubmit\n()\ndo_something\n(\ntxn\n.\ntxn_id\n,\ntxn\n.\nlogs\n(\n0\n))\n# this is ok\nreturn\ntxn\n.\ncreated_app\n# and this is ok\n@subroutine\ndef\ndo_something\n(\ntxn_id\n:\nBytes\n):\n# this is just a regular subroutine\n...\nInner transaction parameters cannot be reassigned without a\n.copy()\n\u00b6\nfrom\nalgopy\nimport\nitxn\n,\nsubroutine\n@subroutine\ndef\nexample\n()\n->\nNone\n:\npayment\n=\nitxn\n.\nPayment\n(\n...\n)\nreassigned_payment\n=\npayment\n# this is an error\ncopied_payment\n=\npayment\n.\ncopy\n()\n# this is ok\nInner transactions cannot be reassigned\n\u00b6\nfrom\nalgopy\nimport\nitxn\n,\nsubroutine\n@subroutine\ndef\nexample\n()\n->\nNone\n:\npayment_txn\n=\nitxn\n.\nPayment\n(\n...\n)\n.\nsubmit\n()\nreassigned_payment_txn\n=\npayment_txn\n# this is an error\ntxn_id\n=\npayment_txn\n.\ntxn_id\n# this is ok\nInner transactions methods cannot be called if there is a subsequent inner transaction submitted or another subroutine is called.\n\u00b6\nfrom\nalgopy\nimport\nitxn\n,\nsubroutine\n@subroutine\ndef\nexample\n()\n->\nNone\n:\napp_1\n=\nitxn\n.\nApplicationCall\n(\n...\n)\n.\nsubmit\n()\nlog_from_call1\n=\napp_1\n.\nlogs\n(\n0\n)\n# this is ok\n# another inner transaction is submitted\nitxn\n.\nApplicationCall\n(\n...\n)\n.\nsubmit\n()\n# or another subroutine is called\ncall_some_other_subroutine\n()\napp1_txn_id\n=\napp_1\n.\ntxn_id\n# this is ok, properties are still available\nanother_log_from_call1\n=\napp_1\n.\nlogs\n(\n1\n)\n# this is not allowed as the array results may no longer be available, instead assign to a variable before submitting another transaction\nNext\nAVM operations\nPrevious\nLogging\nCopyright \u00a9 2024, Algorand Foundation\nMade with\nSphinx\nand\n@pradyunsg\n's\nFuro"} {"question":"","answer":"Back to top\nView this page\nToggle Light \/ Dark \/ Auto color theme\nToggle table of contents sidebar\nAVM operations\n\u00b6\nAlgorand Python allows you to do express\nevery op code the AVM has available\napart from ops that manipulate the stack (to avoid conflicts with the compiler), and\nlog\n(to avoid confusion with the superior\nAlgorand Python log function\n). These ops are exposed via the\nalgopy.op\nsubmodule.\nWe generally recommend importing this entire submodule so you can use intellisense to discover the available methods:\nfrom\nalgopy\nimport\nUInt64\n,\nop\n,\nsubroutine\n@subroutine\ndef\nsqrt_16\n()\n->\nUInt64\n:\nreturn\nop\n.\nsqrt\n(\n16\n)\nAll ops are typed using Algorand Python types and have correct static type representations.\nMany ops have higher-order functionality that Algorand Python exposes and would limit the need to reach for the underlying ops. For instance, there is first-class support for local and global storage so there is little need to use the likes of\napp_local_get\net. al. But they are still exposed just in case you want to do something that Algorand Python\u2019s abstractions don\u2019t support.\nTxn\n\u00b6\nThe\nTxn\nopcodes are so commonly used they have been exposed directly in the\nalgopy\nmodule and can be easily imported to make it terser to access:\nfrom\nalgopy\nimport\nsubroutine\n,\nTxn\n@subroutine\ndef\nhas_no_app_args\n()\n->\nbool\n:\nreturn\nTxn\n.\nnum_app_args\n==\n0\nGlobal\n\u00b6\nThe\nGlobal\nopcodes are so commonly used they have been exposed directly in the\nalgopy\nmodule and can be easily imported to make it terser to access:\nfrom\nalgopy\nimport\nsubroutine\n,\nGlobal\n,\nTxn\n@subroutine\ndef\nonly_allow_creator\n()\n->\nNone\n:\nassert\nTxn\n.\nsender\n==\nGlobal\n.\ncreator_address\n,\n\"Only the contract creator can perform this operation\"\nNext\nOpcode budgets\nPrevious\nTransactions\nCopyright \u00a9 2024, Algorand Foundation\nMade with\nSphinx\nand\n@pradyunsg\n's\nFuro"} {"question":"","answer":"Back to top\nView this page\nToggle Light \/ Dark \/ Auto color theme\nToggle table of contents sidebar\nOpcode budgets\n\u00b6\nAlgorand Python provides a helper method for increasing the\navailable opcode budget\n, see\nalgopy.ensure_budget\n.\nNext\nARC-4: Application Binary Interface\nPrevious\nAVM operations\nCopyright \u00a9 2024, Algorand Foundation\nMade with\nSphinx\nand\n@pradyunsg\n's\nFuro"} {"question":"","answer":"Back to top\nView this page\nToggle Light \/ Dark \/ Auto color theme\nToggle table of contents sidebar\nARC-4: Application Binary Interface\n\u00b6\nARC4\ndefines a set of encodings and behaviors for authoring and interacting with an Algorand Smart Contract. It is not the only way to author a smart contract, but adhering to it will make it easier for other clients and users to interop with your contract.\nTo author an arc4 contract you should extend the\nARC4Contract\nbase class.\nfrom\nalgopy\nimport\nARC4Contract\nclass\nHelloWorldContract\n(\nARC4Contract\n):\n...\nARC-32 and ARC-56\n\u00b6\nARC32\nextends the concepts in ARC4 to include an Application Specification which more holistically describes a smart contract and its associated state.\nARC-32\/ARC-56 Application Specification files are automatically generated by the compiler for ARC4\ncontracts as\n.arc32.json\nor\n.arc56.json\nMethods\n\u00b6\nIndividual methods on a smart contract should be annotated with an\nabimethod\ndecorator. This decorator is used to indicate a method which should be externally callable. The decorator itself includes properties to restrict when the method should be callable, for instance only when the application is being created or only when the OnComplete action is OptIn.\nA method that should not be externally available should be annotated with a\nsubroutine\ndecorator.\nMethod docstrings will be used when outputting ARC-32 or ARC-56 application specifications, the following docstrings styles are supported ReST, Google, Numpydoc-style and Epydoc.\nfrom\nalgopy\nimport\nARC4Contract\n,\nsubroutine\n,\narc4\nclass\nHelloWorldContract\n(\nARC4Contract\n):\n@arc4\n.\nabimethod\n(\ncreate\n=\nFalse\n,\nallow_actions\n=\n[\n\"NoOp\"\n,\n\"OptIn\"\n],\nname\n=\n\"external_name\"\n)\ndef\nhello\n(\nself\n,\nname\n:\narc4\n.\nString\n)\n->\narc4\n.\nString\n:\nreturn\nself\n.\ninternal_method\n()\n+\nname\n@subroutine\ndef\ninternal_method\n(\nself\n)\n->\narc4\n.\nString\n:\nreturn\narc4\n.\nString\n(\n\"Hello, \"\n)\nRouter\n\u00b6\nAlgorand Smart Contracts only have two possible programs that are invoked when making an ApplicationCall Transaction (\nappl\n). The \u201cclear state\u201d program which is called when using an OnComplete action of\nClearState\nor the \u201capproval\u201d program which is called for all other OnComplete actions.\nRouting is required to dispatch calls handled by the approval program to the relevant ABI methods. When extending\nARC4Contract\n, the routing code is automatically generated for you by the PuyaPy compiler.\nTypes\n\u00b6\nARC4 defines a number of\ndata types\nwhich can be used in an ARC4 compatible contract and details how these types should be encoded in binary.\nAlgorand Python exposes these through a number of types which can be imported from the\nalgopy.arc4\nmodule. These types represent binary encoded values following the rules prescribed in the ARC which can mean operations performed directly on these types are not as efficient as ones performed on natively supported types (such as\nalgopy.UInt64\nor\nalgopy.Bytes\n)\nWhere supported, the native equivalent of an ARC4 type can be obtained via the\n.native\nproperty. It is possible to use native types in an ABI method and the router will automatically encode and decode these types to their ARC4 equivalent.\nBooleans\n\u00b6\nType:\nalgopy.arc4.Bool\nEncoding:\nA single byte where the most significant bit is\n1\nfor\nTrue\nand\n0\nfor\nFalse\nNative equivalent:\nbuiltins.bool\nUnsigned ints\n\u00b6\nTypes:\nalgopy.arc4.UIntN\n(<= 64 bits)\nalgopy.arc4.BigUIntN\n(> 64 bits)\nEncoding:\nA big endian byte array of N bits\nNative equivalent:\nalgopy.UInt64\nor\npuya.py.BigUInt\nCommon bit sizes have also been aliased under\nalgopy.arc4.UInt8\n,\nalgopy.arc4.UInt16\netc. A uint of any size between 8 and 512 bits (in intervals of 8bits) can be created using a generic parameter. It can be helpful to define your own alias for this type.\nimport\ntyping\nas\nt\nfrom\nalgopy\nimport\narc4\nUInt40\n:\nt\n.\nTypeAlias\n=\narc4\n.\nUIntN\n[\nt\n.\nLiteral\n[\n40\n]]\nUnsigned fixed point decimals\n\u00b6\nTypes:\nalgopy.arc4.UFixedNxM\n(<= 64 bits)\nalgopy.arc4.BigUFixedNxM\n(> 64 bits)\nEncoding:\nA big endian byte array of N bits where\nencoded_value\n=\nvalue\n\/\n(10^M)\nNative equivalent:\nnone\nimport\ntyping\nas\nt\nfrom\nalgopy\nimport\narc4\nDecimal\n:\nt\n.\nTypeAlias\n=\narc4\n.\nUFixedNxM\n[\nt\n.\nLiteral\n[\n64\n],\nt\n.\nLiteral\n[\n10\n]]\nBytes and strings\n\u00b6\nTypes:\nalgopy.arc4.DynamicBytes\nand\nalgopy.arc4.String\nEncoding:\nA variable length byte array prefixed with a 16-bit big endian header indicating the length of the data\nNative equivalent:\nalgopy.Bytes\nand\nalgopy.String\nStrings are assumed to be utf-8 encoded and the length of a string is the total number of bytes,\nnot the total number of characters\n.\nStatic arrays\n\u00b6\nType:\nalgopy.arc4.StaticArray\nEncoding:\nSee\nARC4 Container Packing\nNative equivalent:\nnone\nAn ARC4 StaticArray is an array of a fixed size. The item type is specified by the first generic parameter and the size is specified by the second.\nimport\ntyping\nas\nt\nfrom\nalgopy\nimport\narc4\nFourBytes\n:\nt\n.\nTypeAlias\n=\narc4\n.\nStaticArray\n[\narc4\n.\nByte\n,\nt\n.\nLiteral\n[\n4\n]]\nAddress\n\u00b6\nType:\nalgopy.arc4.Address\nEncoding:\nA byte array 32 bytes long\nNative equivalent:\nalgopy.Account\nAddress represents an Algorand address\u2019s public key, and can be used instead of\nalgopy.Account\nwhen needing to\nreference an address in an ARC4 struct, tuple or return type. It is a subclass of\narc4.StaticArray[arc4.Byte,\ntyping.Literal[32]]\nDynamic arrays\n\u00b6\nType:\nalgopy.arc4.DynamicArray\nEncoding:\nSee\nARC4 Container Packing\nNative equivalent:\nnone\nAn ARC4 DynamicArray is an array of a variable size. The item type is specified by the first generic parameter. Items can be added and removed via\n.pop\n,\n.append\n, and\n.extend\n.\nThe current length of the array is encoded in a 16-bit prefix similar to the\narc4.DynamicBytes\nand\narc4.String\ntypes\nimport\ntyping\nas\nt\nfrom\nalgopy\nimport\narc4\nUInt64Array\n:\nt\n.\nTypeAlias\n=\narc4\n.\nDynamicArray\n[\narc4\n.\nUInt64\n]\nTuples\n\u00b6\nType:\nalgopy.arc4.Tuple\nEncoding:\nSee\nARC4 Container Packing\nNative equivalent:\nbuiltins.tuple\nARC4 Tuples are immutable statically sized arrays of mixed item types. Item types can be specified via generic parameters or inferred from constructor parameters.\nStructs\n\u00b6\nType:\nalgopy.arc4.Struct\nEncoding:\nSee\nARC4 Container Packing\nNative equivalent:\ntyping.NamedTuple\nARC4 Structs are named tuples. The class keyword\nfrozen\ncan be used to indicate if a struct can be mutated.\nItems can be accessed and mutated via names instead of indexes. Structs do not have a\n.native\nproperty,\nbut a NamedTuple can be used in ABI methods are will be encoded\/decode to an ARC4 struct automatically.\nimport\ntyping\nfrom\nalgopy\nimport\narc4\nDecimal\n:\ntyping\n.\nTypeAlias\n=\narc4\n.\nUFixedNxM\n[\ntyping\n.\nLiteral\n[\n64\n],\ntyping\n.\nLiteral\n[\n9\n]]\nclass\nVector\n(\narc4\n.\nStruct\n,\nkw_only\n=\nTrue\n,\nfrozen\n=\nTrue\n):\nx\n:\nDecimal\ny\n:\nDecimal\nARC4 Container Packing\n\u00b6\nARC4 encoding rules are detailed explicitly in the\nARC\n. A summary is included here.\nContainers are composed of a head and tail portion.\nFor dynamic arrays, the head is prefixed with the length of the array encoded as a 16-bit number. This prefix is not included in offset calculation\nFor fixed sized items (eg. Bool, UIntN, or a StaticArray of UIntN), the item is included in the head\nConsecutive Bool items are compressed into the minimum number of whole bytes possible by using a single bit to represent each Bool\nFor variable sized items (eg. DynamicArray, String etc), a pointer is included to the head and the data is added to the tail. This pointer represents the offset from the start of the head to the start of the item data in the tail.\nReference types\n\u00b6\nTypes:\nalgopy.Account\n,\nalgopy.Application\n,\nalgopy.Asset\n,\nalgopy.gtxn.PaymentTransaction\n,\nalgopy.gtxn.KeyRegistrationTransaction\n,\nalgopy.gtxn.AssetConfigTransaction\n,\nalgopy.gtxn.AssetTransferTransaction\n,\nalgopy.gtxn.AssetFreezeTransaction\n,\nalgopy.gtxn.ApplicationCallTransaction\nThe ARC4 specification allows for using a number of\nreference types\nin an ABI method signature where this reference type refers to\u2026\nanother transaction in the group\nan account in the accounts array (\napat\nproperty of the transaction)\nan asset in the foreign assets array (\napas\nproperty of the transaction)\nan application in the foreign apps array (\napfa\nproperty of the transaction)\nThese types can only be used as parameters, and not as return types.\nfrom\nalgopy\nimport\n(\nAccount\n,\nApplication\n,\nARC4Contract\n,\nAsset\n,\narc4\n,\ngtxn\n,\n)\nclass\nReference\n(\nARC4Contract\n):\n@arc4\n.\nabimethod\ndef\nwith_transactions\n(\nself\n,\nasset\n:\nAsset\n,\npay\n:\ngtxn\n.\nPaymentTransaction\n,\naccount\n:\nAccount\n,\napp\n:\nApplication\n,\naxfr\n:\ngtxn\n.\nAssetTransferTransaction\n)\n->\nNone\n:\n...\nMutability\n\u00b6\nTo ensure semantic compatability the compiler will also check for any usages of mutable ARC4 types (arrays and structs) and ensure that any additional references are copied using the\n.copy()\nmethod.\nPython values are passed by reference, and when an object (eg. an array or struct) is mutated in one place, all references to that object see the mutated version. In Python this is managed via the heap.\nIn Algorand Python these mutable values are instead stored on the stack, so when an additional reference is made (i.e. by assigning to another variable) a copy is added to the stack.\nWhich means if one reference is mutated, the other references would not see the change.\nIn order to keep the semantics the same, the compiler forces the addition of\n.copy()\neach time a new reference to the same object to match what will happen on the AVM.\nStruct types can be indicated as\nfrozen\nwhich will eliminate the need for a\n.copy()\nas long as the struct also contains no mutable fields (such as arrays or another mutable struct)\nNext\nARC-28: Structured event logging\nPrevious\nOpcode budgets\nCopyright \u00a9 2024, Algorand Foundation\nMade with\nSphinx\nand\n@pradyunsg\n's\nFuro"} {"question":"","answer":"Back to top\nView this page\nToggle Light \/ Dark \/ Auto color theme\nToggle table of contents sidebar\nARC-28: Structured event logging\n\u00b6\nARC-28\nprovides a methodology for structured logging by Algorand smart contracts. It introduces the concept of Events, where data contained in logs may be categorized and structured.\nEach Event is identified by a unique 4-byte identifier derived from its\nEvent\nSignature\n. The Event Signature is a UTF-8 string comprised of the event\u2019s name, followed by the names of the\nARC-4\ndata types contained in the event, all enclosed in parentheses (\nEventName(type1,type2,...)\n) e.g.:\nSwapped\n(\nuint64\n,\nuint64\n)\nEvents are emitting by including them in the\nlog output\n. The metadata that identifies the event should then be included in the ARC-4 contract output so that a calling client can parse the logs to parse the structured data out. This part of the ARC-28 spec isn\u2019t yet implemented in Algorand Python, but it\u2019s on the roadmap.\nEmitting Events\n\u00b6\nTo emit an ARC-28 event in Algorand Python you can use the\nemit\nfunction, which appears in the\nalgopy.arc4\nnamespace for convenience since it heavily uses ARC-4 types and is essentially an extension of the ARC-4 specification. This function takes care of encoding the event payload to conform to the ARC-28 specification and there are 3 overloads:\nAn\nARC-4 struct\n, from what the name of the struct will be used as a the event name and the struct parameters will be used as the event fields -\narc4.emit(Swapped(a,\nb))\nAn event signature as a\nstring literal (or module variable)\n, followed by the values -\narc4.emit(\"Swapped(uint64,uint64)\",\na,\nb)\nAn event name as a\nstring literal (or module variable)\n, followed by the values -\narc4.emit(\"Swapped\",\na,\nb)\nHere\u2019s an example contract that emits events:\nfrom\nalgopy\nimport\nARC4Contract\n,\narc4\nclass\nSwapped\n(\narc4\n.\nStruct\n):\na\n:\narc4\n.\nUInt64\nb\n:\narc4\n.\nUInt64\nclass\nEventEmitter\n(\nARC4Contract\n):\n@arc4\n.\nabimethod\ndef\nemit_swapped\n(\nself\n,\na\n:\narc4\n.\nUInt64\n,\nb\n:\narc4\n.\nUInt64\n)\n->\nNone\n:\narc4\n.\nemit\n(\nSwapped\n(\nb\n,\na\n))\narc4\n.\nemit\n(\n\"Swapped(uint64,uint64)\"\n,\nb\n,\na\n)\narc4\n.\nemit\n(\n\"Swapped\"\n,\nb\n,\na\n)\nIt\u2019s worth noting that the ARC-28 event signature needs to be known at compile time so the event name can\u2019t be a dynamic type and must be a static string literal or string module constant. If you want to emit dynamic events you can do so using the\nlog\nmethod\n, but you\u2019d need to manually construct the correct series of bytes and the compiler won\u2019t be able to emit the ARC-28 metadata so you\u2019ll need to also manually parse the logs in your client.\nExamples of manually constructing an event:\n# This is essentially what the `emit` method is doing, noting that a,b need to be encoded\n# as a tuple so below (simple concat) only works for static ARC-4 types\nlog\n(\narc4\n.\narc4_signature\n(\n\"Swapped(uint64,uint64)\"\n),\na\n,\nb\n)\n# or, if you wanted it to be truly dynamic for some reason,\n# (noting this has a non-trivial opcode cost) and assuming in this case\n# that `event_suffix` is already defined as a `String`:\nevent_name\n=\nString\n(\n\"Event\"\n)\n+\nevent_suffix\nevent_selector\n=\nop\n.\nsha512_256\n((\nevent_name\n+\n\"(uint64)\"\n)\n.\nbytes\n)[:\n4\n]\nlog\n(\nevent_selector\n,\nUInt64\n(\n6\n))\nNext\nCalling other applications\nPrevious\nARC-4: Application Binary Interface\nCopyright \u00a9 2024, Algorand Foundation\nMade with\nSphinx\nand\n@pradyunsg\n's\nFuro"} {"question":"","answer":"Back to top\nView this page\nToggle Light \/ Dark \/ Auto color theme\nToggle table of contents sidebar\nCalling other applications\n\u00b6\nThe preferred way to call other smart contracts is using\nalgopy.arc4.abi_call\n,\nalgopy.arc4.arc4_create\nor\nalgopy.arc4.arc4_update\n. These methods support type checking and encoding of arguments, decoding of results, group transactions,\nand in the case of\narc4_create\nand\narc4_update\nautomatic inclusion of approval and clear state programs.\nalgopy.arc4.abi_call\n\u00b6\nalgopy.arc4.abi_call\ncan be used to call other ARC4 contracts, the first argument should refer to\nan ARC4 method either by referencing an Algorand Python\nalgopy.arc4.ARC4Contract\nmethod,\nan\nalgopy.arc4.ARC4Client\nmethod generated from an ARC-32 app spec, or a string representing\nthe ARC4 method signature or name.\nThe following arguments should then be the arguments required for the call, these arguments will be type checked and converted where appropriate.\nAny other related transaction parameters such as\napp_id\n,\nfee\netc. can also be provided as keyword arguments.\nIf the ARC4 method returns an ARC4 result then the result will be a tuple of the ARC4 result and the inner transaction.\nIf the ARC4 method does not return a result, or if the result type is not fully qualified then just the inner transaction is returned.\nfrom\nalgopy\nimport\nApplication\n,\nARC4Contract\n,\nString\n,\narc4\n,\nsubroutine\nclass\nHelloWorld\n(\nARC4Contract\n):\n@arc4\n.\nabimethod\n()\ndef\ngreet\n(\nself\n,\nname\n:\nString\n)\n->\nString\n:\nreturn\n\"Hello \"\n+\nname\n@subroutine\ndef\ncall_existing_application\n(\napp\n:\nApplication\n)\n->\nNone\n:\ngreeting\n,\ngreet_txn\n=\narc4\n.\nabi_call\n(\nHelloWorld\n.\ngreet\n,\n\"there\"\n,\napp_id\n=\napp\n)\nassert\ngreeting\n==\n\"Hello there\"\nassert\ngreet_txn\n.\napp_id\n==\n1234\nAlternative ways to use\narc4.abi_call\n\u00b6\nARC4Client method\n\u00b6\nA ARC4Client client represents the ARC4 abimethods of a smart contract and can be used to call abimethods in a type safe way\nARC4Client\u2019s can be produced by using\npuyapy\n--output-client=True\nwhen compiling a smart contract\n(this would be useful if you wanted to publish a client for consumption by other smart contracts)\nAn ARC4Client can also be be generated from an ARC-32 application.json using\npuyapy-clientgen\ne.g.\npuyapy-clientgen\nexamples\/hello_world_arc4\/out\/HelloWorldContract.arc32.json\n, this would be\nthe recommended approach for calling another smart contract that is not written in Algorand Python or does not provide the source\nfrom\nalgopy\nimport\narc4\n,\nsubroutine\nclass\nHelloWorldClient\n(\narc4\n.\nARC4Client\n):\ndef\nhello\n(\nself\n,\nname\n:\narc4\n.\nString\n)\n->\narc4\n.\nString\n:\n...\n@subroutine\ndef\ncall_another_contract\n()\n->\nNone\n:\n# can reference another algopy contract method\nresult\n,\ntxn\n=\narc4\n.\nabi_call\n(\nHelloWorldClient\n.\nhello\n,\narc4\n.\nString\n(\n\"World\"\n),\napp\n=...\n)\nassert\nresult\n==\n\"Hello, World\"\nMethod signature or name\n\u00b6\nAn ARC4 method selector can be used e.g.\n\"hello(string)string\nalong with a type index to specify the return type.\nAdditionally just a name can be provided and the method signature will be inferred e.g.\nfrom\nalgopy\nimport\narc4\n,\nsubroutine\n@subroutine\ndef\ncall_another_contract\n()\n->\nNone\n:\n# can reference a method selector\nresult\n,\ntxn\n=\narc4\n.\nabi_call\n[\narc4\n.\nString\n](\n\"hello(string)string\"\n,\narc4\n.\nString\n(\n\"Algo\"\n),\napp\n=...\n)\nassert\nresult\n==\n\"Hello, Algo\"\n# can reference a method name, the method selector is inferred from arguments and return type\nresult\n,\ntxn\n=\narc4\n.\nabi_call\n[\narc4\n.\nString\n](\n\"hello\"\n,\n\"There\"\n,\napp\n=...\n)\nassert\nresult\n==\n\"Hello, There\"\nalgopy.arc4.arc4_create\n\u00b6\nalgopy.arc4.arc4_create\ncan be used to create ARC4 applications, and will automatically populate required fields for app creation (such as approval program, clear state program, and global\/local state allocation).\nLike\nalgopy.arc4.abi_call\nit handles ARC4 arguments and provides ARC4 return values.\nIf the compiled programs and state allocation fields need to be customized (for example due to\ntemplate variables\n),\nthis can be done by passing a\nalgopy.CompiledContract\nvia the\ncompiled\nkeyword argument.\nfrom\nalgopy\nimport\nARC4Contract\n,\nString\n,\narc4\n,\nsubroutine\nclass\nHelloWorld\n(\nARC4Contract\n):\n@arc4\n.\nabimethod\n()\ndef\ngreet\n(\nself\n,\nname\n:\nString\n)\n->\nString\n:\nreturn\n\"Hello \"\n+\nname\n@subroutine\ndef\ncreate_new_application\n()\n->\nNone\n:\nhello_world_app\n=\narc4\n.\narc4_create\n(\nHelloWorld\n)\n.\ncreated_app\ngreeting\n,\n_txn\n=\narc4\n.\nabi_call\n(\nHelloWorld\n.\ngreet\n,\n\"there\"\n,\napp_id\n=\nhello_world_app\n)\nassert\ngreeting\n==\n\"Hello there\"\nalgopy.arc4.arc4_update\n\u00b6\nalgopy.arc4.arc4_update\nis used to update an existing ARC4 application and will automatically populate the required approval and clear state program fields.\nLike\nalgopy.arc4.abi_call\nit handles ARC4 arguments and provides ARC4 return values.\nIf the compiled programs need to be customized (for example due to (for example due to\ntemplate variables\n),\nthis can be done by passing a\nalgopy.CompiledContract\nvia the\ncompiled\nkeyword argument.\nfrom\nalgopy\nimport\nApplication\n,\nARC4Contract\n,\nString\n,\narc4\n,\nsubroutine\nclass\nNewApp\n(\nARC4Contract\n):\n@arc4\n.\nabimethod\n()\ndef\ngreet\n(\nself\n,\nname\n:\nString\n)\n->\nString\n:\nreturn\n\"Hello \"\n+\nname\n@subroutine\ndef\nupdate_existing_application\n(\nexisting_app\n:\nApplication\n)\n->\nNone\n:\nhello_world_app\n=\narc4\n.\narc4_update\n(\nNewApp\n,\napp_id\n=\nexisting_app\n)\ngreeting\n,\n_txn\n=\narc4\n.\nabi_call\n(\nNewApp\n.\ngreet\n,\n\"there\"\n,\napp_id\n=\nhello_world_app\n)\nassert\ngreeting\n==\n\"Hello there\"\nUsing\nitxn.ApplicationCall\n\u00b6\nIf the application being called is not an ARC4 contract, or an application specification is not available,\nthen\nalgopy.itxn.ApplicationCall\ncan be used. This approach is generally more verbose\nthan the above approaches, so should only be used if required. See\nhere\nfor an example\nNext\nCompiling to AVM bytecode\nPrevious\nARC-28: Structured event logging\nCopyright \u00a9 2024, Algorand Foundation\nMade with\nSphinx\nand\n@pradyunsg\n's\nFuro"} {"question":"","answer":"Back to top\nView this page\nToggle Light \/ Dark \/ Auto color theme\nToggle table of contents sidebar\nCompiling to AVM bytecode\n\u00b6\nThe PuyaPy compiler can compile Algorand Python smart contracts directly into AVM bytecode.\nOnce compiled, this bytecode can be utilized to construct AVM Application Call transactions both on and off chain.\nOutputting AVM bytecode from CLI\n\u00b6\nThe\n--output-bytecode\noption can be used to generate\n.bin\nfiles for smart contracts and logic signatures, producing an approval and clear program for each smart contract.\nObtaining bytecode within other contracts\n\u00b6\nThe\ncompile_contract\nfunction takes an Algorand Python smart contract class and returns a\nCompiledContract\n,\nThe global state, local state and program pages allocation parameters are derived from the contract by default, but can be overridden.\nThis compiled contract can then be used to create an\nalgopy.itxn.ApplicationCall\ntransaction or used with the\nARC4\nfunctions.\nThe\ncompile_logicsig\ntakes an Algorand Python logic signature and returns a\nCompiledLogicSig\n, which can be used to\nverify if a transaction has been signed by a particular logic signature.\nTemplate variables\n\u00b6\nAlgorand Python supports defining\nalgopy.TemplateVar\nvariables that can be substituted during compilation.\nFor example, the following contract has\nUInt64\nand\nBytes\ntemplate variables.\ntemplated_contract.py\n\u00b6\nfrom\nalgopy\nimport\nARC4Contract\n,\nBytes\n,\nTemplateVar\n,\nUInt64\n,\narc4\nclass\nTemplatedContract\n(\nARC4Contract\n):\n@arc4\n.\nabimethod\ndef\nmy_method\n(\nself\n)\n->\nUInt64\n:\nreturn\nTemplateVar\n[\nUInt64\n](\n\"SOME_UINT\"\n)\n@arc4\n.\nabimethod\ndef\nmy_other_method\n(\nself\n)\n->\nBytes\n:\nreturn\nTemplateVar\n[\nBytes\n](\n\"SOME_BYTES\"\n)\nWhen compiling to bytecode, the values for these template variables must be provided. These values can be provided via the CLI,\nor through the\ntemplate_vars\nparameter of the\ncompile_contract\nand\ncompile_logicsig\nfunctions.\nCLI\n\u00b6\nThe\n--template-var\noption can be used to\ndefine\neach variable.\nFor example to provide the values for the above example contract the following command could be used\npuyapy\n--template-var\nSOME_UINT=123\n--template-var\nSOME_BYTES=0xABCD\ntemplated_contract.py\nWithin other contracts\n\u00b6\nThe functions\ncompile_contract\nand\ncompile_logicsig\nboth have an optional\ntemplate_vars\nparameter\nwhich can be used to define template variables. Variables defined in this manner take priority over variables defined on the CLI.\nfrom\nalgopy\nimport\nBytes\n,\nUInt64\n,\narc4\n,\ncompile_contract\n,\nsubroutine\nfrom\ntemplated_contract\nimport\nTemplatedContract\n@subroutine\ndef\ncreate_templated_contract\n()\n->\nNone\n:\ncompiled\n=\ncompile_contract\n(\nTemplatedContract\n,\nglobal_uints\n=\n2\n,\n# customize allocated global uints\ntemplate_vars\n=\n{\n# provide template vars\n\"SOME_UINT\"\n:\nUInt64\n(\n123\n),\n\"SOME_BYTES\"\n:\nBytes\n(\nb\n\"\n\\xAB\\xCD\n\"\n)\n},\n)\narc4\n.\narc4_create\n(\nTemplatedContract\n,\ncompiled\n=\ncompiled\n)\nNext\nUnsupported Python features\nPrevious\nCalling other applications\nCopyright \u00a9 2024, Algorand Foundation\nMade with\nSphinx\nand\n@pradyunsg\n's\nFuro"} {"question":"","answer":"Back to top\nView this page\nToggle Light \/ Dark \/ Auto color theme\nToggle table of contents sidebar\nUnsupported Python features\n\u00b6\nraise, try\/except\/finally\n\u00b6\nException raising and exception handling constructs are not supported.\nSupporting user exceptions would be costly to implement in terms of op codes.\nFurthermore, AVM errors and exceptions are not \u201ccatch-able\u201d, they immediately terminate the\nprogram.\nTherefore, there is very little to no benefit of supporting exceptions and exception handling.\nThe preferred method of raising an error that terminates is through the use of\nassert statements\n.\nwith\n\u00b6\nContext managers are redundant without exception handling support.\nasync\n\u00b6\nThe AVM is not just single threaded, but all operations are effectively \u201cblocking\u201d, rendering\nasynchronous programming effectively useless.\nclosures & lambdas\n\u00b6\nWithout the support of function pointers, or other methods of invoking an arbitrary function,\nit\u2019s not possible to return a function as a closure.\nNested functions\/lambdas as a means of repeating common operations within a given function may be\nsupported in the future.\nglobal keyword\n\u00b6\nModule level values are only allowed to be\nconstants\n. No\nrebinding of module constants is allowed. It\u2019s not clear what the meaning here would be, since\nthere\u2019s no real arbitrary means of storing state without associating it with a particular contract.\nIf you do have need of such a thing, take a look at\ngload_bytes\nor\ngload_uint64\nif the contracts are within the same transaction,\notherwise\nAppGlobal.get_ex_bytes\nand\nAppGlobal.get_ex_uint64\n.\nInheritance (outside of contract classes)\n\u00b6\nPolymorphism is also impossible to support without function pointers, so data classes (such as\narc4.Struct\n) don\u2019t currently allow for inheritance. Member functions there\nare not supported because we\u2019re not sure yet whether it\u2019s better to not have inheritance but allow\nfunctions on data classes, or to allow inheritance and disallow member functions.\nContract inheritance is a special case, since each concrete contract is compiled separately, true\npolymorphism isn\u2019t required as all references can be resolved at compile time.\nNext\nPrinciples & Background\nPrevious\nCompiling to AVM bytecode\nCopyright \u00a9 2024, Algorand Foundation\nMade with\nSphinx\nand\n@pradyunsg\n's\nFuro"} {"question":"","answer":"Back to top\nView this page\nToggle Light \/ Dark \/ Auto color theme\nToggle table of contents sidebar\nPrinciples & Background\n\u00b6\nBackground\n\u00b6\nSmart contracts\non the Algorand blockchain run on the Algorand Virtual Machine (\nAVM\n).\nThis is a stack based virtual machine, which executes AVM bytecode as part of an\nApplication Call transaction\n.\nThe official mechanism for generating this bytecode is by submitting TEAL (Transaction Execution Approval Language) to\nan Algorand Node to compile.\nSmart signatures\nhave the same basis in the AVM and TEAL, but have a different execution model, one not involving\nApplication Call transactions. Our focus will primarily be on smart contracts, since they are strictly more powerful\nin terms of available AVM functions.\nTEAL is a\nnon-structured\nimperative language\n(albeit one with support for procedure calls that can isolate stack changes since v8 with\nproto\n). Writing TEAL is very\nsimilar to writing assembly code. It goes without saying that this is a particularly common or well-practiced model for\nprogramming these days.\nAs it stands today, developers wanting to write smart contracts specifically for Algorand have the option of writing\nTEAL directly, or using some other mechanism of generating TEAL such as the officially supported\nPyTEAL\nor the community supported\ntealish\n.\nPyTEAL follows a\ngenerative programming\nparadigm,\nwhich is a form of metaprogramming. Naturally, writing programs to generate programs presents an additional hurdle for\ndevelopers looking to pick up smart contract development. Tooling support for this is also suboptimal, for example, many\nclasses of errors resulting from the interaction between the procedural elements of the Python language and the PyTEAL\nexpression-building framework go unnoticed until the point of TEAL generation, or worse go completely unnoticed, and even\nwhen PyTEAL can\/does provide an error it can be difficult to understand.\nTealish provides a higher level procedural language, bearing a passing resemblance to Python, than compiles down to TEAL.\nHowever, it\u2019s still lower level than most developers are used to.\nFor example, the expression\n1\n+\n2\n+\n3\nis\nnot valid in tealish\n.\nAnother difference vs a higher level language such as Python is that\nfunctions can only be declared after the program\nentry point logic\n.\nIn essence, tealish abstracts away many difficulties with writing plain TEAL,\nbut it is still essentially more of a transpiler than a compiler.\nFurthermore, whilst appearing to have syntax inspired by Python, it both adds and removes many fundamental syntax elements,\npresenting an additional learning curve to developers looking to learn blockchain development on Algorand.\nBeing a bespoke language also means it has a much smaller ecosystem of tooling built around it compared to languages like\nPython or JavaScript.\nTo most developers, the Python programming language needs no introduction. First released in 1991, it\u2019s popularity has\ngrown steadily over the decades, and as of June 2023 it is consistently ranked as either the most popular langauge,\nor second most popular following JavaScript:\nGitHub 2022\nStackOverflow 2023\nTiobe\nPYPL\nThe AlgoKit project is an Algorand Foundation initiative to improve the developer experience on Algorand. Within this\nbroad remit, two of the key\nprinciples\nare to \u201cmeet developers where they are\u201d and \u201cleverage existing ecosystem\u201d.\nBuilding a compiler that allows developers to write smart contracts using an idiomatic subset of a high level language\nsuch as Python would make great strides towards both of these goals.\nWyvern was the original internal code name for just such a compiler (now called Puya), one that will transform Python code into valid TEAL\nsmart contracts. In line with the principle of meeting developers where they are, and recognising the popularity of\nJavaScript and TypeScript, a parallel initiative to build a TypeScript to TEAL compiler is\nalso underway\n.\nPrinciples\n\u00b6\nThe principles listed here should form the basis of our decision-making, both in the design and implementation.\nLeast surprise\n\u00b6\nOur primary objective is to assist developers in creating accurate smart contracts right from the\nstart. The often immutable nature of these contracts - although not always the case - and the\nsubstantial financial value they frequently safeguard, underlines the importance of this goal.\nThis principle ensures that the code behaves as anticipated by the developer. Specifically, if\nyou\u2019re a Python developer writing Python smart contract code, you can expect the code to behave\nidentically to its execution in a standard Python environment.\nFurthermore, we believe in promoting explicitness and correctness in contract code and its\nassociated typing. This approach reduces potential errors and enhances the overall integrity of our\nsmart contracts. Our commitment is to provide a user-friendly platform that aligns with the\ndeveloper\u2019s intuition and experience, ultimately simplifying their work and minimizing the\npotential for mistakes.\nInherited from AlgoKit\n\u00b6\nAs a part of the AlgoKit project, the principles outlined\nthere\nalso apply - to the extent that this project is just one component of AlgoKit.\n\u201cLeverage existing ecosystem\u201d\n\u00b6\nAlgoKit functionality gets into the hands of Algorand developers quickly by building on top of the\nexisting ecosystem wherever possible and aligned to these principles.\nIn order to leverage as much existing Python tooling as possible, we should strive to maintain the highest level of\ncompatibility with the Python language (and the reference implementation: CPython).\n\u201cMeet developers where they are\u201d\n\u00b6\nMake Blockchain development mainstream by giving all developers an idiomatic development experience in the operating\nsystem, IDE and language they are comfortable with so they can dive in quickly and have less they need to learn before\nbeing productive.\nPython is a very idiomatic language. We should embrace accepted patterns and practices as much as possible,\nsuch as those listed in\nPEP-20\n(aka \u201cThe Zen of Python\u201d).\n\u201cExtensible\u201d\n\u00b6\nBe extensible for community contribution rather than stifling innovation, bottle-necking all changes through the\nAlgorand Foundation and preventing the opportunity for other ecosystems being represented (e.g. Go, Rust, etc.).\nThis helps make developers feel welcome and is part of the developer experience, plus it makes it easier to add\nfeatures sustainably\nOne way to support this principle in the broader AlgoKit context is by building in a mechanism for reusing\ncommon code between smart contracts, to allow the community to build their own Python packages.\n\u201cSustainable\u201d\n\u00b6\nAlgoKit should be built in a flexible fashion with long-term maintenance in mind. Updates to latest patches in\ndependencies, Algorand protocol development updates, and community contributions and feedback will all feed in to the\nevolution of the software.\nTaking this principle further, ensuring the compiler is well-designed (e.g. frontend backend separation,\nwith a well-thought-out IR) will help with maintaining and improving the implementation over time. For example,\nadding in new TEAL language features will be easier, same for implementing new optimisation strategies.\nLooking to the future, best practices for smart contract development are rapidly evolving. We shouldn\u2019t tie the\nimplementation too tightly to a current standard such as ARC-4 - although in that specific example, we would still\naim for first class support, but it shouldn\u2019t be assumed as the only way to write smart contracts.\n\u201cModular components\u201d\n\u00b6\nSolution components should be modular and loosely coupled to facilitate efficient parallel development by small,\neffective teams, reduced architectural complexity and allowing developers to pick and choose the specific tools and\ncapabilities they want to use based on their needs and what they are comfortable with.\nWe will focus on the language and compiler design itself.\nAn example of a very useful feature, that is strongly related but could be implemented separately instead,\nis the ability to run the users code in a unit-testing context, without compilation+deployment first.\nThis would require implementing in Python some level of simulation of Algorand Nodes \/ AVM behaviour.\n\u201cSecure by default\u201d\n\u00b6\nInclude defaults, patterns and tooling that help developers write secure code and reduce the likelihood of security\nincidents in the Algorand ecosystem. This solution should help Algorand be the most secure Blockchain ecosystem.\nEnforcing security (which is multi-faceted) at a compiler level is difficult, and is some cases impossible.\nThe best application of this principle here is to support auditing, which is important and nuanced enough to be\nlisted below as a separate principle.\n\u201cCohesive developer tool suite\u201d + \u201cSeamless onramp\u201d\n\u00b6\nCohesive developer tool suite: Using AlgoKit should feel professional and cohesive, like it was designed to work\ntogether, for the developer; not against them. Developers are guided towards delivering end-to-end, high quality\noutcomes on MainNet so they and Algorand are more likely to be successful.\nSeamless onramp: New developers have a seamless experience to get started and they are guided into a pit of success\nwith best practices, supported by great training collateral; you should be able to go from nothing to debugging code\nin 5 minutes.\nThese principles relate more to AlgoKit as a whole, so we can respect them by considering the impacts of our decisions\nthere more broadly.\nAbstraction without obfuscation\n\u00b6\nAlgorand Python is a high level language, with support for things such as branching logic, operator precedence, etc.,\nand not a set of \u201cmacros\u201d for generating TEAL. As such, developers will not be able to directly influence specific TEAL\noutput, if this is desirable a language such as\nTealish\nis more appropriate.\nWhilst this will abstract away certain aspects of the underlying TEAL language, there are certain AVM concerns\n(such as op code budgets) that should not be abstracted away. That said, we should strive to generate code this is\ncost-effective and unsurprising. Python mechanisms such as dynamic (runtime) dispatch, and also many of its builtin\nfunctions on types such as\nstr\nthat are taken for granted, would require large amounts of ops compared to the\nPython code it represents.\nSupport auditing\n\u00b6\nAuditing is a critical part of the security process for deploying smart contracts. We want to support this function,\nand can do so in two ways:\nBy ensuring the same Python code as input generates identical output each time the compiler\nis run regardless of the system it\u2019s running on. This is what might be termed\nOutput stability\n.\nEnsuring a consistent output regardless of the system it\u2019s run on (assuming the same compiler version), means that\nauditing the lower level (ie TEAL) code is possible.\nAlthough auditing the TEAL code should be possible, being able to easily identify and relate it back to the higher level\ncode can make auditing the contract logic simpler and easier.\nRevolution, not evolution\n\u00b6\nThis is a new and groundbreaking way of developing for Algorand, and not a continuation of the PyTEAL\/Beaker approach.\nBy allowing developers to write procedural code, as opposed to constructing an expression tree,\nwe can (among other things) significantly reduce the barrier to entry for developing smart contracts for the Algorand platform.\nSince the programming paradigm will be fundamentally different, providing a smooth migration experience from PyTEAL\nto this new world is not an intended goal, and shouldn\u2019t be a factor in our decisions. For example, it is not a goal of\nthis project to produce a step-by-step \u201cmigrating from PyTEAL\u201d document, as it is not a requirement for users to\nswitch to this new paradigm in the short to medium term - support for PyTEAL should continue in parallel.\nNext\nAPI Reference\nPrevious\nUnsupported Python features\nCopyright \u00a9 2024, Algorand Foundation\nMade with\nSphinx\nand\n@pradyunsg\n's\nFuro"} {"question":"","answer":"Back to top\nView this page\nToggle Light \/ Dark \/ Auto color theme\nToggle table of contents sidebar\nAPI Reference\n\u00b6\nalgopy\nPackage Contents\nClasses\nFunctions\nData\nAPI\nARC4Contract\nAccount\nApplication\nAsset\nBigUInt\nBox\nBoxMap\nBoxRef\nBytes\nBytesBacked\nCompiledContract\nCompiledLogicSig\nContract\nGlobal\nGlobalState\nLocalState\nLogicSig\nOnCompleteAction\nOpUpFeeSource\nStateTotals\nString\nTemplateVar\nTransactionType\nTxn\nUInt64\ncompile_contract()\ncompile_logicsig()\nensure_budget()\nlog()\nlogicsig()\nsubroutine()\nuenumerate\nurange\nalgopy.arc4\nModule Contents\nClasses\nFunctions\nData\nAPI\nARC4Client\nARC4Contract\nAddress\nBigUFixedNxM\nBigUIntN\nBool\nByte\nDynamicArray\nDynamicBytes\nStaticArray\nString\nStruct\nTuple\nUFixedNxM\nUInt128\nUInt16\nUInt256\nUInt32\nUInt512\nUInt64\nUInt8\nUIntN\nabi_call\nabimethod()\narc4_create()\narc4_signature()\narc4_update()\nbaremethod()\nemit()\nalgopy.gtxn\nModule Contents\nClasses\nAPI\nApplicationCallTransaction\nAssetConfigTransaction\nAssetFreezeTransaction\nAssetTransferTransaction\nKeyRegistrationTransaction\nPaymentTransaction\nTransaction\nTransactionBase\nalgopy.itxn\nModule Contents\nClasses\nFunctions\nAPI\nApplicationCall\nApplicationCallInnerTransaction\nAssetConfig\nAssetConfigInnerTransaction\nAssetFreeze\nAssetFreezeInnerTransaction\nAssetTransfer\nAssetTransferInnerTransaction\nInnerTransaction\nInnerTransactionResult\nKeyRegistration\nKeyRegistrationInnerTransaction\nPayment\nPaymentInnerTransaction\nsubmit_txns()\nalgopy.op\nModule Contents\nClasses\nFunctions\nAPI\nAcctParamsGet\nAppGlobal\nAppLocal\nAppParamsGet\nAssetHoldingGet\nAssetParamsGet\nBase64\nBlock\nBox\nEC\nECDSA\nEllipticCurve\nGITxn\nGTxn\nGlobal\nITxn\nITxnCreate\nJsonRef\nMiMCConfigurations\nScratch\nTxn\nVoterParamsGet\nVrfVerify\naddw()\napp_opted_in()\narg()\nbalance()\nbase64_decode()\nbitlen()\nbsqrt()\nbtoi()\nbzero()\nconcat()\ndivmodw()\ndivw()\necdsa_pk_decompress()\necdsa_pk_recover()\necdsa_verify()\ned25519verify()\ned25519verify_bare()\nerr()\nexit()\nexp()\nexpw()\nextract()\nextract_uint16()\nextract_uint32()\nextract_uint64()\nfalcon_verify()\ngaid()\ngetbit()\ngetbyte()\ngload_bytes()\ngload_uint64()\nitob()\nkeccak256()\nmimc()\nmin_balance()\nmulw()\nonline_stake()\nreplace()\nselect_bytes()\nselect_uint64()\nsetbit_bytes()\nsetbit_uint64()\nsetbyte()\nsha256()\nsha3_256()\nsha512_256()\nshl()\nshr()\nsqrt()\nsubstring()\nsumhash512()\nvrf_verify()\nNext\nalgopy\nPrevious\nPrinciples & Background\nCopyright \u00a9 2024, Algorand Foundation\nMade with\nSphinx\nand\n@pradyunsg\n's\nFuro"} {"question":"","answer":"Back to top\nView this page\nToggle Light \/ Dark \/ Auto color theme\nToggle table of contents sidebar\nalgopy\n\u00b6\nPackage Contents\n\u00b6\nClasses\n\u00b6\nARC4Contract\nA contract that conforms to the ARC4 ABI specification, functions decorated with\n@abimethod\nor\n@baremethod\nwill form the public interface of the contract\nAccount\nAn Account on the Algorand network.\nApplication\nAn Application on the Algorand network.\nAsset\nAn Asset on the Algorand network.\nBigUInt\nA variable length (max 512-bit) unsigned integer\nBox\nBox abstracts the reading and writing of a single value to a single box.\nThe box size will be reconfigured dynamically to fit the size of the value being assigned to\nit.\nBoxMap\nBoxMap abstracts the reading and writing of a set of boxes using a common key and content type.\nEach composite key (prefix + key) still needs to be made available to the application via the\nboxes\nproperty of the Transaction.\nBoxRef\nBoxRef abstracts the reading and writing of boxes containing raw binary data. The size is\nconfigured manually, and can be set to values larger than what the AVM can handle in a single\nvalue.\nBytes\nA byte sequence, with a maximum length of 4096 bytes, one of the primary data types on the AVM\nBytesBacked\nRepresents a type that is a single bytes value\nCompiledContract\nProvides compiled programs and state allocation values for a Contract.\nCreate by calling\ncompile_contract\n.\nCompiledLogicSig\nProvides account for a Logic Signature.\nCreate by calling\ncompile_logicsig\n.\nContract\nBase class for an Algorand Smart Contract\nGlobal\nGet Global values\nNative TEAL op:\nglobal\nGlobalState\nGlobal state associated with the application, the key will be the name of the member, this\nis assigned to\nLocalState\nLocal state associated with the application and an account\nLogicSig\nA logic signature\nOnCompleteAction\nOn Completion actions available in an application call transaction\nOpUpFeeSource\nDefines the source of fees for the OpUp utility.\nStateTotals\nOptions class to manually define the total amount of global and local state contract will use,\nused by\nContract.__init_subclass__\n.\nString\nA UTF-8 encoded string.\nTransactionType\nThe different transaction types available in a transaction\nTxn\nGet values for the current executing transaction\nNative TEAL ops:\ntxn\n,\ntxnas\nUInt64\nA 64-bit unsigned integer, one of the primary data types on the AVM\nuenumerate\nYields pairs containing a count (from zero) and a value yielded by the iterable argument.\nurange\nProduces a sequence of UInt64 from start (inclusive) to stop (exclusive) by step.\nFunctions\n\u00b6\ncompile_contract\nReturns the compiled data for the specified contract\ncompile_logicsig\nReturns the Account for the specified logic signature\nensure_budget\nEnsure the available op code budget is greater than or equal to required_budget\nlog\nConcatenates and logs supplied args as a single bytes value.\nlogicsig\nDecorator to indicate a function is a logic signature\nsubroutine\nDecorator to indicate functions or methods that can be called by a Smart Contract\nData\n\u00b6\nTemplateVar\nTemplate variables can be used to represent a placeholder for a deploy-time provided value.\nAPI\n\u00b6\nclass\nalgopy.\nARC4Contract\n\u00b6\nA contract that conforms to the ARC4 ABI specification, functions decorated with\n@abimethod\nor\n@baremethod\nwill form the public interface of the contract\nThe approval_program will be implemented by the compiler, and route application args\naccording to the ARC4 ABI specification\nThe clear_state_program will by default return True, but can be overridden\nclass\nalgopy.\nAccount\n(\nvalue\n:\nstr\n|\nalgopy.Bytes\n=\n...\n,\n\/\n)\n\u00b6\nAn Account on the Algorand network.\nNote: must be an available resource to access properties other than\nbytes\nInitialization\nIf\nvalue\nis a string, it should be a 58 character base32 string,\nie a base32 string-encoded 32 bytes public key + 4 bytes checksum.\nIf\nvalue\nis a Bytes, it\u2019s length checked to be 32 bytes - to avoid this\ncheck, use\nAddress.from_bytes(...)\ninstead.\nDefaults to the zero-address.\n__bool__\n(\n)\n\u2192\nbool\n\u00b6\nReturns\nTrue\nif not equal to the zero-address\n__eq__\n(\nother\n:\nalgopy.Account\n|\nstr\n)\n\u2192\nbool\n\u00b6\nAccount equality is determined by the address of another\nAccount\nor\nstr\n__ne__\n(\nother\n:\nalgopy.Account\n|\nstr\n)\n\u2192\nbool\n\u00b6\nAccount equality is determined by the address of another\nAccount\nor\nstr\nproperty\nauth_address\n:\nalgopy.Account\n\u00b6\nAddress the account is rekeyed to\nNote\nAccount must be an available resource\nproperty\nbalance\n:\nalgopy.UInt64\n\u00b6\nAccount balance in microalgos\nNote\nAccount must be an available resource\nproperty\nbytes\n:\nalgopy.Bytes\n\u00b6\nGet the underlying Bytes\nclassmethod\nfrom_bytes\n(\nvalue\n:\nalgopy.Bytes\n|\nbytes\n,\n\/\n)\n\u2192\nSelf\n\u00b6\nConstruct an instance from the underlying bytes (no validation)\nis_opted_in\n(\nasset_or_app\n:\nalgopy.Asset\n|\nalgopy.Application\n,\n\/\n)\n\u2192\nbool\n\u00b6\nReturns true if this account is opted in to the specified Asset or Application.\nNote\nAccount and Asset\/Application must be an available resource\nproperty\nmin_balance\n:\nalgopy.UInt64\n\u00b6\nMinimum required balance for account, in microalgos\nNote\nAccount must be an available resource\nproperty\ntotal_apps_created\n:\nalgopy.UInt64\n\u00b6\nThe number of existing apps created by this account.\nNote\nAccount must be an available resource\nproperty\ntotal_apps_opted_in\n:\nalgopy.UInt64\n\u00b6\nThe number of apps this account is opted into.\nNote\nAccount must be an available resource\nproperty\ntotal_assets\n:\nalgopy.UInt64\n\u00b6\nThe numbers of ASAs held by this account (including ASAs this account created).\nNote\nAccount must be an available resource\nproperty\ntotal_assets_created\n:\nalgopy.UInt64\n\u00b6\nThe number of existing ASAs created by this account.\nNote\nAccount must be an available resource\nproperty\ntotal_box_bytes\n:\nalgopy.UInt64\n\u00b6\nThe total number of bytes used by this account\u2019s app\u2019s box keys and values.\nNote\nAccount must be an available resource\nproperty\ntotal_boxes\n:\nalgopy.UInt64\n\u00b6\nThe number of existing boxes created by this account\u2019s app.\nNote\nAccount must be an available resource\nproperty\ntotal_extra_app_pages\n:\nalgopy.UInt64\n\u00b6\nThe number of extra app code pages used by this account.\nNote\nAccount must be an available resource\nproperty\ntotal_num_byte_slice\n:\nalgopy.UInt64\n\u00b6\nThe total number of byte array values allocated by this account in Global and Local States.\nNote\nAccount must be an available resource\nproperty\ntotal_num_uint\n:\nalgopy.UInt64\n\u00b6\nThe total number of uint64 values allocated by this account in Global and Local States.\nNote\nAccount must be an available resource\nclass\nalgopy.\nApplication\n(\napplication_id\n:\nalgopy.UInt64\n|\nint\n=\n0\n,\n\/\n)\n\u00b6\nAn Application on the Algorand network.\nInitialization\nInitialized with the id of an application. Defaults to zero (an invalid ID).\n__bool__\n(\n)\n\u2192\nbool\n\u00b6\nReturns\nTrue\nif\napplication_id\nis not\n0\n__eq__\n(\nother\n:\nalgopy.Application\n)\n\u2192\nbool\n\u00b6\nApplication equality is determined by the equality of an Application\u2019s id\n__ne__\n(\nother\n:\nalgopy.Application\n)\n\u2192\nbool\n\u00b6\nApplication equality is determined by the equality of an Application\u2019s id\nproperty\naddress\n:\nalgopy.Account\n\u00b6\nAddress for which this application has authority\nNote\nApplication must be an available resource\nproperty\napproval_program\n:\nalgopy.Bytes\n\u00b6\nBytecode of Approval Program\nNote\nApplication must be an available resource\nproperty\nclear_state_program\n:\nalgopy.Bytes\n\u00b6\nBytecode of Clear State Program\nNote\nApplication must be an available resource\nproperty\ncreator\n:\nalgopy.Account\n\u00b6\nCreator address\nNote\nApplication must be an available resource\nproperty\nextra_program_pages\n:\nalgopy.UInt64\n\u00b6\nNumber of Extra Program Pages of code space\nNote\nApplication must be an available resource\nproperty\nglobal_num_bytes\n:\nalgopy.UInt64\n\u00b6\nNumber of byte array values allowed in Global State\nNote\nApplication must be an available resource\nproperty\nglobal_num_uint\n:\nalgopy.UInt64\n\u00b6\nNumber of uint64 values allowed in Global State\nNote\nApplication must be an available resource\nproperty\nid\n:\nalgopy.UInt64\n\u00b6\nReturns the id of the application\nproperty\nlocal_num_bytes\n:\nalgopy.UInt64\n\u00b6\nNumber of byte array values allowed in Local State\nNote\nApplication must be an available resource\nproperty\nlocal_num_uint\n:\nalgopy.UInt64\n\u00b6\nNumber of uint64 values allowed in Local State\nNote\nApplication must be an available resource\nclass\nalgopy.\nAsset\n(\nasset_id\n:\nalgopy.UInt64\n|\nint\n=\n0\n,\n\/\n)\n\u00b6\nAn Asset on the Algorand network.\nInitialization\nInitialized with the id of an asset. Defaults to zero (an invalid ID).\n__bool__\n(\n)\n\u2192\nbool\n\u00b6\nReturns\nTrue\nif\nasset_id\nis not\n0\n__eq__\n(\nother\n:\nalgopy.Asset\n)\n\u2192\nbool\n\u00b6\nAsset equality is determined by the equality of an Asset\u2019s id\n__ne__\n(\nother\n:\nalgopy.Asset\n)\n\u2192\nbool\n\u00b6\nAsset equality is determined by the equality of an Asset\u2019s id\nbalance\n(\naccount\n:\nalgopy.Account\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nAmount of the asset unit held by this account. Fails if the account has not\nopted in to the asset.\nNote\nAsset and supplied Account must be an available resource\nproperty\nclawback\n:\nalgopy.Account\n\u00b6\nClawback address\nNote\nAsset must be an available resource\nproperty\ncreator\n:\nalgopy.Account\n\u00b6\nCreator address\nNote\nAsset must be an available resource\nproperty\ndecimals\n:\nalgopy.UInt64\n\u00b6\nSee AssetParams.Decimals\nNote\nAsset must be an available resource\nproperty\ndefault_frozen\n:\nbool\n\u00b6\nFrozen by default or not\nNote\nAsset must be an available resource\nproperty\nfreeze\n:\nalgopy.Account\n\u00b6\nFreeze address\nNote\nAsset must be an available resource\nfrozen\n(\naccount\n:\nalgopy.Account\n,\n\/\n)\n\u2192\nbool\n\u00b6\nIs the asset frozen or not. Fails if the account has not\nopted in to the asset.\nNote\nAsset and supplied Account must be an available resource\nproperty\nid\n:\nalgopy.UInt64\n\u00b6\nReturns the id of the Asset\nproperty\nmanager\n:\nalgopy.Account\n\u00b6\nManager address\nNote\nAsset must be an available resource\nproperty\nmetadata_hash\n:\nalgopy.Bytes\n\u00b6\nArbitrary commitment\nNote\nAsset must be an available resource\nproperty\nname\n:\nalgopy.Bytes\n\u00b6\nAsset name\nNote\nAsset must be an available resource\nproperty\nreserve\n:\nalgopy.Account\n\u00b6\nReserve address\nNote\nAsset must be an available resource\nproperty\ntotal\n:\nalgopy.UInt64\n\u00b6\nTotal number of units of this asset\nNote\nAsset must be an available resource\nproperty\nunit_name\n:\nalgopy.Bytes\n\u00b6\nAsset unit name\nNote\nAsset must be an available resource\nproperty\nurl\n:\nalgopy.Bytes\n\u00b6\nURL with additional info about the asset\nNote\nAsset must be an available resource\nclass\nalgopy.\nBigUInt\n(\nvalue\n:\nalgopy.UInt64\n|\nint\n=\n0\n,\n\/\n)\n\u00b6\nA variable length (max 512-bit) unsigned integer\nInitialization\nA BigUInt can be initialized with a UInt64, a Python int literal, or an int variable\ndeclared at the module level\n__add__\n(\nother\n:\nalgopy.BigUInt\n|\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.BigUInt\n\u00b6\nA BigUInt can be added with another BigUInt, UInt64 or int e.g.\nBigUInt(4)\n+\n2\n.\n__and__\n(\nother\n:\nalgopy.BigUInt\n|\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.BigUInt\n\u00b6\nA BigUInt can bitwise and with another BigUInt, UInt64 or int e.g.\nBigUInt(4)\n&\n2\n__bool__\n(\n)\n\u2192\nbool\n\u00b6\nA BigUInt will evaluate to\nFalse\nif zero, and\nTrue\notherwise\n__eq__\n(\nother\n:\nalgopy.BigUInt\n|\nalgopy.UInt64\n|\nint\n)\n\u2192\nbool\n\u00b6\nA BigUInt can use the\n==\noperator with another BigUInt, UInt64 or int\n__floordiv__\n(\nother\n:\nalgopy.BigUInt\n|\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.BigUInt\n\u00b6\nA BigUInt can be floor divided with another BigUInt, UInt64 or int e.g.\nBigUInt(4)\n\/\/\n2\n.\nThis will error on divide by zero\n__ge__\n(\nother\n:\nalgopy.BigUInt\n|\nalgopy.UInt64\n|\nint\n)\n\u2192\nbool\n\u00b6\nA BigUInt can use the\n>=\noperator with another BigUInt, UInt64 or int\n__gt__\n(\nother\n:\nalgopy.BigUInt\n|\nalgopy.UInt64\n|\nint\n)\n\u2192\nbool\n\u00b6\nA BigUInt can use the\n>\noperator with another BigUInt, UInt64 or int\n__iadd__\n(\nother\n:\nalgopy.BigUInt\n|\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.BigUInt\n\u00b6\nA BigUInt can be incremented with another BigUInt, UInt64 or int e.g.\na\n+=\nBigUInt(2)\n.\n__iand__\n(\nother\n:\nalgopy.BigUInt\n|\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.BigUInt\n\u00b6\nA BigUInt can bitwise and with another BigUInt, UInt64 or int e.g.\na\n&=\nBigUInt(2)\n__ifloordiv__\n(\nother\n:\nalgopy.BigUInt\n|\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.BigUInt\n\u00b6\nA BigUInt can be floor divided with another BigUInt, UInt64 or int e.g.\na\n\/\/=\nBigUInt(2)\n.\nThis will error on divide by zero\n__imod__\n(\nother\n:\nalgopy.BigUInt\n|\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.BigUInt\n\u00b6\nA BigUInt can be modded with another BigUInt, UInt64 or int e.g.\na\n%=\nBigUInt(2)\n.\nThis will error on mod by zero\n__imul__\n(\nother\n:\nalgopy.BigUInt\n|\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.BigUInt\n\u00b6\nA BigUInt can be multiplied with another BigUInt, UInt64 or int e.g.\na*=\nBigUInt(2)\n.\n__ior__\n(\nother\n:\nalgopy.BigUInt\n|\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.BigUInt\n\u00b6\nA BigUInt can bitwise or with another BigUInt, UInt64 or int e.g.\na\n|=\nBigUInt(2)\n__isub__\n(\nother\n:\nalgopy.BigUInt\n|\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.BigUInt\n\u00b6\nA BigUInt can be subtracted with another BigUInt, UInt64 or int e.g.\na\n-=\nBigUInt(2)\n.\nThis will error on underflow\n__ixor__\n(\nother\n:\nalgopy.BigUInt\n|\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.BigUInt\n\u00b6\nA BigUInt can bitwise xor with another BigUInt, UInt64 or int e.g.\na\n^=\nBigUInt(2)\n__le__\n(\nother\n:\nalgopy.BigUInt\n|\nalgopy.UInt64\n|\nint\n)\n\u2192\nbool\n\u00b6\nA BigUInt can use the\n<=\noperator with another BigUInt, UInt64 or int\n__lt__\n(\nother\n:\nalgopy.BigUInt\n|\nalgopy.UInt64\n|\nint\n)\n\u2192\nbool\n\u00b6\nA BigUInt can use the\n<\noperator with another BigUInt, UInt64 or int\n__mod__\n(\nother\n:\nalgopy.BigUInt\n|\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.BigUInt\n\u00b6\nA BigUInt can be modded with another BigUInt, UInt64 or int e.g.\nBigUInt(4)\n%\n2\n.\nThis will error on mod by zero\n__mul__\n(\nother\n:\nalgopy.BigUInt\n|\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.BigUInt\n\u00b6\nA BigUInt can be multiplied with another BigUInt, UInt64 or int e.g.\n4\n+\nBigUInt(2)\n.\n__ne__\n(\nother\n:\nalgopy.BigUInt\n|\nalgopy.UInt64\n|\nint\n)\n\u2192\nbool\n\u00b6\nA BigUInt can use the\n!=\noperator with another BigUInt, UInt64 or int\n__or__\n(\nother\n:\nalgopy.BigUInt\n|\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.BigUInt\n\u00b6\nA BigUInt can bitwise or with another BigUInt, UInt64 or int e.g.\nBigUInt(4)\n|\n2\n__pos__\n(\n)\n\u2192\nalgopy.BigUInt\n\u00b6\nSupports unary + operator. Redundant given the type is unsigned\n__radd__\n(\nother\n:\nalgopy.BigUInt\n|\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.BigUInt\n\u00b6\nA BigUInt can be added with another BigUInt, UInt64 or int e.g.\n4\n+\nBigUInt(2)\n.\n__rand__\n(\nother\n:\nalgopy.BigUInt\n|\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.BigUInt\n\u00b6\nA BigUInt can bitwise and with another BigUInt, UInt64 or int e.g.\n4\n&\nBigUInt(2)\n__rfloordiv__\n(\nother\n:\nalgopy.BigUInt\n|\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.BigUInt\n\u00b6\nA BigUInt can be floor divided with another BigUInt, UInt64 or int e.g.\n4\n\/\/\nBigUInt(2)\n.\nThis will error on divide by zero\n__rmod__\n(\nother\n:\nalgopy.BigUInt\n|\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.BigUInt\n\u00b6\nA BigUInt can be modded with another BigUInt, UInt64 or int e.g.\n4\n%\nBigUInt(2)\n.\nThis will error on mod by zero\n__rmul__\n(\nother\n:\nalgopy.BigUInt\n|\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.BigUInt\n\u00b6\nA BigUInt can be multiplied with another BigUInt, UInt64 or int e.g.\nBigUInt(4)\n+\n2\n.\n__ror__\n(\nother\n:\nalgopy.BigUInt\n|\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.BigUInt\n\u00b6\nA BigUInt can bitwise or with another BigUInt, UInt64 or int e.g.\n4\n|\nBigUInt(2)\n__rsub__\n(\nother\n:\nalgopy.BigUInt\n|\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.BigUInt\n\u00b6\nA BigUInt can be subtracted with another BigUInt, UInt64 or int e.g.\n4\n-\nBigUInt(2)\n.\nThis will error on underflow\n__rxor__\n(\nother\n:\nalgopy.BigUInt\n|\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.BigUInt\n\u00b6\nA BigUInt can bitwise xor with another BigUInt, UInt64 or int e.g.\n4\n^\nBigUInt(2)\n__sub__\n(\nother\n:\nalgopy.BigUInt\n|\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.BigUInt\n\u00b6\nA BigUInt can be subtracted with another BigUInt, UInt64 or int e.g.\nBigUInt(4)\n-\n2\n.\nThis will error on underflow\n__xor__\n(\nother\n:\nalgopy.BigUInt\n|\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.BigUInt\n\u00b6\nA BigUInt can bitwise xor with another BigUInt, UInt64 or int e.g.\nBigUInt(4)\n^\n2\nproperty\nbytes\n:\nalgopy.Bytes\n\u00b6\nGet the underlying Bytes\nclassmethod\nfrom_bytes\n(\nvalue\n:\nalgopy.Bytes\n|\nbytes\n,\n\/\n)\n\u2192\nSelf\n\u00b6\nConstruct an instance from the underlying bytes (no validation)\nclass\nalgopy.\nBox\n(\ntype_\n:\ntype\n[\nalgopy._TValue\n]\n,\n\/\n,\n*\n,\nkey\n:\nbytes\n|\nstr\n|\nalgopy.Bytes\n|\nalgopy.String\n=\n...\n,\n)\n\u00b6\nBox abstracts the reading and writing of a single value to a single box.\nThe box size will be reconfigured dynamically to fit the size of the value being assigned to\nit.\nInitialization\n__bool__\n(\n)\n\u2192\nbool\n\u00b6\nReturns True if the box exists, regardless of the truthiness of the contents\nof the box\nget\n(\n*\n,\ndefault\n:\nalgopy._TValue\n)\n\u2192\nalgopy._TValue\n\u00b6\nRetrieve the contents of the box, or return the default value if the box has not been\ncreated.\nParameters\n:\ndefault\n\u2013 The default value to return if the box has not been created\nproperty\nkey\n:\nalgopy.Bytes\n\u00b6\nProvides access to the raw storage key\nproperty\nlength\n:\nalgopy.UInt64\n\u00b6\nGet the length of this Box. Fails if the box does not exist\nmaybe\n(\n)\n\u2192\ntuple\n[\nalgopy._TValue\n,\nbool\n]\n\u00b6\nRetrieve the contents of the box if it exists, and return a boolean indicating if the box\nexists.\nproperty\nvalue\n:\nalgopy._TValue\n\u00b6\nRetrieve the contents of the box. Fails if the box has not been created.\nclass\nalgopy.\nBoxMap\n(\nkey_type\n:\ntype\n[\nalgopy._TKey\n]\n,\nvalue_type\n:\ntype\n[\nalgopy._TValue\n]\n,\n\/\n,\n*\n,\nkey_prefix\n:\nbytes\n|\nstr\n|\nalgopy.Bytes\n|\nalgopy.String\n=\n...\n,\n)\n\u00b6\nBoxMap abstracts the reading and writing of a set of boxes using a common key and content type.\nEach composite key (prefix + key) still needs to be made available to the application via the\nboxes\nproperty of the Transaction.\nInitialization\nDeclare a box map.\nParameters\n:\nkey_type\n\u2013 The type of the keys\nvalue_type\n\u2013 The type of the values\nkey_prefix\n\u2013 The value used as a prefix to key data, can be empty.\nWhen the BoxMap is being assigned to a member variable,\nthis argument is optional and defaults to the member variable name,\nand if a custom value is supplied it must be static.\n__contains__\n(\nkey\n:\nalgopy._TKey\n)\n\u2192\nbool\n\u00b6\nReturns True if a box with the specified key exists in the map, regardless of the\ntruthiness of the contents of the box\n__delitem__\n(\nkey\n:\nalgopy._TKey\n)\n\u2192\nNone\n\u00b6\nDeletes a keyed box\n__getitem__\n(\nkey\n:\nalgopy._TKey\n)\n\u2192\nalgopy._TValue\n\u00b6\nRetrieve the contents of a keyed box. Fails if the box for the key has not been created.\n__setitem__\n(\nkey\n:\nalgopy._TKey\n,\nvalue\n:\nalgopy._TValue\n)\n\u2192\nNone\n\u00b6\nWrite\nvalue\nto a keyed box. Creates the box if it does not exist\nget\n(\nkey\n:\nalgopy._TKey\n,\n*\n,\ndefault\n:\nalgopy._TValue\n)\n\u2192\nalgopy._TValue\n\u00b6\nRetrieve the contents of a keyed box, or return the default value if the box has not been\ncreated.\nParameters\n:\nkey\n\u2013 The key of the box to get\ndefault\n\u2013 The default value to return if the box has not been created.\nproperty\nkey_prefix\n:\nalgopy.Bytes\n\u00b6\nProvides access to the raw storage key-prefix\nlength\n(\nkey\n:\nalgopy._TKey\n)\n\u2192\nalgopy.UInt64\n\u00b6\nGet the length of an item in this BoxMap. Fails if the box does not exist\nParameters\n:\nkey\n\u2013 The key of the box to get\nmaybe\n(\nkey\n:\nalgopy._TKey\n)\n\u2192\ntuple\n[\nalgopy._TValue\n,\nbool\n]\n\u00b6\nRetrieve the contents of a keyed box if it exists, and return a boolean indicating if the\nbox exists.\nParameters\n:\nkey\n\u2013 The key of the box to get\nclass\nalgopy.\nBoxRef\n(\n\/\n,\n*\n,\nkey:\nbytes\n|\nstr\n|\nalgopy.Bytes\n|\nalgopy.String\n=\n...\n)\n\u00b6\nBoxRef abstracts the reading and writing of boxes containing raw binary data. The size is\nconfigured manually, and can be set to values larger than what the AVM can handle in a single\nvalue.\nInitialization\n__bool__\n(\n)\n\u2192\nbool\n\u00b6\nReturns True if the box has a value set, regardless of the truthiness of that value\ncreate\n(\n*\n,\nsize\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nbool\n\u00b6\nCreates a box with the specified size, setting all bits to zero. Fails if the box already\nexists with a different size. Fails if the specified size is greater than the max box size\n(32,768)\nReturns True if the box was created, False if the box already existed\ndelete\n(\n)\n\u2192\nbool\n\u00b6\nDeletes the box if it exists and returns a value indicating if the box existed\nextract\n(\nstart_index\n:\nalgopy.UInt64\n|\nint\n,\nlength\n:\nalgopy.UInt64\n|\nint\n,\n)\n\u2192\nalgopy.Bytes\n\u00b6\nExtract a slice of bytes from the box.\nFails if the box does not exist, or if\nstart_index\n+\nlength\n>\nlen(box)\nParameters\n:\nstart_index\n\u2013 The offset to start extracting bytes from\nlength\n\u2013 The number of bytes to extract\nget\n(\n*\n,\ndefault\n:\nalgopy.Bytes\n|\nbytes\n)\n\u2192\nalgopy.Bytes\n\u00b6\nRetrieve the contents of the box, or return the default value if the box has not been\ncreated.\nParameters\n:\ndefault\n\u2013 The default value to return if the box has not been created\nproperty\nkey\n:\nalgopy.Bytes\n\u00b6\nProvides access to the raw storage key\nproperty\nlength\n:\nalgopy.UInt64\n\u00b6\nGet the length of this Box. Fails if the box does not exist\nmaybe\n(\n)\n\u2192\ntuple\n[\nalgopy.Bytes\n,\nbool\n]\n\u00b6\nRetrieve the contents of the box if it exists, and return a boolean indicating if the box\nexists.\nput\n(\nvalue\n:\nalgopy.Bytes\n|\nbytes\n)\n\u2192\nNone\n\u00b6\nReplaces the contents of box with value. Fails if box exists and len(box) != len(value).\nCreates box if it does not exist\nParameters\n:\nvalue\n\u2013 The value to write to the box\nreplace\n(\nstart_index\n:\nalgopy.UInt64\n|\nint\n,\nvalue\n:\nalgopy.Bytes\n|\nbytes\n)\n\u2192\nNone\n\u00b6\nWrite\nvalue\nto the box starting at\nstart_index\n. Fails if the box does not exist,\nor if\nstart_index\n+\nlen(value)\n>\nlen(box)\nParameters\n:\nstart_index\n\u2013 The offset to start writing bytes from\nvalue\n\u2013 The bytes to be written\nresize\n(\nnew_size\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nNone\n\u00b6\nResizes the box the specified\nnew_size\n. Truncating existing data if the new value is\nshorter or padding with zero bytes if it is longer.\nParameters\n:\nnew_size\n\u2013 The new size of the box\nsplice\n(\nstart_index\n:\nalgopy.UInt64\n|\nint\n,\nlength\n:\nalgopy.UInt64\n|\nint\n,\nvalue\n:\nalgopy.Bytes\n|\nbytes\n,\n)\n\u2192\nNone\n\u00b6\nset box to contain its previous bytes up to index\nstart_index\n, followed by\nbytes\n,\nfollowed by the original bytes of the box that began at index\nstart_index\n+\nlength\nImportant: This op does not resize the box\nIf the new value is longer than the box size, it will be truncated.\nIf the new value is shorter than the box size, it will be padded with zero bytes\nParameters\n:\nstart_index\n\u2013 The index to start inserting\nvalue\nlength\n\u2013 The number of bytes after\nstart_index\nto omit from the new value\nvalue\n\u2013 The\nvalue\nto be inserted.\nclass\nalgopy.\nBytes\n(\nvalue\n:\nbytes\n=\nb''\n,\n\/\n)\n\u00b6\nA byte sequence, with a maximum length of 4096 bytes, one of the primary data types on the AVM\nInitialization\nBytes can be initialized with a Python bytes literal, or bytes variable\ndeclared at the module level\n__add__\n(\nother\n:\nalgopy.Bytes\n|\nbytes\n)\n\u2192\nalgopy.Bytes\n\u00b6\nConcatenate Bytes with another Bytes or bytes literal\ne.g.\nBytes(b\"Hello\n\")\n+\nb\"World\"\n.\n__and__\n(\nother\n:\nalgopy.Bytes\n|\nbytes\n)\n\u2192\nalgopy.Bytes\n\u00b6\nBytes can bitwise and with another Bytes or bytes e.g.\nBytes(b\"FF\")\n&\nb\"0F\")\n__bool__\n(\n)\n\u2192\nbool\n\u00b6\nReturns\nTrue\nif length of bytes is >0\n__contains__\n(\nother\n:\nalgopy.Bytes\n|\nbytes\n)\n\u2192\nbool\n\u00b6\nTest whether another Bytes is a substring of this one.\nNote this is expensive due to a lack of AVM support.\n__eq__\n(\nother\n:\nalgopy.Bytes\n|\nbytes\n)\n\u2192\nbool\n\u00b6\nBytes can be compared using the\n==\noperator with another Bytes or bytes\n__getitem__\n(\nindex\n:\nalgopy.UInt64\n|\nint\n|\nslice\n)\n\u2192\nalgopy.Bytes\n\u00b6\nReturns a Bytes containing a single byte if indexed with UInt64 or int\notherwise the substring o bytes described by the slice\n__iadd__\n(\nother\n:\nalgopy.Bytes\n|\nbytes\n)\n\u2192\nalgopy.Bytes\n\u00b6\nConcatenate Bytes with another Bytes or bytes literal\ne.g.\na\n+=\nBytes(b\"World\")\n.\n__iand__\n(\nother\n:\nalgopy.Bytes\n|\nbytes\n)\n\u2192\nalgopy.Bytes\n\u00b6\nBytes can bitwise and with another Bytes or bytes e.g.\na\n&=\nBytes(b\"0F\")\n__invert__\n(\n)\n\u2192\nalgopy.Bytes\n\u00b6\nBytes can be bitwise inverted e.g.\n~Bytes(b\"FF)\n__ior__\n(\nother\n:\nalgopy.Bytes\n|\nbytes\n)\n\u2192\nalgopy.Bytes\n\u00b6\nBytes can bitwise or with another Bytes or bytes e.g.\na\n|=\nBytes(b\"0F\")\n__iter__\n(\n)\n\u2192\ncollections.abc.Iterator\n[\nalgopy.Bytes\n]\n\u00b6\nBytes can be iterated, yielding each consecutive byte\n__ixor__\n(\nother\n:\nalgopy.Bytes\n|\nbytes\n)\n\u2192\nalgopy.Bytes\n\u00b6\nBytes can bitwise xor with another Bytes or bytes e.g.\na\n^=\nBytes(b\"0F\")\n__ne__\n(\nother\n:\nalgopy.Bytes\n|\nbytes\n)\n\u2192\nbool\n\u00b6\nBytes can be compared using the\n!=\noperator with another Bytes or bytes\n__or__\n(\nother\n:\nalgopy.Bytes\n|\nbytes\n)\n\u2192\nalgopy.Bytes\n\u00b6\nBytes can bitwise or with another Bytes or bytes e.g.\nBytes(b\"FF\")\n|\nb\"0F\")\n__radd__\n(\nother\n:\nalgopy.Bytes\n|\nbytes\n)\n\u2192\nalgopy.Bytes\n\u00b6\nConcatenate Bytes with another Bytes or bytes literal\ne.g.\nb\"Hello\n\"\n+\nBytes(b\"World\")\n.\n__reversed__\n(\n)\n\u2192\ncollections.abc.Iterator\n[\nalgopy.Bytes\n]\n\u00b6\nBytes can be iterated in reverse, yield each preceding byte starting at the end\n__xor__\n(\nother\n:\nalgopy.Bytes\n|\nbytes\n)\n\u2192\nalgopy.Bytes\n\u00b6\nBytes can bitwise xor with another Bytes or bytes e.g.\nBytes(b\"FF\")\n^\nb\"0F\")\nstatic\nfrom_base32\n(\nvalue\n:\nstr\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nCreates Bytes from a base32 encoded string e.g.\nBytes.from_base32(\"74======\")\nstatic\nfrom_base64\n(\nvalue\n:\nstr\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nCreates Bytes from a base64 encoded string e.g.\nBytes.from_base64(\"RkY=\")\nstatic\nfrom_hex\n(\nvalue\n:\nstr\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nCreates Bytes from a hex\/octal encoded string e.g.\nBytes.from_hex(\"FF\")\nproperty\nlength\n:\nalgopy.UInt64\n\u00b6\nReturns the length of the Bytes\nclass\nalgopy.\nBytesBacked\n\u00b6\nRepresents a type that is a single bytes value\nproperty\nbytes\n:\nalgopy.Bytes\n\u00b6\nGet the underlying Bytes\nclassmethod\nfrom_bytes\n(\nvalue\n:\nalgopy.Bytes\n|\nbytes\n,\n\/\n)\n\u2192\nSelf\n\u00b6\nConstruct an instance from the underlying bytes (no validation)\nclass\nalgopy.\nCompiledContract\n\u00b6\nProvides compiled programs and state allocation values for a Contract.\nCreate by calling\ncompile_contract\n.\napproval_program\n:\ntuple\n[\nalgopy.Bytes\n,\nalgopy.Bytes\n]\n\u00b6\nNone\nApproval program pages for a contract, after template variables have been replaced\nand compiled to AVM bytecode\nclear_state_program\n:\ntuple\n[\nalgopy.Bytes\n,\nalgopy.Bytes\n]\n\u00b6\nNone\nClear state program pages for a contract, after template variables have been replaced\nand compiled to AVM bytecode\nextra_program_pages\n:\nalgopy.UInt64\n\u00b6\nNone\nBy default, provides extra program pages required based on approval and clear state program\nsize, can be overridden when calling compile_contract\nglobal_bytes\n:\nalgopy.UInt64\n\u00b6\nNone\nBy default, provides global num bytes based on contract state totals, can be overridden\nwhen calling compile_contract\nglobal_uints\n:\nalgopy.UInt64\n\u00b6\nNone\nBy default, provides global num uints based on contract state totals, can be overridden\nwhen calling compile_contract\nlocal_bytes\n:\nalgopy.UInt64\n\u00b6\nNone\nBy default, provides local num bytes based on contract state totals, can be overridden\nwhen calling compile_contract\nlocal_uints\n:\nalgopy.UInt64\n\u00b6\nNone\nBy default, provides local num uints based on contract state totals, can be overridden\nwhen calling compile_contract\nclass\nalgopy.\nCompiledLogicSig\n\u00b6\nProvides account for a Logic Signature.\nCreate by calling\ncompile_logicsig\n.\naccount\n:\nalgopy.Account\n\u00b6\nNone\nAddress of a logic sig program, after template variables have been replaced and compiled\nto AVM bytecode\nclass\nalgopy.\nContract\n\u00b6\nBase class for an Algorand Smart Contract\nclassmethod\n__init_subclass__\n(\n*\n,\nname\n:\nstr\n=\n...\n,\nscratch_slots\n:\nalgopy.urange\n|\ntuple\n[\nint\n|\nalgopy.urange\n,\n...\n]\n|\nlist\n[\nint\n|\nalgopy.urange\n]\n=\n...\n,\nstate_totals\n:\nalgopy.StateTotals\n=\n...\n,\navm_version\n:\nint\n=\n...\n,\n)\n\u00b6\nWhen declaring a Contract subclass, options and configuration are passed in\nthe base class list:\nclass\nMyContract\n(\nalgopy\n.\nContract\n,\nname\n=\n\"CustomName\"\n):\n...\nParameters\n:\nname\n\u2013\nWill affect the output TEAL file name if there are multiple non-abstract contracts\nin the same file.\nIf the contract is a subclass of algopy.ARC4Contract,\nname\nwill also be used as the\ncontract name in the ARC-32 application.json, instead of the class name.\nscratch_slots\n\u2013\nAllows you to mark a slot ID or range of slot IDs as \u201coff limits\u201d to Puya.\nThese slot ID(s) will never be written to or otherwise manipulating by the compiler itself.\nThis is particularly useful in combination with\nalgopy.op.gload_bytes\n\/\nalgopy.op.gload_uint64\nwhich lets a contract in a group transaction read from the scratch slots of another contract\nthat occurs earlier in the transaction group.\nIn the case of inheritance, scratch slots reserved become cumulative. It is not an error\nto have overlapping ranges or values either, so if a base class contract reserves slots\n0-5 inclusive and the derived contract reserves 5-10 inclusive, then within the derived\ncontract all slots 0-10 will be marked as reserved.\nstate_totals\n\u2013\nAllows defining what values should be used for global and local uint and bytes storage\nvalues when creating a contract. Used when outputting ARC-32 application.json schemas.\nIf let unspecified, the totals will be determined by the compiler based on state\nvariables assigned to\nself\n.\nThis setting is not inherited, and only applies to the exact\nContract\nit is specified\non. If a base class does specify this setting, and a derived class does not, a warning\nwill be emitted for the derived class. To resolve this warning,\nstate_totals\nmust be\nspecified. Note that it is valid to not provide any arguments to the\nStateTotals\nconstructor, like so\nstate_totals=StateTotals()\n, in which case all values will be\nautomatically calculated.\navm_version\n\u2013 Determines which AVM version to use, this affects what operations are supported.\nDefaults to value provided supplied on command line (which defaults to current mainnet version)\nabstract\napproval_program\n(\n)\n\u2192\nalgopy.UInt64\n|\nbool\n\u00b6\nRepresents the program called for all transactions\nwhere\nOnCompletion\n!=\nClearState\nabstract\nclear_state_program\n(\n)\n\u2192\nalgopy.UInt64\n|\nbool\n\u00b6\nRepresents the program called when\nOnCompletion\n==\nClearState\nclass\nalgopy.\nGlobal\n\u00b6\nGet Global values\nNative TEAL op:\nglobal\nasset_create_min_balance\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nThe additional minimum balance required to create (and opt-in to) an asset.\nasset_opt_in_min_balance\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nThe additional minimum balance required to opt-in to an asset.\ncaller_application_address\n:\nFinal\n[\nalgopy.Account\n]\n\u00b6\nEllipsis\nThe application address of the application that called this application. ZeroAddress if this application is at the top-level. Application mode only.\ncaller_application_id\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nThe application ID of the application that called this application. 0 if this application is at the top-level. Application mode only.\ncreator_address\n:\nFinal\n[\nalgopy.Account\n]\n\u00b6\nEllipsis\nAddress of the creator of the current application. Application mode only.\ncurrent_application_address\n:\nFinal\n[\nalgopy.Account\n]\n\u00b6\nEllipsis\nAddress that the current application controls. Application mode only.\ncurrent_application_id\n:\nFinal\n[\nalgopy.Application\n]\n\u00b6\nEllipsis\nID of current application executing. Application mode only.\ngenesis_hash\n:\nFinal\n[\nalgopy.Bytes\n]\n\u00b6\nEllipsis\nThe Genesis Hash for the network.\ngroup_id\n:\nFinal\n[\nalgopy.Bytes\n]\n\u00b6\nEllipsis\nID of the transaction group. 32 zero bytes if the transaction is not part of a group.\ngroup_size\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nNumber of transactions in this atomic transaction group. At least 1\nlatest_timestamp\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nLast confirmed block UNIX timestamp. Fails if negative. Application mode only.\nlogic_sig_version\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nMaximum supported version\nmax_txn_life\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nrounds\nmin_balance\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nmicroalgos\nmin_txn_fee\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nmicroalgos\nstatic\nopcode_budget\n(\n)\n\u2192\nalgopy.UInt64\n\u00b6\nThe remaining cost that can be spent by opcodes in this program.\nNative TEAL opcode:\nglobal\npayouts_enabled\n:\nFinal\n[\nbool\n]\n\u00b6\nEllipsis\nWhether block proposal payouts are enabled.\nMin AVM version: 11\npayouts_go_online_fee\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nThe fee required in a keyreg transaction to make an account incentive eligible.\nMin AVM version: 11\npayouts_max_balance\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nThe maximum balance an account can have in the agreement round to receive block payouts in the proposal round.\nMin AVM version: 11\npayouts_min_balance\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nThe minimum balance an account must have in the agreement round to receive block payouts in the proposal round.\nMin AVM version: 11\npayouts_percent\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nThe percentage of transaction fees in a block that can be paid to the block proposer.\nMin AVM version: 11\nround\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nCurrent round number. Application mode only.\nzero_address\n:\nFinal\n[\nalgopy.Account\n]\n\u00b6\nEllipsis\n32 byte address of all zero bytes\nclass\nalgopy.\nGlobalState\n\u00b6\nGlobal state associated with the application, the key will be the name of the member, this\nis assigned to\nNote\nThe\nGlobalState\nclass provides a richer API that in addition to storing and retrieving\nvalues, can test if a value is set or unset it. However if this extra functionality is not\nneeded then it is simpler to just store the data without the GlobalState proxy\ne.g.\nself.some_variable\n=\nUInt64(0)\n__bool__\n(\n)\n\u2192\nbool\n\u00b6\nReturns\nTrue\nif the key has a value set, regardless of the truthiness of that value\nget\n(\ndefault\n:\nalgopy._TState\n)\n\u2192\nalgopy._TState\n\u00b6\nReturns the value or\ndefault\nif no value is set\nname\n=\nself\n.\nname\n.\nget\n(\nBytes\n(\nb\n\"no name\"\n)\nproperty\nkey\n:\nalgopy.Bytes\n\u00b6\nProvides access to the raw storage key\nmaybe\n(\n)\n\u2192\ntuple\n[\nalgopy._TState\n,\nbool\n]\n\u00b6\nReturns the value, and a bool\nname\n,\nname_exists\n=\nself\n.\nname\n.\nmaybe\n()\nif\nnot\nname_exists\n:\nname\n=\nBytes\n(\nb\n\"no name\"\n)\nproperty\nvalue\n:\nalgopy._TState\n\u00b6\nReturns the value or and error if the value is not set\nname\n=\nself\n.\nname\n.\nvalue\nclass\nalgopy.\nLocalState\n(\ntype_\n:\ntype\n[\nalgopy._TState\n]\n,\n\/\n,\n*\n,\nkey\n:\nalgopy.String\n|\nalgopy.Bytes\n|\nbytes\n|\nstr\n=\n...\n,\ndescription\n:\nstr\n=\n''\n,\n)\n\u00b6\nLocal state associated with the application and an account\nInitialization\nDeclare the local state key and it\u2019s associated type\nself\n.\nnames\n=\nLocalState\n(\nalgopy\n.\nBytes\n)\n__contains__\n(\naccount\n:\nalgopy.Account\n|\nalgopy.UInt64\n|\nint\n)\n\u2192\nbool\n\u00b6\nCan test if data exists by using an\nAccount\nreference or foreign account index\nassert\naccount\nin\nself\n.\nnames\n__delitem__\n(\naccount\n:\nalgopy.Account\n|\nalgopy.UInt64\n|\nint\n)\n\u2192\nNone\n\u00b6\nData can be removed by using an\nAccount\nreference or foreign account index\ndel\nself\n.\nnames\n[\naccount\n]\n__getitem__\n(\naccount\n:\nalgopy.Account\n|\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy._TState\n\u00b6\nData can be accessed by an\nAccount\nreference or foreign account index\naccount_name\n=\nself\n.\nnames\n[\naccount\n]\n__setitem__\n(\naccount\n:\nalgopy.Account\n|\nalgopy.UInt64\n|\nint\n,\nvalue\n:\nalgopy._TState\n,\n)\n\u2192\nNone\n\u00b6\nData can be stored by using an\nAccount\nreference or foreign account index\nself\n.\nnames\n[\naccount\n]\n=\naccount_name\nget\n(\naccount\n:\nalgopy.Account\n|\nalgopy.UInt64\n|\nint\n,\ndefault\n:\nalgopy._TState\n,\n)\n\u2192\nalgopy._TState\n\u00b6\nCan retrieve value using an\nAccount\nreference or foreign account index,\nand a fallback default value.\nname\n=\nself\n.\nnames\n.\nget\n(\naccount\n,\nBytes\n(\nb\n\"no name\"\n)\nproperty\nkey\n:\nalgopy.Bytes\n\u00b6\nProvides access to the raw storage key\nmaybe\n(\naccount\n:\nalgopy.Account\n|\nalgopy.UInt64\n|\nint\n,\n)\n\u2192\ntuple\n[\nalgopy._TState\n,\nbool\n]\n\u00b6\nCan retrieve value, and a bool indicating if the value was present\nusing an\nAccount\nreference or foreign account index.\nname\n,\nname_exists\n=\nself\n.\nnames\n.\nmaybe\n(\naccount\n)\nif\nnot\nname_exists\n:\nname\n=\nBytes\n(\nb\n\"no name\"\n)\nclass\nalgopy.\nLogicSig\n\u00b6\nA logic signature\nclass\nalgopy.\nOnCompleteAction\n(\nvalue\n:\nint\n=\n0\n,\n\/\n)\n\u00b6\nOn Completion actions available in an application call transaction\nInitialization\nA UInt64 can be initialized with a Python int literal, or an int variable\ndeclared at the module level\nClearState\n:\nalgopy.OnCompleteAction\n\u00b6\nEllipsis\nClearState is similar to CloseOut, but may never fail. This\nallows users to reclaim their minimum balance from an application\nthey no longer wish to opt in to.\nCloseOut\n:\nalgopy.OnCompleteAction\n\u00b6\nEllipsis\nCloseOut indicates that an application transaction will deallocate\nsome LocalState for the application from the user\u2019s account\nDeleteApplication\n:\nalgopy.OnCompleteAction\n\u00b6\nEllipsis\nDeleteApplication indicates that an application transaction will\ndelete the AppParams for the application from the creator\u2019s balance\nrecord\nNoOp\n:\nalgopy.OnCompleteAction\n\u00b6\nEllipsis\nNoOP indicates that no additional action is performed when the transaction completes\nOptIn\n:\nalgopy.OnCompleteAction\n\u00b6\nEllipsis\nOptIn indicates that an application transaction will allocate some\nLocalState for the application in the sender\u2019s account\nUpdateApplication\n:\nalgopy.OnCompleteAction\n\u00b6\nEllipsis\nUpdateApplication indicates that an application transaction will\nupdate the ApprovalProgram and ClearStateProgram for the application\n__add__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be added with another UInt64 or int e.g.\nUInt(4)\n+\n2\n.\nThis will error on overflow\n__and__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can bitwise and with another UInt64 or int e.g.\nUInt64(4)\n&\n2\n__bool__\n(\n)\n\u2192\nbool\n\u00b6\nA UInt64 will evaluate to\nFalse\nif zero, and\nTrue\notherwise\n__eq__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nbool\n\u00b6\nA UInt64 can use the\n==\noperator with another UInt64 or int\n__floordiv__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be floor divided with another UInt64 or int e.g.\nUInt64(4)\n\/\/\n2\n.\nThis will error on divide by zero\n__ge__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nbool\n\u00b6\nA UInt64 can use the\n>=\noperator with another UInt64 or int\n__gt__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nbool\n\u00b6\nA UInt64 can use the\n>\noperator with another UInt64 or int\n__iadd__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be incremented with another UInt64 or int e.g.\na\n+=\nUInt(2)\n.\nThis will error on overflow\n__iand__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can bitwise and with another UInt64 or int e.g.\na\n&=\nUInt64(2)\n__ifloordiv__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be floor divided with another UInt64 or int e.g.\na\n\/\/=\nUInt64(2)\n.\nThis will error on divide by zero\n__ilshift__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be left shifted by another UInt64 or int e.g.\na\n<<=\nUInt64(2)\n__imod__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be modded with another UInt64 or int e.g.\na\n%=\nUInt64(2)\n.\nThis will error on mod by zero\n__imul__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be multiplied with another UInt64 or int e.g.\na*=\nUInt64(2)\n.\nThis will error on overflow\n__index__\n(\n)\n\u2192\nint\n\u00b6\nA UInt64 can be used in indexing\/slice expressions\n__invert__\n(\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be bitwise inverted e.g.\n~UInt64(4)\n__ior__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can bitwise or with another UInt64 or int e.g.\na\n|=\nUInt64(2)\n__ipow__\n(\npower\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be raised to the power of another UInt64 or int e.g.\na\n**=\nUInt64(2)\n.\nThis will error on overflow\n__irshift__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be right shifted by another UInt64 or int e.g.\na\n>>=\nUInt64(2)\n__isub__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be subtracted with another UInt64 or int e.g.\na\n-=\nUInt64(2)\n.\nThis will error on underflow\n__ixor__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can bitwise xor with another UInt64 or int e.g.\na\n^=\nUInt64(2)\n__le__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nbool\n\u00b6\nA UInt64 can use the\n<=\noperator with another UInt64 or int\n__lshift__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be left shifted by another UInt64 or int e.g.\nUInt64(4)\n<<\n2\n__lt__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nbool\n\u00b6\nA UInt64 can use the\n<\noperator with another UInt64 or int\n__mod__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be modded with another UInt64 or int e.g.\nUInt64(4)\n%\n2\n.\nThis will error on mod by zero\n__mul__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be multiplied with another UInt64 or int e.g.\n4\n+\nUInt64(2)\n.\nThis will error on overflow\n__ne__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nbool\n\u00b6\nA UInt64 can use the\n!=\noperator with another UInt64 or int\n__or__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can bitwise or with another UInt64 or int e.g.\nUInt64(4)\n|\n2\n__pos__\n(\n)\n\u2192\nalgopy.UInt64\n\u00b6\nSupports unary + operator. Redundant given the type is unsigned\n__pow__\n(\npower\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be raised to the power of another UInt64 or int e.g.\nUInt64(4)\n**\n2\n.\nThis will error on overflow\n__radd__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be added with another UInt64 or int e.g.\n4\n+\nUInt64(2)\n.\nThis will error on overflow\n__rand__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can bitwise and with another UInt64 or int e.g.\n4\n&\nUInt64(2)\n__rfloordiv__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be floor divided with another UInt64 or int e.g.\n4\n\/\/\nUInt64(2)\n.\nThis will error on divide by zero\n__rlshift__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be left shifted by another UInt64 or int e.g.\n4\n<<\nUInt64(2)\n__rmod__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be modded with another UInt64 or int e.g.\n4\n%\nUInt64(2)\n.\nThis will error on mod by zero\n__rmul__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be multiplied with another UInt64 or int e.g.\nUInt64(4)\n+\n2\n.\nThis will error on overflow\n__ror__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can bitwise or with another UInt64 or int e.g.\n4\n|\nUInt64(2)\n__rpow__\n(\npower\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be raised to the power of another UInt64 or int e.g.\n4\n**\nUInt64(2)\n.\nThis will error on overflow\n__rrshift__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be right shifted by another UInt64 or int e.g.\n4\n>>\nUInt64(2)\n__rshift__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be right shifted by another UInt64 or int e.g.\nUInt64(4)\n>>\n2\n__rsub__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be subtracted with another UInt64 or int e.g.\n4\n-\nUInt64(2)\n.\nThis will error on underflow\n__rxor__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can bitwise xor with another UInt64 or int e.g.\n4\n^\nUInt64(2)\n__sub__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be subtracted with another UInt64 or int e.g.\nUInt(4)\n-\n2\n.\nThis will error on underflow\n__xor__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can bitwise xor with another UInt64 or int e.g.\nUInt64(4)\n^\n2\nclass\nalgopy.\nOpUpFeeSource\n(\nvalue\n:\nint\n=\n0\n,\n\/\n)\n\u00b6\nDefines the source of fees for the OpUp utility.\nInitialization\nA UInt64 can be initialized with a Python int literal, or an int variable\ndeclared at the module level\nAny\n:\nalgopy.OpUpFeeSource\n\u00b6\nEllipsis\nFirst the excess will be used, remaining fees will be taken from the app account\nAppAccount\n:\nalgopy.OpUpFeeSource\n\u00b6\nEllipsis\nThe app\u2019s account will cover all fees (set inner_tx.fee=Global.min_tx_fee())\nGroupCredit\n:\nalgopy.OpUpFeeSource\n\u00b6\nEllipsis\nOnly the excess fee (credit) on the outer group should be used (set inner_tx.fee=0)\n__add__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be added with another UInt64 or int e.g.\nUInt(4)\n+\n2\n.\nThis will error on overflow\n__and__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can bitwise and with another UInt64 or int e.g.\nUInt64(4)\n&\n2\n__bool__\n(\n)\n\u2192\nbool\n\u00b6\nA UInt64 will evaluate to\nFalse\nif zero, and\nTrue\notherwise\n__eq__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nbool\n\u00b6\nA UInt64 can use the\n==\noperator with another UInt64 or int\n__floordiv__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be floor divided with another UInt64 or int e.g.\nUInt64(4)\n\/\/\n2\n.\nThis will error on divide by zero\n__ge__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nbool\n\u00b6\nA UInt64 can use the\n>=\noperator with another UInt64 or int\n__gt__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nbool\n\u00b6\nA UInt64 can use the\n>\noperator with another UInt64 or int\n__iadd__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be incremented with another UInt64 or int e.g.\na\n+=\nUInt(2)\n.\nThis will error on overflow\n__iand__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can bitwise and with another UInt64 or int e.g.\na\n&=\nUInt64(2)\n__ifloordiv__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be floor divided with another UInt64 or int e.g.\na\n\/\/=\nUInt64(2)\n.\nThis will error on divide by zero\n__ilshift__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be left shifted by another UInt64 or int e.g.\na\n<<=\nUInt64(2)\n__imod__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be modded with another UInt64 or int e.g.\na\n%=\nUInt64(2)\n.\nThis will error on mod by zero\n__imul__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be multiplied with another UInt64 or int e.g.\na*=\nUInt64(2)\n.\nThis will error on overflow\n__index__\n(\n)\n\u2192\nint\n\u00b6\nA UInt64 can be used in indexing\/slice expressions\n__invert__\n(\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be bitwise inverted e.g.\n~UInt64(4)\n__ior__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can bitwise or with another UInt64 or int e.g.\na\n|=\nUInt64(2)\n__ipow__\n(\npower\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be raised to the power of another UInt64 or int e.g.\na\n**=\nUInt64(2)\n.\nThis will error on overflow\n__irshift__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be right shifted by another UInt64 or int e.g.\na\n>>=\nUInt64(2)\n__isub__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be subtracted with another UInt64 or int e.g.\na\n-=\nUInt64(2)\n.\nThis will error on underflow\n__ixor__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can bitwise xor with another UInt64 or int e.g.\na\n^=\nUInt64(2)\n__le__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nbool\n\u00b6\nA UInt64 can use the\n<=\noperator with another UInt64 or int\n__lshift__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be left shifted by another UInt64 or int e.g.\nUInt64(4)\n<<\n2\n__lt__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nbool\n\u00b6\nA UInt64 can use the\n<\noperator with another UInt64 or int\n__mod__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be modded with another UInt64 or int e.g.\nUInt64(4)\n%\n2\n.\nThis will error on mod by zero\n__mul__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be multiplied with another UInt64 or int e.g.\n4\n+\nUInt64(2)\n.\nThis will error on overflow\n__ne__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nbool\n\u00b6\nA UInt64 can use the\n!=\noperator with another UInt64 or int\n__or__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can bitwise or with another UInt64 or int e.g.\nUInt64(4)\n|\n2\n__pos__\n(\n)\n\u2192\nalgopy.UInt64\n\u00b6\nSupports unary + operator. Redundant given the type is unsigned\n__pow__\n(\npower\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be raised to the power of another UInt64 or int e.g.\nUInt64(4)\n**\n2\n.\nThis will error on overflow\n__radd__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be added with another UInt64 or int e.g.\n4\n+\nUInt64(2)\n.\nThis will error on overflow\n__rand__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can bitwise and with another UInt64 or int e.g.\n4\n&\nUInt64(2)\n__rfloordiv__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be floor divided with another UInt64 or int e.g.\n4\n\/\/\nUInt64(2)\n.\nThis will error on divide by zero\n__rlshift__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be left shifted by another UInt64 or int e.g.\n4\n<<\nUInt64(2)\n__rmod__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be modded with another UInt64 or int e.g.\n4\n%\nUInt64(2)\n.\nThis will error on mod by zero\n__rmul__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be multiplied with another UInt64 or int e.g.\nUInt64(4)\n+\n2\n.\nThis will error on overflow\n__ror__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can bitwise or with another UInt64 or int e.g.\n4\n|\nUInt64(2)\n__rpow__\n(\npower\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be raised to the power of another UInt64 or int e.g.\n4\n**\nUInt64(2)\n.\nThis will error on overflow\n__rrshift__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be right shifted by another UInt64 or int e.g.\n4\n>>\nUInt64(2)\n__rshift__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be right shifted by another UInt64 or int e.g.\nUInt64(4)\n>>\n2\n__rsub__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be subtracted with another UInt64 or int e.g.\n4\n-\nUInt64(2)\n.\nThis will error on underflow\n__rxor__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can bitwise xor with another UInt64 or int e.g.\n4\n^\nUInt64(2)\n__sub__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be subtracted with another UInt64 or int e.g.\nUInt(4)\n-\n2\n.\nThis will error on underflow\n__xor__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can bitwise xor with another UInt64 or int e.g.\nUInt64(4)\n^\n2\nclass\nalgopy.\nStateTotals\n(\n*\n,\nglobal_uints\n:\nint\n=\n...\n,\nglobal_bytes\n:\nint\n=\n...\n,\nlocal_uints\n:\nint\n=\n...\n,\nlocal_bytes\n:\nint\n=\n...\n,\n)\n\u00b6\nOptions class to manually define the total amount of global and local state contract will use,\nused by\nContract.__init_subclass__\n.\nThis is not required when all state is assigned to\nself.\n, but is required if a\ncontract dynamically interacts with state via\nAppGlobal.get_bytes\netc, or if you want\nto reserve additional state storage for future contract updates, since the Algorand protocol\ndoesn\u2019t allow increasing them after creation.\nInitialization\nSpecify the totals for both global and local, and for each type. Any arguments not\nspecified default to their automatically calculated values.\nValues are validated against the known totals assigned through\nself.\n, a warning is\nproduced if the total specified is insufficient to accommodate all\nself.\nstate values\nat once.\nclass\nalgopy.\nString\n(\nvalue\n:\nstr\n=\n''\n,\n\/\n)\n\u00b6\nA UTF-8 encoded string.\nIn comparison to\narc4.String\n, this type does not store the array length prefix, since that\ninformation is always available through the\nlen\nAVM op. This makes it more efficient to\noperate on when doing operations such as concatenation.\nNote that due to the lack of UTF-8 support in the AVM, indexing and length operations are not\ncurrently supported.\nInitialization\nA String can be initialized with a Python\nstr\nliteral, or a\nstr\nvariable\ndeclared at the module level\n__add__\n(\nother\n:\nalgopy.String\n|\nstr\n)\n\u2192\nalgopy.String\n\u00b6\nConcatenate\nString\nwith another\nString\nor\nstr\nliteral\ne.g.\nString(\"Hello\n\")\n+\n\"World\"\n.\n__bool__\n(\n)\n\u2192\nbool\n\u00b6\nReturns\nTrue\nif the string is not empty\n__contains__\n(\nother\n:\nalgopy.String\n|\nstr\n)\n\u2192\nbool\n\u00b6\nTest whether another string is a substring of this one.\nNote this is expensive due to a lack of AVM support.\n__eq__\n(\nother\n:\nalgopy.String\n|\nstr\n)\n\u2192\nbool\n\u00b6\nSupports using the\n==\noperator with another\nString\nor literal\nstr\n__iadd__\n(\nother\n:\nalgopy.String\n|\nstr\n)\n\u2192\nalgopy.String\n\u00b6\nConcatenate\nString\nwith another\nString\nor\nstr\nliteral\ne.g.\na\n=\nString(\"Hello\");\na\n+=\n\"World\"\n.\n__ne__\n(\nother\n:\nalgopy.String\n|\nstr\n)\n\u2192\nbool\n\u00b6\nSupports using the\n!=\noperator with another\nString\nor literal\nstr\n__radd__\n(\nother\n:\nalgopy.String\n|\nstr\n)\n\u2192\nalgopy.String\n\u00b6\nConcatenate String with another\nString\nor\nstr\nliteral\ne.g.\n\"Hello\n\"\n+\nString(\"World\")\n.\nproperty\nbytes\n:\nalgopy.Bytes\n\u00b6\nGet the underlying Bytes\nendswith\n(\nsuffix\n:\nalgopy.String\n|\nstr\n)\n\u2192\nbool\n\u00b6\nCheck if this string ends with another string.\nThe behaviour should mirror\nstr.endswith\n, for example, if\nsuffix\nis the empty string,\nthe result will always be\nTrue\n.\nOnly a single argument is currently supported.\nclassmethod\nfrom_bytes\n(\nvalue\n:\nalgopy.Bytes\n|\nbytes\n,\n\/\n)\n\u2192\nSelf\n\u00b6\nConstruct an instance from the underlying bytes (no validation)\njoin\n(\nothers\n:\ntuple\n[\nalgopy.String\n|\nstr\n,\n...\n]\n,\n\/\n)\n\u2192\nalgopy.String\n\u00b6\nJoin a sequence of Strings with a common separator.\nThe behaviour should mirror\nstr.join\n.\nstartswith\n(\nprefix\n:\nalgopy.String\n|\nstr\n)\n\u2192\nbool\n\u00b6\nCheck if this string starts with another string.\nThe behaviour should mirror\nstr.startswith\n, for example, if\nprefix\nis the empty string,\nthe result will always be\nTrue\n.\nOnly a single argument is currently supported.\nalgopy.\nTemplateVar\n:\nalgopy._TemplateVarGeneric\n\u00b6\nEllipsis\nTemplate variables can be used to represent a placeholder for a deploy-time provided value.\nclass\nalgopy.\nTransactionType\n(\nvalue\n:\nint\n=\n0\n,\n\/\n)\n\u00b6\nThe different transaction types available in a transaction\nInitialization\nA UInt64 can be initialized with a Python int literal, or an int variable\ndeclared at the module level\nApplicationCall\n:\nalgopy.TransactionType\n\u00b6\nEllipsis\nAn Application Call transaction\nAssetConfig\n:\nalgopy.TransactionType\n\u00b6\nEllipsis\nAn Asset Config transaction\nAssetFreeze\n:\nalgopy.TransactionType\n\u00b6\nEllipsis\nAn Asset Freeze transaction\nAssetTransfer\n:\nalgopy.TransactionType\n\u00b6\nEllipsis\nAn Asset Transfer transaction\nKeyRegistration\n:\nalgopy.TransactionType\n\u00b6\nEllipsis\nA Key Registration transaction\nPayment\n:\nalgopy.TransactionType\n\u00b6\nEllipsis\nA Payment transaction\n__add__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be added with another UInt64 or int e.g.\nUInt(4)\n+\n2\n.\nThis will error on overflow\n__and__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can bitwise and with another UInt64 or int e.g.\nUInt64(4)\n&\n2\n__bool__\n(\n)\n\u2192\nbool\n\u00b6\nA UInt64 will evaluate to\nFalse\nif zero, and\nTrue\notherwise\n__eq__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nbool\n\u00b6\nA UInt64 can use the\n==\noperator with another UInt64 or int\n__floordiv__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be floor divided with another UInt64 or int e.g.\nUInt64(4)\n\/\/\n2\n.\nThis will error on divide by zero\n__ge__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nbool\n\u00b6\nA UInt64 can use the\n>=\noperator with another UInt64 or int\n__gt__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nbool\n\u00b6\nA UInt64 can use the\n>\noperator with another UInt64 or int\n__iadd__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be incremented with another UInt64 or int e.g.\na\n+=\nUInt(2)\n.\nThis will error on overflow\n__iand__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can bitwise and with another UInt64 or int e.g.\na\n&=\nUInt64(2)\n__ifloordiv__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be floor divided with another UInt64 or int e.g.\na\n\/\/=\nUInt64(2)\n.\nThis will error on divide by zero\n__ilshift__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be left shifted by another UInt64 or int e.g.\na\n<<=\nUInt64(2)\n__imod__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be modded with another UInt64 or int e.g.\na\n%=\nUInt64(2)\n.\nThis will error on mod by zero\n__imul__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be multiplied with another UInt64 or int e.g.\na*=\nUInt64(2)\n.\nThis will error on overflow\n__index__\n(\n)\n\u2192\nint\n\u00b6\nA UInt64 can be used in indexing\/slice expressions\n__invert__\n(\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be bitwise inverted e.g.\n~UInt64(4)\n__ior__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can bitwise or with another UInt64 or int e.g.\na\n|=\nUInt64(2)\n__ipow__\n(\npower\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be raised to the power of another UInt64 or int e.g.\na\n**=\nUInt64(2)\n.\nThis will error on overflow\n__irshift__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be right shifted by another UInt64 or int e.g.\na\n>>=\nUInt64(2)\n__isub__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be subtracted with another UInt64 or int e.g.\na\n-=\nUInt64(2)\n.\nThis will error on underflow\n__ixor__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can bitwise xor with another UInt64 or int e.g.\na\n^=\nUInt64(2)\n__le__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nbool\n\u00b6\nA UInt64 can use the\n<=\noperator with another UInt64 or int\n__lshift__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be left shifted by another UInt64 or int e.g.\nUInt64(4)\n<<\n2\n__lt__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nbool\n\u00b6\nA UInt64 can use the\n<\noperator with another UInt64 or int\n__mod__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be modded with another UInt64 or int e.g.\nUInt64(4)\n%\n2\n.\nThis will error on mod by zero\n__mul__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be multiplied with another UInt64 or int e.g.\n4\n+\nUInt64(2)\n.\nThis will error on overflow\n__ne__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nbool\n\u00b6\nA UInt64 can use the\n!=\noperator with another UInt64 or int\n__or__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can bitwise or with another UInt64 or int e.g.\nUInt64(4)\n|\n2\n__pos__\n(\n)\n\u2192\nalgopy.UInt64\n\u00b6\nSupports unary + operator. Redundant given the type is unsigned\n__pow__\n(\npower\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be raised to the power of another UInt64 or int e.g.\nUInt64(4)\n**\n2\n.\nThis will error on overflow\n__radd__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be added with another UInt64 or int e.g.\n4\n+\nUInt64(2)\n.\nThis will error on overflow\n__rand__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can bitwise and with another UInt64 or int e.g.\n4\n&\nUInt64(2)\n__rfloordiv__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be floor divided with another UInt64 or int e.g.\n4\n\/\/\nUInt64(2)\n.\nThis will error on divide by zero\n__rlshift__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be left shifted by another UInt64 or int e.g.\n4\n<<\nUInt64(2)\n__rmod__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be modded with another UInt64 or int e.g.\n4\n%\nUInt64(2)\n.\nThis will error on mod by zero\n__rmul__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be multiplied with another UInt64 or int e.g.\nUInt64(4)\n+\n2\n.\nThis will error on overflow\n__ror__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can bitwise or with another UInt64 or int e.g.\n4\n|\nUInt64(2)\n__rpow__\n(\npower\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be raised to the power of another UInt64 or int e.g.\n4\n**\nUInt64(2)\n.\nThis will error on overflow\n__rrshift__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be right shifted by another UInt64 or int e.g.\n4\n>>\nUInt64(2)\n__rshift__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be right shifted by another UInt64 or int e.g.\nUInt64(4)\n>>\n2\n__rsub__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be subtracted with another UInt64 or int e.g.\n4\n-\nUInt64(2)\n.\nThis will error on underflow\n__rxor__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can bitwise xor with another UInt64 or int e.g.\n4\n^\nUInt64(2)\n__sub__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be subtracted with another UInt64 or int e.g.\nUInt(4)\n-\n2\n.\nThis will error on underflow\n__xor__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can bitwise xor with another UInt64 or int e.g.\nUInt64(4)\n^\n2\nclass\nalgopy.\nTxn\n\u00b6\nGet values for the current executing transaction\nNative TEAL ops:\ntxn\n,\ntxnas\nstatic\naccounts\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Account\n\u00b6\nAccounts listed in the ApplicationCall transaction\nNative TEAL opcode:\ntxna\n,\ntxnas\namount\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nmicroalgos\nstatic\napplication_args\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nArguments passed to the application in the ApplicationCall transaction\nNative TEAL opcode:\ntxna\n,\ntxnas\napplication_id\n:\nFinal\n[\nalgopy.Application\n]\n\u00b6\nEllipsis\nApplicationID from ApplicationCall transaction\nstatic\napplications\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Application\n\u00b6\nForeign Apps listed in the ApplicationCall transaction\nNative TEAL opcode:\ntxna\n,\ntxnas\napproval_program\n:\nFinal\n[\nalgopy.Bytes\n]\n\u00b6\nEllipsis\nApproval program\nstatic\napproval_program_pages\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nApproval Program as an array of pages\nNative TEAL opcode:\ntxna\n,\ntxnas\nasset_amount\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nvalue in Asset\u2019s units\nasset_close_to\n:\nFinal\n[\nalgopy.Account\n]\n\u00b6\nEllipsis\n32 byte address\nasset_receiver\n:\nFinal\n[\nalgopy.Account\n]\n\u00b6\nEllipsis\n32 byte address\nasset_sender\n:\nFinal\n[\nalgopy.Account\n]\n\u00b6\nEllipsis\n32 byte address. Source of assets if Sender is the Asset\u2019s Clawback address.\nstatic\nassets\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Asset\n\u00b6\nForeign Assets listed in the ApplicationCall transaction\nNative TEAL opcode:\ntxna\n,\ntxnas\nclear_state_program\n:\nFinal\n[\nalgopy.Bytes\n]\n\u00b6\nEllipsis\nClear state program\nstatic\nclear_state_program_pages\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nClearState Program as an array of pages\nNative TEAL opcode:\ntxna\n,\ntxnas\nclose_remainder_to\n:\nFinal\n[\nalgopy.Account\n]\n\u00b6\nEllipsis\n32 byte address\nconfig_asset\n:\nFinal\n[\nalgopy.Asset\n]\n\u00b6\nEllipsis\nAsset ID in asset config transaction\nconfig_asset_clawback\n:\nFinal\n[\nalgopy.Account\n]\n\u00b6\nEllipsis\n32 byte address\nconfig_asset_decimals\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nNumber of digits to display after the decimal place when displaying the asset\nconfig_asset_default_frozen\n:\nFinal\n[\nbool\n]\n\u00b6\nEllipsis\nWhether the asset\u2019s slots are frozen by default or not, 0 or 1\nconfig_asset_freeze\n:\nFinal\n[\nalgopy.Account\n]\n\u00b6\nEllipsis\n32 byte address\nconfig_asset_manager\n:\nFinal\n[\nalgopy.Account\n]\n\u00b6\nEllipsis\n32 byte address\nconfig_asset_metadata_hash\n:\nFinal\n[\nalgopy.Bytes\n]\n\u00b6\nEllipsis\n32 byte commitment to unspecified asset metadata\nconfig_asset_name\n:\nFinal\n[\nalgopy.Bytes\n]\n\u00b6\nEllipsis\nThe asset name\nconfig_asset_reserve\n:\nFinal\n[\nalgopy.Account\n]\n\u00b6\nEllipsis\n32 byte address\nconfig_asset_total\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nTotal number of units of this asset created\nconfig_asset_unit_name\n:\nFinal\n[\nalgopy.Bytes\n]\n\u00b6\nEllipsis\nUnit name of the asset\nconfig_asset_url\n:\nFinal\n[\nalgopy.Bytes\n]\n\u00b6\nEllipsis\nURL\ncreated_application_id\n:\nFinal\n[\nalgopy.Application\n]\n\u00b6\nEllipsis\nApplicationID allocated by the creation of an application (only with\nitxn\nin v5). Application mode only\ncreated_asset_id\n:\nFinal\n[\nalgopy.Asset\n]\n\u00b6\nEllipsis\nAsset ID allocated by the creation of an ASA (only with\nitxn\nin v5). Application mode only\nextra_program_pages\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nNumber of additional pages for each of the application\u2019s approval and clear state programs. An ExtraProgramPages of 1 means 2048 more total bytes, or 1024 for each program.\nfee\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nmicroalgos\nfirst_valid\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nround number\nfirst_valid_time\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nUNIX timestamp of block before txn.FirstValid. Fails if negative\nfreeze_asset\n:\nFinal\n[\nalgopy.Asset\n]\n\u00b6\nEllipsis\nAsset ID being frozen or un-frozen\nfreeze_asset_account\n:\nFinal\n[\nalgopy.Account\n]\n\u00b6\nEllipsis\n32 byte address of the account whose asset slot is being frozen or un-frozen\nfreeze_asset_frozen\n:\nFinal\n[\nbool\n]\n\u00b6\nEllipsis\nThe new frozen value, 0 or 1\nglobal_num_byte_slice\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nNumber of global state byteslices in ApplicationCall\nglobal_num_uint\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nNumber of global state integers in ApplicationCall\ngroup_index\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nPosition of this transaction within an atomic transaction group. A stand-alone transaction is implicitly element 0 in a group of 1\nlast_log\n:\nFinal\n[\nalgopy.Bytes\n]\n\u00b6\nEllipsis\nThe last message emitted. Empty bytes if none were emitted. Application mode only\nlast_valid\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nround number\nlease\n:\nFinal\n[\nalgopy.Bytes\n]\n\u00b6\nEllipsis\n32 byte lease value\nlocal_num_byte_slice\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nNumber of local state byteslices in ApplicationCall\nlocal_num_uint\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nNumber of local state integers in ApplicationCall\nstatic\nlogs\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nLog messages emitted by an application call (only with\nitxn\nin v5). Application mode only\nNative TEAL opcode:\ntxna\n,\ntxnas\nnonparticipation\n:\nFinal\n[\nbool\n]\n\u00b6\nEllipsis\nMarks an account nonparticipating for rewards\nnote\n:\nFinal\n[\nalgopy.Bytes\n]\n\u00b6\nEllipsis\nAny data up to 1024 bytes\nnum_accounts\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nNumber of Accounts\nnum_app_args\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nNumber of ApplicationArgs\nnum_applications\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nNumber of Applications\nnum_approval_program_pages\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nNumber of Approval Program pages\nnum_assets\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nNumber of Assets\nnum_clear_state_program_pages\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nNumber of ClearState Program pages\nnum_logs\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nNumber of Logs (only with\nitxn\nin v5). Application mode only\non_completion\n:\nFinal\n[\nalgopy.OnCompleteAction\n]\n\u00b6\nEllipsis\nApplicationCall transaction on completion action\nreceiver\n:\nFinal\n[\nalgopy.Account\n]\n\u00b6\nEllipsis\n32 byte address\nrekey_to\n:\nFinal\n[\nalgopy.Account\n]\n\u00b6\nEllipsis\n32 byte Sender\u2019s new AuthAddr\nselection_pk\n:\nFinal\n[\nalgopy.Bytes\n]\n\u00b6\nEllipsis\n32 byte address\nsender\n:\nFinal\n[\nalgopy.Account\n]\n\u00b6\nEllipsis\n32 byte address\nstate_proof_pk\n:\nFinal\n[\nalgopy.Bytes\n]\n\u00b6\nEllipsis\n64 byte state proof public key\ntx_id\n:\nFinal\n[\nalgopy.Bytes\n]\n\u00b6\nEllipsis\nThe computed ID for this transaction. 32 bytes.\ntype\n:\nFinal\n[\nalgopy.Bytes\n]\n\u00b6\nEllipsis\nTransaction type as bytes\ntype_enum\n:\nFinal\n[\nalgopy.TransactionType\n]\n\u00b6\nEllipsis\nTransaction type as integer\nvote_first\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nThe first round that the participation key is valid.\nvote_key_dilution\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nDilution for the 2-level participation key\nvote_last\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nThe last round that the participation key is valid.\nvote_pk\n:\nFinal\n[\nalgopy.Bytes\n]\n\u00b6\nEllipsis\n32 byte address\nxfer_asset\n:\nFinal\n[\nalgopy.Asset\n]\n\u00b6\nEllipsis\nAsset ID\nclass\nalgopy.\nUInt64\n(\nvalue\n:\nint\n=\n0\n,\n\/\n)\n\u00b6\nA 64-bit unsigned integer, one of the primary data types on the AVM\nInitialization\nA UInt64 can be initialized with a Python int literal, or an int variable\ndeclared at the module level\n__add__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be added with another UInt64 or int e.g.\nUInt(4)\n+\n2\n.\nThis will error on overflow\n__and__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can bitwise and with another UInt64 or int e.g.\nUInt64(4)\n&\n2\n__bool__\n(\n)\n\u2192\nbool\n\u00b6\nA UInt64 will evaluate to\nFalse\nif zero, and\nTrue\notherwise\n__eq__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nbool\n\u00b6\nA UInt64 can use the\n==\noperator with another UInt64 or int\n__floordiv__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be floor divided with another UInt64 or int e.g.\nUInt64(4)\n\/\/\n2\n.\nThis will error on divide by zero\n__ge__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nbool\n\u00b6\nA UInt64 can use the\n>=\noperator with another UInt64 or int\n__gt__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nbool\n\u00b6\nA UInt64 can use the\n>\noperator with another UInt64 or int\n__iadd__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be incremented with another UInt64 or int e.g.\na\n+=\nUInt(2)\n.\nThis will error on overflow\n__iand__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can bitwise and with another UInt64 or int e.g.\na\n&=\nUInt64(2)\n__ifloordiv__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be floor divided with another UInt64 or int e.g.\na\n\/\/=\nUInt64(2)\n.\nThis will error on divide by zero\n__ilshift__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be left shifted by another UInt64 or int e.g.\na\n<<=\nUInt64(2)\n__imod__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be modded with another UInt64 or int e.g.\na\n%=\nUInt64(2)\n.\nThis will error on mod by zero\n__imul__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be multiplied with another UInt64 or int e.g.\na*=\nUInt64(2)\n.\nThis will error on overflow\n__index__\n(\n)\n\u2192\nint\n\u00b6\nA UInt64 can be used in indexing\/slice expressions\n__invert__\n(\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be bitwise inverted e.g.\n~UInt64(4)\n__ior__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can bitwise or with another UInt64 or int e.g.\na\n|=\nUInt64(2)\n__ipow__\n(\npower\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be raised to the power of another UInt64 or int e.g.\na\n**=\nUInt64(2)\n.\nThis will error on overflow\n__irshift__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be right shifted by another UInt64 or int e.g.\na\n>>=\nUInt64(2)\n__isub__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be subtracted with another UInt64 or int e.g.\na\n-=\nUInt64(2)\n.\nThis will error on underflow\n__ixor__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can bitwise xor with another UInt64 or int e.g.\na\n^=\nUInt64(2)\n__le__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nbool\n\u00b6\nA UInt64 can use the\n<=\noperator with another UInt64 or int\n__lshift__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be left shifted by another UInt64 or int e.g.\nUInt64(4)\n<<\n2\n__lt__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nbool\n\u00b6\nA UInt64 can use the\n<\noperator with another UInt64 or int\n__mod__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be modded with another UInt64 or int e.g.\nUInt64(4)\n%\n2\n.\nThis will error on mod by zero\n__mul__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be multiplied with another UInt64 or int e.g.\n4\n+\nUInt64(2)\n.\nThis will error on overflow\n__ne__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nbool\n\u00b6\nA UInt64 can use the\n!=\noperator with another UInt64 or int\n__or__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can bitwise or with another UInt64 or int e.g.\nUInt64(4)\n|\n2\n__pos__\n(\n)\n\u2192\nalgopy.UInt64\n\u00b6\nSupports unary + operator. Redundant given the type is unsigned\n__pow__\n(\npower\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be raised to the power of another UInt64 or int e.g.\nUInt64(4)\n**\n2\n.\nThis will error on overflow\n__radd__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be added with another UInt64 or int e.g.\n4\n+\nUInt64(2)\n.\nThis will error on overflow\n__rand__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can bitwise and with another UInt64 or int e.g.\n4\n&\nUInt64(2)\n__rfloordiv__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be floor divided with another UInt64 or int e.g.\n4\n\/\/\nUInt64(2)\n.\nThis will error on divide by zero\n__rlshift__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be left shifted by another UInt64 or int e.g.\n4\n<<\nUInt64(2)\n__rmod__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be modded with another UInt64 or int e.g.\n4\n%\nUInt64(2)\n.\nThis will error on mod by zero\n__rmul__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be multiplied with another UInt64 or int e.g.\nUInt64(4)\n+\n2\n.\nThis will error on overflow\n__ror__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can bitwise or with another UInt64 or int e.g.\n4\n|\nUInt64(2)\n__rpow__\n(\npower\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be raised to the power of another UInt64 or int e.g.\n4\n**\nUInt64(2)\n.\nThis will error on overflow\n__rrshift__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be right shifted by another UInt64 or int e.g.\n4\n>>\nUInt64(2)\n__rshift__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be right shifted by another UInt64 or int e.g.\nUInt64(4)\n>>\n2\n__rsub__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be subtracted with another UInt64 or int e.g.\n4\n-\nUInt64(2)\n.\nThis will error on underflow\n__rxor__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can bitwise xor with another UInt64 or int e.g.\n4\n^\nUInt64(2)\n__sub__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can be subtracted with another UInt64 or int e.g.\nUInt(4)\n-\n2\n.\nThis will error on underflow\n__xor__\n(\nother\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA UInt64 can bitwise xor with another UInt64 or int e.g.\nUInt64(4)\n^\n2\nalgopy.\ncompile_contract\n(\ncontract\n:\ntype\n[\nContract\n]\n,\n\/\n,\n*\n,\nextra_program_pages\n:\nalgopy.UInt64\n|\nint\n=\n...\n,\nglobal_uints\n:\nalgopy.UInt64\n|\nint\n=\n...\n,\nglobal_bytes\n:\nalgopy.UInt64\n|\nint\n=\n...\n,\nlocal_uints\n:\nalgopy.UInt64\n|\nint\n=\n...\n,\nlocal_bytes\n:\nalgopy.UInt64\n|\nint\n=\n...\n,\ntemplate_vars\n:\ncollections.abc.Mapping\n[\nstr\n,\nobject\n]\n=\n...\n,\ntemplate_vars_prefix\n:\nstr\n=\n...\n,\n)\n\u2192\nalgopy.CompiledContract\n\u00b6\nReturns the compiled data for the specified contract\nParameters\n:\ncontract\n\u2013 Algorand Python Contract to compile\nextra_program_pages\n\u2013 Number of extra program pages, defaults to minimum required for contract\nglobal_uints\n\u2013 Number of global uint64s, defaults to value defined for contract\nglobal_bytes\n\u2013 Number of global bytes, defaults to value defined for contract\nlocal_uints\n\u2013 Number of local uint64s, defaults to value defined for contract\nlocal_bytes\n\u2013 Number of local bytes, defaults to value defined for contract\ntemplate_vars\n\u2013 Template variables to substitute into the contract,\nkey should be without the prefix, must evaluate to a compile time constant\nand match the type of the template var declaration\ntemplate_vars_prefix\n\u2013 Prefix to add to provided template vars,\ndefaults to the prefix supplied on command line (which defaults to TMPL_)\nalgopy.\ncompile_logicsig\n(\nlogicsig\n:\nLogicSig\n,\n\/\n,\n*\n,\ntemplate_vars\n:\ncollections.abc.Mapping\n[\nstr\n,\nobject\n]\n=\n...\n,\ntemplate_vars_prefix\n:\nstr\n=\n...\n,\n)\n\u2192\nalgopy.CompiledLogicSig\n\u00b6\nReturns the Account for the specified logic signature\nParameters\n:\nlogicsig\n\u2013 Algorand Python Logic Signature to compile\ntemplate_vars\n\u2013 Template variables to substitute into the logic signature,\nkey should be without the prefix, must evaluate to a compile time constant\nand match the type of the template var declaration\ntemplate_vars_prefix\n\u2013 Prefix to add to provided template vars,\ndefaults to the prefix supplied on command line (which defaults to TMPL_)\nalgopy.\nensure_budget\n(\nrequired_budget\n:\nalgopy.UInt64\n|\nint\n,\nfee_source\n:\nalgopy.OpUpFeeSource\n=\n...\n,\n)\n\u2192\nNone\n\u00b6\nEnsure the available op code budget is greater than or equal to required_budget\nalgopy.\nlog\n(\n*\nargs\n:\nalgopy.UInt64\n|\nalgopy.Bytes\n|\nalgopy.BytesBacked\n|\nstr\n|\nbytes\n|\nint\n,\nsep\n:\nalgopy.String\n|\nstr\n|\nalgopy.Bytes\n|\nbytes\n=\n''\n,\n)\n\u2192\nNone\n\u00b6\nConcatenates and logs supplied args as a single bytes value.\nUInt64 args are converted to bytes and each argument is separated by\nsep\n.\nLiteral\nstr\nvalues will be encoded as UTF8.\nalgopy.\nlogicsig\n(\n*\n,\nname\n:\nstr\n=\n...\n,\navm_version\n:\nint\n=\n...\n,\n)\n\u2192\ncollections.abc.Callable\n[\n[\ncollections.abc.Callable\n[\n[\n]\n,\nbool\n|\nalgopy.UInt64\n]\n]\n,\nalgopy.LogicSig\n]\n\u00b6\nDecorator to indicate a function is a logic signature\nalgopy.\nsubroutine\n(\n*\n,\ninline\n:\nbool\n|\nLiteral\n[\nauto\n]\n=\n'auto'\n,\n)\n\u2192\ncollections.abc.Callable\n[\n[\ncollections.abc.Callable\n[\nalgopy._P\n,\nalgopy._R\n]\n]\n,\ncollections.abc.Callable\n[\nalgopy._P\n,\nalgopy._R\n]\n]\n\u00b6\nDecorator to indicate functions or methods that can be called by a Smart Contract\nInlining can be controlled with the decorator argument\ninline\n.\nWhen unspecified it defaults to auto, which allows the optimizer to decide whether to inline\nor not. Setting\ninline=True\nforces inlining, and\ninline=False\nensures the function will\nnever be inlined.\nclass\nalgopy.\nuenumerate\n(\niterable\n:\ncollections.abc.Iterable\n[\nalgopy._T\n]\n)\n\u00b6\nYields pairs containing a count (from zero) and a value yielded by the iterable argument.\nenumerate is useful for obtaining an indexed list:\n(0, seq[0]), (1, seq[1]), (2, seq[2]), \u2026\nenumerate((a, b, c)) produces (0, a), (1, b), (2, c)\nInitialization\nclass\nalgopy.\nurange\n\u00b6\nProduces a sequence of UInt64 from start (inclusive) to stop (exclusive) by step.\nurange(4) produces 0, 1, 2, 3\nurange(i, j) produces i, i+1, i+2, \u2026, j-1.\nurange(i, j, 2) produces i, i+2, i+4, \u2026, i+2n where n is the largest value where i+2n < j\nNext\nalgopy.arc4\nPrevious\nAPI Reference\nCopyright \u00a9 2024, Algorand Foundation\nMade with\nSphinx\nand\n@pradyunsg\n's\nFuro"} {"question":"","answer":"Back to top\nView this page\nToggle Light \/ Dark \/ Auto color theme\nToggle table of contents sidebar\nalgopy.arc4\n\u00b6\nModule Contents\n\u00b6\nClasses\n\u00b6\nARC4Client\nUsed to provide typed method signatures for ARC4 contracts\nARC4Contract\nA contract that conforms to the ARC4 ABI specification, functions decorated with\n@abimethod\nor\n@baremethod\nwill form the public interface of the contract\nAddress\nAn alias for an array containing 32 bytes representing an Algorand address\nBigUFixedNxM\nAn ARC4 UFixed representing a decimal with the number of bits and precision specified.\nBigUIntN\nAn ARC4 UInt consisting of the number of bits specified.\nBool\nAn ARC4 encoded bool\nByte\nAn ARC4 alias for a UInt8\nDynamicArray\nA dynamically sized ARC4 Array of the specified type\nDynamicBytes\nA variable sized array of bytes\nStaticArray\nA fixed length ARC4 Array of the specified type and length\nString\nAn ARC4 sequence of bytes containing a UTF8 string\nStruct\nBase class for ARC4 Struct types\nTuple\nAn ARC4 ABI tuple, containing other ARC4 ABI types\nUFixedNxM\nAn ARC4 UFixed representing a decimal with the number of bits and precision specified.\nUIntN\nAn ARC4 UInt consisting of the number of bits specified.\nFunctions\n\u00b6\nabimethod\nDecorator that indicates a method is an ARC4 ABI method.\narc4_create\nProvides a typesafe and convenient way of creating an ARC4Contract via an inner transaction\narc4_signature\nReturns the ARC4 encoded method selector for the specified signature\narc4_update\nProvides a typesafe and convenient way of updating an ARC4Contract via an inner transaction\nbaremethod\nDecorator that indicates a method is an ARC4 bare method.\nemit\nEmit an ARC-28 event for the provided event signature or name, and provided args.\nData\n\u00b6\nUInt128\nAn ARC4 UInt128\nUInt16\nAn ARC4 UInt16\nUInt256\nAn ARC4 UInt256\nUInt32\nAn ARC4 UInt32\nUInt512\nAn ARC4 UInt512\nUInt64\nAn ARC4 UInt64\nUInt8\nAn ARC4 UInt8\nabi_call\nProvides a typesafe way of calling ARC4 methods via an inner transaction\nAPI\n\u00b6\nclass\nalgopy.arc4.\nARC4Client\n\u00b6\nUsed to provide typed method signatures for ARC4 contracts\nclass\nalgopy.arc4.\nARC4Contract\n\u00b6\nA contract that conforms to the ARC4 ABI specification, functions decorated with\n@abimethod\nor\n@baremethod\nwill form the public interface of the contract\nThe approval_program will be implemented by the compiler, and route application args\naccording to the ARC4 ABI specification\nThe clear_state_program will by default return True, but can be overridden\nclass\nalgopy.arc4.\nAddress\n(\nvalue\n:\nalgopy.Account\n|\nstr\n|\nalgopy.Bytes\n=\n...\n,\n\/\n)\n\u00b6\nAn alias for an array containing 32 bytes representing an Algorand address\nInitialization\nIf\nvalue\nis a string, it should be a 58 character base32 string,\nie a base32 string-encoded 32 bytes public key + 4 bytes checksum.\nIf\nvalue\nis a Bytes, it\u2019s length checked to be 32 bytes - to avoid this\ncheck, use\nAddress.from_bytes(...)\ninstead.\nDefaults to the zero-address.\n__bool__\n(\n)\n\u2192\nbool\n\u00b6\nReturns\nTrue\nif not equal to the zero address\n__eq__\n(\nother\n:\nalgopy.arc4.Address\n|\nalgopy.Account\n|\nstr\n)\n\u2192\nbool\n\u00b6\nAddress equality is determined by the address of another\narc4.Address\n,\nAccount\nor\nstr\n__getitem__\n(\nindex\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.arc4._TArrayItem\n\u00b6\nGets the item of the array at provided index\n__iter__\n(\n)\n\u2192\nIterator\n[\nalgopy.arc4._TArrayItem\n]\n\u00b6\nReturns an iterator for the items in the array\n__ne__\n(\nother\n:\nalgopy.arc4.Address\n|\nalgopy.Account\n|\nstr\n)\n\u2192\nbool\n\u00b6\nAddress equality is determined by the address of another\narc4.Address\n,\nAccount\nor\nstr\n__reversed__\n(\n)\n\u2192\nIterator\n[\nalgopy.arc4._TArrayItem\n]\n\u00b6\nReturns an iterator for the items in the array, in reverse order\n__setitem__\n(\nindex\n:\nalgopy.UInt64\n|\nint\n,\nvalue\n:\nalgopy.arc4._TArrayItem\n,\n)\n\u2192\nalgopy.arc4._TArrayItem\n\u00b6\nSets the item of the array at specified index to provided value\ncopy\n(\n)\n\u2192\nSelf\n\u00b6\nCreate a copy of this array\nclassmethod\nfrom_log\n(\nlog\n:\nalgopy.Bytes\n,\n\/\n)\n\u2192\nSelf\n\u00b6\nLoad an ABI type from application logs, checking for the ABI return prefix\n0x151f7c75\nproperty\nlength\n:\nalgopy.UInt64\n\u00b6\nReturns the current length of the array\nproperty\nnative\n:\nalgopy.Account\n\u00b6\nReturn the Account representation of the address after ARC4 decoding\nclass\nalgopy.arc4.\nBigUFixedNxM\n(\nvalue\n:\nstr\n=\n'0.0'\n,\n\/\n)\n\u00b6\nAn ARC4 UFixed representing a decimal with the number of bits and precision specified.\nMax size: 512 bits\nInitialization\nConstruct an instance of UFixedNxM where value (v) is determined from the original\ndecimal value (d) by the formula v = round(d * (10^M))\n__bool__\n(\n)\n\u2192\nbool\n\u00b6\nReturns\nTrue\nif not equal to zero\n__eq__\n(\nother\n:\nSelf\n)\n\u2192\nbool\n\u00b6\nCompare for equality, note both operands must be the exact same type\nclassmethod\nfrom_log\n(\nlog\n:\nalgopy.Bytes\n,\n\/\n)\n\u2192\nSelf\n\u00b6\nLoad an ABI type from application logs, checking for the ABI return prefix\n0x151f7c75\nclass\nalgopy.arc4.\nBigUIntN\n(\nvalue\n:\nalgopy.BigUInt\n|\nalgopy.UInt64\n|\nint\n=\n0\n,\n\/\n)\n\u00b6\nAn ARC4 UInt consisting of the number of bits specified.\nMax size: 512 bits\nInitialization\n__bool__\n(\n)\n\u2192\nbool\n\u00b6\nReturns\nTrue\nif not equal to zero\nclassmethod\nfrom_log\n(\nlog\n:\nalgopy.Bytes\n,\n\/\n)\n\u2192\nSelf\n\u00b6\nLoad an ABI type from application logs, checking for the ABI return prefix\n0x151f7c75\nproperty\nnative\n:\nalgopy.BigUInt\n\u00b6\nReturn the BigUInt representation of the value after ARC4 decoding\nclass\nalgopy.arc4.\nBool\n(\nvalue\n:\nbool\n=\nFalse\n,\n\/\n)\n\u00b6\nAn ARC4 encoded bool\nInitialization\nclassmethod\nfrom_log\n(\nlog\n:\nalgopy.Bytes\n,\n\/\n)\n\u2192\nSelf\n\u00b6\nLoad an ABI type from application logs, checking for the ABI return prefix\n0x151f7c75\nproperty\nnative\n:\nbool\n\u00b6\nReturn the bool representation of the value after ARC4 decoding\nclass\nalgopy.arc4.\nByte\n(\nvalue\n:\nalgopy.BigUInt\n|\nalgopy.UInt64\n|\nint\n=\n0\n,\n\/\n)\n\u00b6\nAn ARC4 alias for a UInt8\nInitialization\n__bool__\n(\n)\n\u2192\nbool\n\u00b6\nReturns\nTrue\nif not equal to zero\nclassmethod\nfrom_log\n(\nlog\n:\nalgopy.Bytes\n,\n\/\n)\n\u2192\nSelf\n\u00b6\nLoad an ABI type from application logs, checking for the ABI return prefix\n0x151f7c75\nproperty\nnative\n:\nalgopy.UInt64\n\u00b6\nReturn the UInt64 representation of the value after ARC4 decoding\nclass\nalgopy.arc4.\nDynamicArray\n(\n*\nitems\n:\nalgopy.arc4._TArrayItem\n)\n\u00b6\nA dynamically sized ARC4 Array of the specified type\nInitialization\nInitializes a new array with items provided\n__add__\n(\nother\n:\nalgopy.arc4.DynamicArray\n[\nalgopy.arc4._TArrayItem\n]\n|\nalgopy.arc4.StaticArray\n[\nalgopy.arc4._TArrayItem\n,\nalgopy.arc4._TArrayLength\n]\n|\ntuple\n[\nalgopy.arc4._TArrayItem\n,\n...\n]\n,\n)\n\u2192\nalgopy.arc4.DynamicArray\n[\nalgopy.arc4._TArrayItem\n]\n\u00b6\nConcat two arrays together, returning a new array\n__bool__\n(\n)\n\u2192\nbool\n\u00b6\nReturns\nTrue\nif not an empty array\n__getitem__\n(\nindex\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.arc4._TArrayItem\n\u00b6\nGets the item of the array at provided index\n__iter__\n(\n)\n\u2192\nIterator\n[\nalgopy.arc4._TArrayItem\n]\n\u00b6\nReturns an iterator for the items in the array\n__reversed__\n(\n)\n\u2192\nIterator\n[\nalgopy.arc4._TArrayItem\n]\n\u00b6\nReturns an iterator for the items in the array, in reverse order\n__setitem__\n(\nindex\n:\nalgopy.UInt64\n|\nint\n,\nvalue\n:\nalgopy.arc4._TArrayItem\n,\n)\n\u2192\nalgopy.arc4._TArrayItem\n\u00b6\nSets the item of the array at specified index to provided value\nappend\n(\nitem\n:\nalgopy.arc4._TArrayItem\n,\n\/\n)\n\u2192\nNone\n\u00b6\nAppend an item to this array\ncopy\n(\n)\n\u2192\nSelf\n\u00b6\nCreate a copy of this array\nextend\n(\nother\n:\nalgopy.arc4.DynamicArray\n[\nalgopy.arc4._TArrayItem\n]\n|\nalgopy.arc4.StaticArray\n[\nalgopy.arc4._TArrayItem\n,\nalgopy.arc4._TArrayLength\n]\n|\ntuple\n[\nalgopy.arc4._TArrayItem\n,\n...\n]\n,\n\/\n,\n)\n\u2192\nNone\n\u00b6\nExtend this array with the contents of another array\nclassmethod\nfrom_log\n(\nlog\n:\nalgopy.Bytes\n,\n\/\n)\n\u2192\nSelf\n\u00b6\nLoad an ABI type from application logs, checking for the ABI return prefix\n0x151f7c75\nproperty\nlength\n:\nalgopy.UInt64\n\u00b6\nReturns the current length of the array\npop\n(\n)\n\u2192\nalgopy.arc4._TArrayItem\n\u00b6\nRemove and return the last item of this array\nclass\nalgopy.arc4.\nDynamicBytes\n\u00b6\nA variable sized array of bytes\n__add__\n(\nother\n:\nalgopy.arc4.DynamicArray\n[\nalgopy.arc4._TArrayItem\n]\n|\nalgopy.arc4.StaticArray\n[\nalgopy.arc4._TArrayItem\n,\nalgopy.arc4._TArrayLength\n]\n|\ntuple\n[\nalgopy.arc4._TArrayItem\n,\n...\n]\n,\n)\n\u2192\nalgopy.arc4.DynamicArray\n[\nalgopy.arc4._TArrayItem\n]\n\u00b6\nConcat two arrays together, returning a new array\n__bool__\n(\n)\n\u2192\nbool\n\u00b6\nReturns\nTrue\nif not an empty array\n__getitem__\n(\nindex\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.arc4._TArrayItem\n\u00b6\nGets the item of the array at provided index\n__iter__\n(\n)\n\u2192\nIterator\n[\nalgopy.arc4._TArrayItem\n]\n\u00b6\nReturns an iterator for the items in the array\n__reversed__\n(\n)\n\u2192\nIterator\n[\nalgopy.arc4._TArrayItem\n]\n\u00b6\nReturns an iterator for the items in the array, in reverse order\n__setitem__\n(\nindex\n:\nalgopy.UInt64\n|\nint\n,\nvalue\n:\nalgopy.arc4._TArrayItem\n,\n)\n\u2192\nalgopy.arc4._TArrayItem\n\u00b6\nSets the item of the array at specified index to provided value\nappend\n(\nitem\n:\nalgopy.arc4._TArrayItem\n,\n\/\n)\n\u2192\nNone\n\u00b6\nAppend an item to this array\ncopy\n(\n)\n\u2192\nSelf\n\u00b6\nCreate a copy of this array\nextend\n(\nother\n:\nalgopy.arc4.DynamicArray\n[\nalgopy.arc4._TArrayItem\n]\n|\nalgopy.arc4.StaticArray\n[\nalgopy.arc4._TArrayItem\n,\nalgopy.arc4._TArrayLength\n]\n|\ntuple\n[\nalgopy.arc4._TArrayItem\n,\n...\n]\n,\n\/\n,\n)\n\u2192\nNone\n\u00b6\nExtend this array with the contents of another array\nclassmethod\nfrom_log\n(\nlog\n:\nalgopy.Bytes\n,\n\/\n)\n\u2192\nSelf\n\u00b6\nLoad an ABI type from application logs, checking for the ABI return prefix\n0x151f7c75\nproperty\nlength\n:\nalgopy.UInt64\n\u00b6\nReturns the current length of the array\nproperty\nnative\n:\nalgopy.Bytes\n\u00b6\nReturn the Bytes representation of the address after ARC4 decoding\npop\n(\n)\n\u2192\nalgopy.arc4._TArrayItem\n\u00b6\nRemove and return the last item of this array\nclass\nalgopy.arc4.\nStaticArray\n\u00b6\nA fixed length ARC4 Array of the specified type and length\n__getitem__\n(\nindex\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.arc4._TArrayItem\n\u00b6\nGets the item of the array at provided index\n__iter__\n(\n)\n\u2192\nIterator\n[\nalgopy.arc4._TArrayItem\n]\n\u00b6\nReturns an iterator for the items in the array\n__reversed__\n(\n)\n\u2192\nIterator\n[\nalgopy.arc4._TArrayItem\n]\n\u00b6\nReturns an iterator for the items in the array, in reverse order\n__setitem__\n(\nindex\n:\nalgopy.UInt64\n|\nint\n,\nvalue\n:\nalgopy.arc4._TArrayItem\n,\n)\n\u2192\nalgopy.arc4._TArrayItem\n\u00b6\nSets the item of the array at specified index to provided value\ncopy\n(\n)\n\u2192\nSelf\n\u00b6\nCreate a copy of this array\nclassmethod\nfrom_log\n(\nlog\n:\nalgopy.Bytes\n,\n\/\n)\n\u2192\nSelf\n\u00b6\nLoad an ABI type from application logs, checking for the ABI return prefix\n0x151f7c75\nproperty\nlength\n:\nalgopy.UInt64\n\u00b6\nReturns the current length of the array\nclass\nalgopy.arc4.\nString\n(\nvalue\n:\nalgopy.String\n|\nstr\n=\n''\n,\n\/\n)\n\u00b6\nAn ARC4 sequence of bytes containing a UTF8 string\nInitialization\n__bool__\n(\n)\n\u2192\nbool\n\u00b6\nReturns\nTrue\nif length is not zero\nclassmethod\nfrom_log\n(\nlog\n:\nalgopy.Bytes\n,\n\/\n)\n\u2192\nSelf\n\u00b6\nLoad an ABI type from application logs, checking for the ABI return prefix\n0x151f7c75\nproperty\nnative\n:\nalgopy.String\n\u00b6\nReturn the String representation of the UTF8 string after ARC4 decoding\nclass\nalgopy.arc4.\nStruct\n\u00b6\nBase class for ARC4 Struct types\n_replace\n(\n**\nkwargs\n:\nAny\n)\n\u2192\nSelf\n\u00b6\nReturn a new instance of the struct replacing specified fields with new values.\nNote that any mutable fields must be explicitly copied to avoid aliasing.\nproperty\nbytes\n:\nalgopy.Bytes\n\u00b6\nGet the underlying bytes[]\ncopy\n(\n)\n\u2192\nSelf\n\u00b6\nCreate a copy of this struct\nclassmethod\nfrom_bytes\n(\nvalue\n:\nalgopy.Bytes\n|\nbytes\n,\n\/\n)\n\u2192\nSelf\n\u00b6\nConstruct an instance from the underlying bytes[] (no validation)\nclassmethod\nfrom_log\n(\nlog\n:\nalgopy.Bytes\n,\n\/\n)\n\u2192\nSelf\n\u00b6\nLoad an ABI type from application logs, checking for the ABI return prefix\n0x151f7c75\nclass\nalgopy.arc4.\nTuple\n(\nitems\n:\ntuple\n[\nUnpack\n[\nalgopy.arc4._TTuple\n]\n]\n,\n\/\n)\n\u00b6\nAn ARC4 ABI tuple, containing other ARC4 ABI types\nInitialization\nConstruct an ARC4 tuple from a native Python tuple\n__add__\n(\n)\n\u00b6\nReturn self+value.\n__contains__\n(\n)\n\u00b6\nReturn bool(key in self).\n__delattr__\n(\n)\n\u00b6\nImplement delattr(self, name).\n__dir__\n(\n)\n\u00b6\nDefault dir() implementation.\n__eq__\n(\n)\n\u00b6\nReturn self==value.\n__format__\n(\n)\n\u00b6\nDefault object formatter.\nReturn str(self) if format_spec is empty. Raise TypeError otherwise.\n__ge__\n(\n)\n\u00b6\nReturn self>=value.\n__getattribute__\n(\n)\n\u00b6\nReturn getattr(self, name).\n__getitem__\n(\n)\n\u00b6\nReturn self[key].\n__getstate__\n(\n)\n\u00b6\nHelper for pickle.\n__gt__\n(\n)\n\u00b6\nReturn self>value.\n__hash__\n(\n)\n\u00b6\nReturn hash(self).\n__iter__\n(\n)\n\u00b6\nImplement iter(self).\n__le__\n(\n)\n\u00b6\nReturn self<=value.\n__len__\n(\n)\n\u00b6\nReturn len(self).\n__lt__\n(\n)\n\u00b6\nReturn self\ntuple\n[\n_TABIResult_co\n,\nalgopy\n.\nitxn\n.\nApplicationCallInnerTransaction\n]:\n...\nPARAMETERS:\nmethod:\nThe name, method selector or Algorand Python method to call\napp_id:\nApplication to call, if 0 or not specified will create a new application\non_completion:\nOnCompleteAction value for the transaction. If not specified will be inferred from Algorand Python method where possible\napproval_program:\nWhen creating or updating an application, the approval program\nclear_state_program:\nWhen creating or updating an application, the clear state program\nglobal_num_uint:\nWhen creating an application the number of global uints\nglobal_num_bytes:\nWhen creating an application the number of global bytes\nlocal_num_uint:\nWhen creating an application the number of local uints\nlocal_num_bytes:\nWhen creating an application the number of local bytes\nextra_program_pages:\nWhen creating an application the The number of extra program pages\nfee:\nThe fee to pay for the transaction, defaults to 0\nsender:\nThe sender address for the transaction\nnote:\nNote to include with the transaction\nrekey_to:\nAccount to rekey to\nRETURNS:\nIf\nmethod\nreferences an Algorand Contract \/ Client or the function is indexed with a return type,\nthen the result is a tuple containing the ABI result and the inner transaction of the call.\nIf no return type is specified, or the method does not have a return value then the result\nis the inner transaction of the call.\nExamples:\n# can reference another algopy contract method\nresult\n,\ntxn\n=\nabi_call\n(\nHelloWorldContract\n.\nhello\n,\narc4\n.\nString\n(\n\"World\"\n),\napp\n=...\n)\nassert\nresult\n==\n\"Hello, World\"\n# can reference a method selector\nresult\n,\ntxn\n=\nabi_call\n[\narc4\n.\nString\n](\n\"hello(string)string\"\n,\narc4\n.\nString\n(\n\"Algo\"\n),\napp\n=...\n)\nassert\nresult\n==\n\"Hello, Algo\"\n# can reference a method name, the method selector is inferred from arguments and return type\nresult\n,\ntxn\n=\nabi_call\n[\narc4\n.\nString\n](\n\"hello\"\n,\n\"There\"\n,\napp\n=...\n)\nassert\nresult\n==\n\"Hello, There\"\n# calling a method without a return value\ntxn\n=\nabi_call\n(\nHelloWorldContract\n.\nno_return\n,\narc4\n.\nString\n(\n\"World\"\n),\napp\n=...\n)\nalgopy.arc4.\nabimethod\n(\n*\n,\nname\n:\nstr\n=\n...\n,\ncreate\n:\nLiteral\n[\nallow\n,\nrequire\n,\ndisallow\n]\n=\n'disallow'\n,\nallow_actions\n:\ncollections.abc.Sequence\n[\nalgopy.OnCompleteAction\n|\nLiteral\n[\nNoOp\n,\nOptIn\n,\nCloseOut\n,\nUpdateApplication\n,\nDeleteApplication\n]\n]\n=\n('NoOp',)\n,\nreadonly\n:\nbool\n=\nFalse\n,\ndefault_args\n:\ncollections.abc.Mapping\n[\nstr\n,\nstr\n|\nalgopy.arc4._ReadOnlyNoArgsMethod\n|\nobject\n]\n=\n...\n,\n)\n\u2192\ncollections.abc.Callable\n[\n[\ncollections.abc.Callable\n[\nalgopy.arc4._P\n,\nalgopy.arc4._R\n]\n]\n,\ncollections.abc.Callable\n[\nalgopy.arc4._P\n,\nalgopy.arc4._R\n]\n]\n\u00b6\nDecorator that indicates a method is an ARC4 ABI method.\nParameters\n:\nname\n\u2013 Name component of the ABI method selector. Defaults to using the function name.\ncreate\n\u2013 Controls the validation of the Application ID. \u201crequire\u201d means it must be zero,\n\u201cdisallow\u201d requires it must be non-zero, and \u201callow\u201d disables the validation.\nallow_actions\n\u2013 A sequence of allowed On-Completion Actions to validate against.\nreadonly\n\u2013 If True, then this method can be used via dry-run \/ simulate.\ndefault_args\n\u2013 Default argument sources for clients to use. For dynamic defaults, this can\nbe the name of, or reference to a method member, or the name of a storage\nmember. For static defaults, this can be any expression which evaluates to\na compile time constant of the exact same type as the parameter.\nalgopy.arc4.\narc4_create\n(\nmethod\n:\ncollections.abc.Callable\n[\nalgopy.arc4._P\n,\nalgopy.arc4._TABIResult_co\n]\n,\n\/\n,\n*\nargs\n:\nobject\n,\ncompiled\n:\nalgopy.CompiledContract\n=\n...\n,\non_completion\n:\nalgopy.OnCompleteAction\n=\n...\n,\nfee\n:\nalgopy.UInt64\n|\nint\n=\n0\n,\nsender\n:\nalgopy.Account\n|\nstr\n=\n...\n,\nnote\n:\nalgopy.Bytes\n|\nbytes\n|\nstr\n=\n...\n,\nrekey_to\n:\nalgopy.Account\n|\nstr\n=\n...\n,\n)\n\u2192\ntuple\n[\nalgopy.arc4._TABIResult_co\n,\nalgopy.itxn.ApplicationCallInnerTransaction\n]\n\u00b6\nProvides a typesafe and convenient way of creating an ARC4Contract via an inner transaction\nParameters\n:\nmethod\n\u2013 An ARC4 create method (ABI or bare), or an ARC4Contract with a single create method\nargs\n\u2013 ABI args for chosen method\ncompiled\n\u2013 If supplied will be used to specify transaction parameters required for creation,\ncan be omitted if template variables are not used\non_completion\n\u2013 OnCompleteAction value for the transaction\nIf not specified will be inferred from Algorand Python method where possible\nfee\n\u2013 The fee to pay for the transaction, defaults to 0\nsender\n\u2013 The sender address for the transaction\nnote\n\u2013 Note to include with the transaction\nrekey_to\n\u2013 Account to rekey to\nalgopy.arc4.\narc4_signature\n(\nsignature\n:\nstr\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nReturns the ARC4 encoded method selector for the specified signature\nalgopy.arc4.\narc4_update\n(\nmethod\n:\ncollections.abc.Callable\n[\nalgopy.arc4._P\n,\nalgopy.arc4._TABIResult_co\n]\n,\n\/\n,\n*\nargs\n:\nobject\n,\napp_id\n:\nalgopy.Application\n|\nalgopy.UInt64\n|\nint\n,\ncompiled\n:\nalgopy.CompiledContract\n=\n...\n,\nfee\n:\nalgopy.UInt64\n|\nint\n=\n0\n,\nsender\n:\nalgopy.Account\n|\nstr\n=\n...\n,\nnote\n:\nalgopy.Bytes\n|\nbytes\n|\nstr\n=\n...\n,\nrekey_to\n:\nalgopy.Account\n|\nstr\n=\n...\n,\n)\n\u2192\ntuple\n[\nalgopy.arc4._TABIResult_co\n,\nalgopy.itxn.ApplicationCallInnerTransaction\n]\n\u00b6\nProvides a typesafe and convenient way of updating an ARC4Contract via an inner transaction\nParameters\n:\nmethod\n\u2013 An ARC4 update method (ABI or bare), or an ARC4Contract with a single update method\nargs\n\u2013 ABI args for chosen method\napp_id\n\u2013 Application to update\ncompiled\n\u2013 If supplied will be used to specify transaction parameters required for updating,\ncan be omitted if template variables are not used\nfee\n\u2013 The fee to pay for the transaction, defaults to 0\nsender\n\u2013 The sender address for the transaction\nnote\n\u2013 Note to include with the transaction\nrekey_to\n\u2013 Account to rekey to\nalgopy.arc4.\nbaremethod\n(\n*\n,\ncreate\n:\nLiteral\n[\nallow\n,\nrequire\n,\ndisallow\n]\n=\n'disallow'\n,\nallow_actions\n:\ncollections.abc.Sequence\n[\nalgopy.OnCompleteAction\n|\nLiteral\n[\nNoOp\n,\nOptIn\n,\nCloseOut\n,\nUpdateApplication\n,\nDeleteApplication\n]\n]\n=\n...\n,\n)\n\u2192\ncollections.abc.Callable\n[\n[\ncollections.abc.Callable\n[\n[\nalgopy.arc4._TARC4Contract\n]\n,\nNone\n]\n]\n,\ncollections.abc.Callable\n[\n[\nalgopy.arc4._TARC4Contract\n]\n,\nNone\n]\n]\n\u00b6\nDecorator that indicates a method is an ARC4 bare method.\nThere can be only one bare method on a contract for each given On-Completion Action.\nParameters\n:\ncreate\n\u2013 Controls the validation of the Application ID. \u201crequire\u201d means it must be zero,\n\u201cdisallow\u201d requires it must be non-zero, and \u201callow\u201d disables the validation.\nallow_actions\n\u2013 Which On-Completion Action(s) to handle.\nalgopy.arc4.\nemit\n(\nevent\n:\nstr\n|\nalgopy.arc4.Struct\n,\n\/\n,\n*\nargs\n:\nobject\n)\n\u2192\nNone\n\u00b6\nEmit an ARC-28 event for the provided event signature or name, and provided args.\nParameters\n:\nevent\n\u2013\nEither an ARC4 Struct, an event name, or event signature.\nIf event is an ARC4 Struct, the event signature will be determined from the Struct name and fields\nIf event is a signature, then the following args will be typed checked to ensure they match.\nIf event is just a name, the event signature will be inferred from the name and following arguments\nargs\n\u2013 When event is a signature or name, args will be used as the event data.\nThey will all be encoded as single ARC4 Tuple\nExample:\nfrom\nalgopy\nimport\nARC4Contract\n,\narc4\nclass\nSwapped\n(\narc4\n.\nStruct\n):\na\n:\narc4\n.\nUInt64\nb\n:\narc4\n.\nUInt64\nclass\nEventEmitter\n(\nARC4Contract\n):\n@arc4\n.\nabimethod\ndef\nemit_swapped\n(\nself\n,\na\n:\narc4\n.\nUInt64\n,\nb\n:\narc4\n.\nUInt64\n)\n->\nNone\n:\narc4\n.\nemit\n(\nSwapped\n(\nb\n,\na\n))\narc4\n.\nemit\n(\n\"Swapped(uint64,uint64)\"\n,\nb\n,\na\n)\narc4\n.\nemit\n(\n\"Swapped\"\n,\nb\n,\na\n)\nNext\nalgopy.gtxn\nPrevious\nalgopy\nCopyright \u00a9 2024, Algorand Foundation\nMade with\nSphinx\nand\n@pradyunsg\n's\nFuro"} {"question":"","answer":"Back to top\nView this page\nToggle Light \/ Dark \/ Auto color theme\nToggle table of contents sidebar\nalgopy.gtxn\n\u00b6\nModule Contents\n\u00b6\nClasses\n\u00b6\nApplicationCallTransaction\nApplication call group transaction\nAssetConfigTransaction\nAsset config group transaction\nAssetFreezeTransaction\nAsset freeze group transaction\nAssetTransferTransaction\nAsset transfer group transaction\nKeyRegistrationTransaction\nKey registration group transaction\nPaymentTransaction\nPayment group transaction\nTransaction\nGroup Transaction of any type\nTransactionBase\nShared transaction properties\nAPI\n\u00b6\nclass\nalgopy.gtxn.\nApplicationCallTransaction\n(\ngroup_index\n:\nalgopy.UInt64\n|\nint\n)\n\u00b6\nApplication call group transaction\nInitialization\naccounts\n(\nindex\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Account\n\u00b6\nAccounts listed in the ApplicationCall transaction\napp_args\n(\nindex\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nArguments passed to the application in the ApplicationCall transaction\nproperty\napp_id\n:\nalgopy.Application\n\u00b6\nApplicationID from ApplicationCall transaction\nproperty\napproval_program\n:\nalgopy.Bytes\n\u00b6\nApproval program\napproval_program_pages\n(\nindex\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nApproval Program as an array of pages\napps\n(\nindex\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Application\n\u00b6\nForeign Apps listed in the ApplicationCall transaction\nassets\n(\nindex\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Asset\n\u00b6\nForeign Assets listed in the ApplicationCall transaction\nproperty\nclear_state_program\n:\nalgopy.Bytes\n\u00b6\nClear State program\nclear_state_program_pages\n(\nindex\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nClear State Program as an array of pages\nproperty\ncreated_app\n:\nalgopy.Application\n\u00b6\nApplicationID allocated by the creation of an application\nproperty\nextra_program_pages\n:\nalgopy.UInt64\n\u00b6\nNumber of additional pages for each of the application\u2019s approval and clear state programs. An ExtraProgramPages of 1 means 2048 more total bytes, or 1024 for each program.\nproperty\nfee\n:\nalgopy.UInt64\n\u00b6\nmicroalgos\nproperty\nfirst_valid\n:\nalgopy.UInt64\n\u00b6\nround number\nproperty\nfirst_valid_time\n:\nalgopy.UInt64\n\u00b6\nUNIX timestamp of block before txn.FirstValid. Fails if negative\nproperty\nglobal_num_bytes\n:\nalgopy.UInt64\n\u00b6\nNumber of global state byteslices in ApplicationCall\nproperty\nglobal_num_uint\n:\nalgopy.UInt64\n\u00b6\nNumber of global state integers in ApplicationCall\nproperty\ngroup_index\n:\nalgopy.UInt64\n\u00b6\nPosition of this transaction within an atomic transaction group.\nA stand-alone transaction is implicitly element 0 in a group of 1\nproperty\nlast_log\n:\nalgopy.Bytes\n\u00b6\nThe last message emitted. Empty bytes if none were emitted. Application mode only\nproperty\nlast_valid\n:\nalgopy.UInt64\n\u00b6\nround number\nproperty\nlease\n:\nalgopy.Bytes\n\u00b6\n32 byte lease value\nproperty\nlocal_num_bytes\n:\nalgopy.UInt64\n\u00b6\nNumber of local state byteslices in ApplicationCall\nproperty\nlocal_num_uint\n:\nalgopy.UInt64\n\u00b6\nNumber of local state integers in ApplicationCall\nlogs\n(\nindex\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.Bytes\n\u00b6\nLog messages emitted by an application call\nproperty\nnote\n:\nalgopy.Bytes\n\u00b6\nAny data up to 1024 bytes\nproperty\nnum_accounts\n:\nalgopy.UInt64\n\u00b6\nNumber of ApplicationArgs\nproperty\nnum_app_args\n:\nalgopy.UInt64\n\u00b6\nNumber of ApplicationArgs\nproperty\nnum_approval_program_pages\n:\nalgopy.UInt64\n\u00b6\nNumber of Approval Program pages\nproperty\nnum_apps\n:\nalgopy.UInt64\n\u00b6\nNumber of Applications\nproperty\nnum_assets\n:\nalgopy.UInt64\n\u00b6\nNumber of Assets\nproperty\nnum_clear_state_program_pages\n:\nalgopy.UInt64\n\u00b6\nNumber of Clear State Program pages\nproperty\nnum_logs\n:\nalgopy.UInt64\n\u00b6\nNumber of logs\nproperty\non_completion\n:\nalgopy.OnCompleteAction\n\u00b6\nApplicationCall transaction on completion action\nproperty\nrekey_to\n:\nalgopy.Account\n\u00b6\n32 byte Sender\u2019s new AuthAddr\nproperty\nsender\n:\nalgopy.Account\n\u00b6\n32 byte address\nproperty\ntxn_id\n:\nalgopy.Bytes\n\u00b6\nThe computed ID for this transaction. 32 bytes.\nproperty\ntype\n:\nalgopy.TransactionType\n\u00b6\nTransaction type as integer\nproperty\ntype_bytes\n:\nalgopy.Bytes\n\u00b6\nTransaction type as bytes\nclass\nalgopy.gtxn.\nAssetConfigTransaction\n(\ngroup_index\n:\nalgopy.UInt64\n|\nint\n)\n\u00b6\nAsset config group transaction\nInitialization\nproperty\nasset_name\n:\nalgopy.Bytes\n\u00b6\nThe asset name\nproperty\nclawback\n:\nalgopy.Account\n\u00b6\n32 byte address\nproperty\nconfig_asset\n:\nalgopy.Asset\n\u00b6\nAsset ID in asset config transaction\nproperty\ncreated_asset\n:\nalgopy.Asset\n\u00b6\nAsset ID allocated by the creation of an ASA\nproperty\ndecimals\n:\nalgopy.UInt64\n\u00b6\nNumber of digits to display after the decimal place when displaying the asset\nproperty\ndefault_frozen\n:\nbool\n\u00b6\nWhether the asset\u2019s slots are frozen by default or not, 0 or 1\nproperty\nfee\n:\nalgopy.UInt64\n\u00b6\nmicroalgos\nproperty\nfirst_valid\n:\nalgopy.UInt64\n\u00b6\nround number\nproperty\nfirst_valid_time\n:\nalgopy.UInt64\n\u00b6\nUNIX timestamp of block before txn.FirstValid. Fails if negative\nproperty\nfreeze\n:\nalgopy.Account\n\u00b6\n32 byte address\nproperty\ngroup_index\n:\nalgopy.UInt64\n\u00b6\nPosition of this transaction within an atomic transaction group.\nA stand-alone transaction is implicitly element 0 in a group of 1\nproperty\nlast_valid\n:\nalgopy.UInt64\n\u00b6\nround number\nproperty\nlease\n:\nalgopy.Bytes\n\u00b6\n32 byte lease value\nproperty\nmanager\n:\nalgopy.Account\n\u00b6\n32 byte address\nproperty\nmetadata_hash\n:\nalgopy.Bytes\n\u00b6\n32 byte commitment to unspecified asset metadata\nproperty\nnote\n:\nalgopy.Bytes\n\u00b6\nAny data up to 1024 bytes\nproperty\nrekey_to\n:\nalgopy.Account\n\u00b6\n32 byte Sender\u2019s new AuthAddr\nproperty\nreserve\n:\nalgopy.Account\n\u00b6\n32 byte address\nproperty\nsender\n:\nalgopy.Account\n\u00b6\n32 byte address\nproperty\ntotal\n:\nalgopy.UInt64\n\u00b6\nTotal number of units of this asset created\nproperty\ntxn_id\n:\nalgopy.Bytes\n\u00b6\nThe computed ID for this transaction. 32 bytes.\nproperty\ntype\n:\nalgopy.TransactionType\n\u00b6\nTransaction type as integer\nproperty\ntype_bytes\n:\nalgopy.Bytes\n\u00b6\nTransaction type as bytes\nproperty\nunit_name\n:\nalgopy.Bytes\n\u00b6\nUnit name of the asset\nproperty\nurl\n:\nalgopy.Bytes\n\u00b6\nURL\nclass\nalgopy.gtxn.\nAssetFreezeTransaction\n(\ngroup_index\n:\nalgopy.UInt64\n|\nint\n)\n\u00b6\nAsset freeze group transaction\nInitialization\nproperty\nfee\n:\nalgopy.UInt64\n\u00b6\nmicroalgos\nproperty\nfirst_valid\n:\nalgopy.UInt64\n\u00b6\nround number\nproperty\nfirst_valid_time\n:\nalgopy.UInt64\n\u00b6\nUNIX timestamp of block before txn.FirstValid. Fails if negative\nproperty\nfreeze_account\n:\nalgopy.Account\n\u00b6\n32 byte address of the account whose asset slot is being frozen or un-frozen\nproperty\nfreeze_asset\n:\nalgopy.Asset\n\u00b6\nAsset ID being frozen or un-frozen\nproperty\nfrozen\n:\nbool\n\u00b6\nThe new frozen value, 0 or 1\nproperty\ngroup_index\n:\nalgopy.UInt64\n\u00b6\nPosition of this transaction within an atomic transaction group.\nA stand-alone transaction is implicitly element 0 in a group of 1\nproperty\nlast_valid\n:\nalgopy.UInt64\n\u00b6\nround number\nproperty\nlease\n:\nalgopy.Bytes\n\u00b6\n32 byte lease value\nproperty\nnote\n:\nalgopy.Bytes\n\u00b6\nAny data up to 1024 bytes\nproperty\nrekey_to\n:\nalgopy.Account\n\u00b6\n32 byte Sender\u2019s new AuthAddr\nproperty\nsender\n:\nalgopy.Account\n\u00b6\n32 byte address\nproperty\ntxn_id\n:\nalgopy.Bytes\n\u00b6\nThe computed ID for this transaction. 32 bytes.\nproperty\ntype\n:\nalgopy.TransactionType\n\u00b6\nTransaction type as integer\nproperty\ntype_bytes\n:\nalgopy.Bytes\n\u00b6\nTransaction type as bytes\nclass\nalgopy.gtxn.\nAssetTransferTransaction\n(\ngroup_index\n:\nalgopy.UInt64\n|\nint\n)\n\u00b6\nAsset transfer group transaction\nInitialization\nproperty\nasset_amount\n:\nalgopy.UInt64\n\u00b6\nvalue in Asset\u2019s units\nproperty\nasset_close_to\n:\nalgopy.Account\n\u00b6\n32 byte address\nproperty\nasset_receiver\n:\nalgopy.Account\n\u00b6\n32 byte address\nproperty\nasset_sender\n:\nalgopy.Account\n\u00b6\n32 byte address. Source of assets if Sender is the Asset\u2019s Clawback address.\nproperty\nfee\n:\nalgopy.UInt64\n\u00b6\nmicroalgos\nproperty\nfirst_valid\n:\nalgopy.UInt64\n\u00b6\nround number\nproperty\nfirst_valid_time\n:\nalgopy.UInt64\n\u00b6\nUNIX timestamp of block before txn.FirstValid. Fails if negative\nproperty\ngroup_index\n:\nalgopy.UInt64\n\u00b6\nPosition of this transaction within an atomic transaction group.\nA stand-alone transaction is implicitly element 0 in a group of 1\nproperty\nlast_valid\n:\nalgopy.UInt64\n\u00b6\nround number\nproperty\nlease\n:\nalgopy.Bytes\n\u00b6\n32 byte lease value\nproperty\nnote\n:\nalgopy.Bytes\n\u00b6\nAny data up to 1024 bytes\nproperty\nrekey_to\n:\nalgopy.Account\n\u00b6\n32 byte Sender\u2019s new AuthAddr\nproperty\nsender\n:\nalgopy.Account\n\u00b6\n32 byte address\nproperty\ntxn_id\n:\nalgopy.Bytes\n\u00b6\nThe computed ID for this transaction. 32 bytes.\nproperty\ntype\n:\nalgopy.TransactionType\n\u00b6\nTransaction type as integer\nproperty\ntype_bytes\n:\nalgopy.Bytes\n\u00b6\nTransaction type as bytes\nproperty\nxfer_asset\n:\nalgopy.Asset\n\u00b6\nAsset ID\nclass\nalgopy.gtxn.\nKeyRegistrationTransaction\n(\ngroup_index\n:\nalgopy.UInt64\n|\nint\n)\n\u00b6\nKey registration group transaction\nInitialization\nproperty\nfee\n:\nalgopy.UInt64\n\u00b6\nmicroalgos\nproperty\nfirst_valid\n:\nalgopy.UInt64\n\u00b6\nround number\nproperty\nfirst_valid_time\n:\nalgopy.UInt64\n\u00b6\nUNIX timestamp of block before txn.FirstValid. Fails if negative\nproperty\ngroup_index\n:\nalgopy.UInt64\n\u00b6\nPosition of this transaction within an atomic transaction group.\nA stand-alone transaction is implicitly element 0 in a group of 1\nproperty\nlast_valid\n:\nalgopy.UInt64\n\u00b6\nround number\nproperty\nlease\n:\nalgopy.Bytes\n\u00b6\n32 byte lease value\nproperty\nnon_participation\n:\nbool\n\u00b6\nMarks an account nonparticipating for rewards\nproperty\nnote\n:\nalgopy.Bytes\n\u00b6\nAny data up to 1024 bytes\nproperty\nrekey_to\n:\nalgopy.Account\n\u00b6\n32 byte Sender\u2019s new AuthAddr\nproperty\nselection_key\n:\nalgopy.Bytes\n\u00b6\n32 byte address\nproperty\nsender\n:\nalgopy.Account\n\u00b6\n32 byte address\nproperty\nstate_proof_key\n:\nalgopy.Bytes\n\u00b6\n64 byte state proof public key\nproperty\ntxn_id\n:\nalgopy.Bytes\n\u00b6\nThe computed ID for this transaction. 32 bytes.\nproperty\ntype\n:\nalgopy.TransactionType\n\u00b6\nTransaction type as integer\nproperty\ntype_bytes\n:\nalgopy.Bytes\n\u00b6\nTransaction type as bytes\nproperty\nvote_first\n:\nalgopy.UInt64\n\u00b6\nThe first round that the participation key is valid.\nproperty\nvote_key\n:\nalgopy.Bytes\n\u00b6\n32 byte address\nproperty\nvote_key_dilution\n:\nalgopy.UInt64\n\u00b6\nDilution for the 2-level participation key\nproperty\nvote_last\n:\nalgopy.UInt64\n\u00b6\nThe last round that the participation key is valid.\nclass\nalgopy.gtxn.\nPaymentTransaction\n(\ngroup_index\n:\nalgopy.UInt64\n|\nint\n)\n\u00b6\nPayment group transaction\nInitialization\nproperty\namount\n:\nalgopy.UInt64\n\u00b6\nmicroalgos\nproperty\nclose_remainder_to\n:\nalgopy.Account\n\u00b6\n32 byte address\nproperty\nfee\n:\nalgopy.UInt64\n\u00b6\nmicroalgos\nproperty\nfirst_valid\n:\nalgopy.UInt64\n\u00b6\nround number\nproperty\nfirst_valid_time\n:\nalgopy.UInt64\n\u00b6\nUNIX timestamp of block before txn.FirstValid. Fails if negative\nproperty\ngroup_index\n:\nalgopy.UInt64\n\u00b6\nPosition of this transaction within an atomic transaction group.\nA stand-alone transaction is implicitly element 0 in a group of 1\nproperty\nlast_valid\n:\nalgopy.UInt64\n\u00b6\nround number\nproperty\nlease\n:\nalgopy.Bytes\n\u00b6\n32 byte lease value\nproperty\nnote\n:\nalgopy.Bytes\n\u00b6\nAny data up to 1024 bytes\nproperty\nreceiver\n:\nalgopy.Account\n\u00b6\n32 byte address\nproperty\nrekey_to\n:\nalgopy.Account\n\u00b6\n32 byte Sender\u2019s new AuthAddr\nproperty\nsender\n:\nalgopy.Account\n\u00b6\n32 byte address\nproperty\ntxn_id\n:\nalgopy.Bytes\n\u00b6\nThe computed ID for this transaction. 32 bytes.\nproperty\ntype\n:\nalgopy.TransactionType\n\u00b6\nTransaction type as integer\nproperty\ntype_bytes\n:\nalgopy.Bytes\n\u00b6\nTransaction type as bytes\nclass\nalgopy.gtxn.\nTransaction\n(\ngroup_index\n:\nalgopy.UInt64\n|\nint\n)\n\u00b6\nGroup Transaction of any type\nInitialization\naccounts\n(\nindex\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Account\n\u00b6\nAccounts listed in the ApplicationCall transaction\nproperty\namount\n:\nalgopy.UInt64\n\u00b6\nmicroalgos\napp_args\n(\nindex\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nArguments passed to the application in the ApplicationCall transaction\nproperty\napp_id\n:\nalgopy.Application\n\u00b6\nApplicationID from ApplicationCall transaction\nproperty\napproval_program\n:\nalgopy.Bytes\n\u00b6\nApproval program\napproval_program_pages\n(\nindex\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nApproval Program as an array of pages\napps\n(\nindex\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Application\n\u00b6\nForeign Apps listed in the ApplicationCall transaction\nproperty\nasset_amount\n:\nalgopy.UInt64\n\u00b6\nvalue in Asset\u2019s units\nproperty\nasset_close_to\n:\nalgopy.Account\n\u00b6\n32 byte address\nproperty\nasset_name\n:\nalgopy.Bytes\n\u00b6\nThe asset name\nproperty\nasset_receiver\n:\nalgopy.Account\n\u00b6\n32 byte address\nproperty\nasset_sender\n:\nalgopy.Account\n\u00b6\n32 byte address. Source of assets if Sender is the Asset\u2019s Clawback address.\nassets\n(\nindex\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Asset\n\u00b6\nForeign Assets listed in the ApplicationCall transaction\nproperty\nclawback\n:\nalgopy.Account\n\u00b6\n32 byte address\nproperty\nclear_state_program\n:\nalgopy.Bytes\n\u00b6\nClear State program\nclear_state_program_pages\n(\nindex\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nClear State Program as an array of pages\nproperty\nclose_remainder_to\n:\nalgopy.Account\n\u00b6\n32 byte address\nproperty\nconfig_asset\n:\nalgopy.Asset\n\u00b6\nAsset ID in asset config transaction\nproperty\ncreated_app\n:\nalgopy.Application\n\u00b6\nApplicationID allocated by the creation of an application\nproperty\ncreated_asset\n:\nalgopy.Asset\n\u00b6\nAsset ID allocated by the creation of an ASA\nproperty\ndecimals\n:\nalgopy.UInt64\n\u00b6\nNumber of digits to display after the decimal place when displaying the asset\nproperty\ndefault_frozen\n:\nbool\n\u00b6\nWhether the asset\u2019s slots are frozen by default or not, 0 or 1\nproperty\nextra_program_pages\n:\nalgopy.UInt64\n\u00b6\nNumber of additional pages for each of the application\u2019s approval and clear state programs. An ExtraProgramPages of 1 means 2048 more total bytes, or 1024 for each program.\nproperty\nfee\n:\nalgopy.UInt64\n\u00b6\nmicroalgos\nproperty\nfirst_valid\n:\nalgopy.UInt64\n\u00b6\nround number\nproperty\nfirst_valid_time\n:\nalgopy.UInt64\n\u00b6\nUNIX timestamp of block before txn.FirstValid. Fails if negative\nproperty\nfreeze\n:\nalgopy.Account\n\u00b6\n32 byte address\nproperty\nfreeze_account\n:\nalgopy.Account\n\u00b6\n32 byte address of the account whose asset slot is being frozen or un-frozen\nproperty\nfreeze_asset\n:\nalgopy.Asset\n\u00b6\nAsset ID being frozen or un-frozen\nproperty\nfrozen\n:\nbool\n\u00b6\nThe new frozen value, 0 or 1\nproperty\nglobal_num_bytes\n:\nalgopy.UInt64\n\u00b6\nNumber of global state byteslices in ApplicationCall\nproperty\nglobal_num_uint\n:\nalgopy.UInt64\n\u00b6\nNumber of global state integers in ApplicationCall\nproperty\ngroup_index\n:\nalgopy.UInt64\n\u00b6\nPosition of this transaction within an atomic transaction group.\nA stand-alone transaction is implicitly element 0 in a group of 1\nproperty\nlast_log\n:\nalgopy.Bytes\n\u00b6\nThe last message emitted. Empty bytes if none were emitted. Application mode only\nproperty\nlast_valid\n:\nalgopy.UInt64\n\u00b6\nround number\nproperty\nlease\n:\nalgopy.Bytes\n\u00b6\n32 byte lease value\nproperty\nlocal_num_bytes\n:\nalgopy.UInt64\n\u00b6\nNumber of local state byteslices in ApplicationCall\nproperty\nlocal_num_uint\n:\nalgopy.UInt64\n\u00b6\nNumber of local state integers in ApplicationCall\nlogs\n(\nindex\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.Bytes\n\u00b6\nLog messages emitted by an application call\nproperty\nmanager\n:\nalgopy.Account\n\u00b6\n32 byte address\nproperty\nmetadata_hash\n:\nalgopy.Bytes\n\u00b6\n32 byte commitment to unspecified asset metadata\nproperty\nnon_participation\n:\nbool\n\u00b6\nMarks an account nonparticipating for rewards\nproperty\nnote\n:\nalgopy.Bytes\n\u00b6\nAny data up to 1024 bytes\nproperty\nnum_accounts\n:\nalgopy.UInt64\n\u00b6\nNumber of ApplicationArgs\nproperty\nnum_app_args\n:\nalgopy.UInt64\n\u00b6\nNumber of ApplicationArgs\nproperty\nnum_approval_program_pages\n:\nalgopy.UInt64\n\u00b6\nNumber of Approval Program pages\nproperty\nnum_apps\n:\nalgopy.UInt64\n\u00b6\nNumber of Applications\nproperty\nnum_assets\n:\nalgopy.UInt64\n\u00b6\nNumber of Assets\nproperty\nnum_clear_state_program_pages\n:\nalgopy.UInt64\n\u00b6\nNumber of Clear State Program pages\nproperty\nnum_logs\n:\nalgopy.UInt64\n\u00b6\nNumber of logs\nproperty\non_completion\n:\nalgopy.OnCompleteAction\n\u00b6\nApplicationCall transaction on completion action\nproperty\nreceiver\n:\nalgopy.Account\n\u00b6\n32 byte address\nproperty\nrekey_to\n:\nalgopy.Account\n\u00b6\n32 byte Sender\u2019s new AuthAddr\nproperty\nreserve\n:\nalgopy.Account\n\u00b6\n32 byte address\nproperty\nselection_key\n:\nalgopy.Bytes\n\u00b6\n32 byte address\nproperty\nsender\n:\nalgopy.Account\n\u00b6\n32 byte address\nproperty\nstate_proof_key\n:\nalgopy.Bytes\n\u00b6\n64 byte state proof public key\nproperty\ntotal\n:\nalgopy.UInt64\n\u00b6\nTotal number of units of this asset created\nproperty\ntxn_id\n:\nalgopy.Bytes\n\u00b6\nThe computed ID for this transaction. 32 bytes.\nproperty\ntype\n:\nalgopy.TransactionType\n\u00b6\nTransaction type as integer\nproperty\ntype_bytes\n:\nalgopy.Bytes\n\u00b6\nTransaction type as bytes\nproperty\nunit_name\n:\nalgopy.Bytes\n\u00b6\nUnit name of the asset\nproperty\nurl\n:\nalgopy.Bytes\n\u00b6\nURL\nproperty\nvote_first\n:\nalgopy.UInt64\n\u00b6\nThe first round that the participation key is valid.\nproperty\nvote_key\n:\nalgopy.Bytes\n\u00b6\n32 byte address\nproperty\nvote_key_dilution\n:\nalgopy.UInt64\n\u00b6\nDilution for the 2-level participation key\nproperty\nvote_last\n:\nalgopy.UInt64\n\u00b6\nThe last round that the participation key is valid.\nproperty\nxfer_asset\n:\nalgopy.Asset\n\u00b6\nAsset ID\nclass\nalgopy.gtxn.\nTransactionBase\n\u00b6\nShared transaction properties\nproperty\nfee\n:\nalgopy.UInt64\n\u00b6\nmicroalgos\nproperty\nfirst_valid\n:\nalgopy.UInt64\n\u00b6\nround number\nproperty\nfirst_valid_time\n:\nalgopy.UInt64\n\u00b6\nUNIX timestamp of block before txn.FirstValid. Fails if negative\nproperty\ngroup_index\n:\nalgopy.UInt64\n\u00b6\nPosition of this transaction within an atomic transaction group.\nA stand-alone transaction is implicitly element 0 in a group of 1\nproperty\nlast_valid\n:\nalgopy.UInt64\n\u00b6\nround number\nproperty\nlease\n:\nalgopy.Bytes\n\u00b6\n32 byte lease value\nproperty\nnote\n:\nalgopy.Bytes\n\u00b6\nAny data up to 1024 bytes\nproperty\nrekey_to\n:\nalgopy.Account\n\u00b6\n32 byte Sender\u2019s new AuthAddr\nproperty\nsender\n:\nalgopy.Account\n\u00b6\n32 byte address\nproperty\ntxn_id\n:\nalgopy.Bytes\n\u00b6\nThe computed ID for this transaction. 32 bytes.\nproperty\ntype\n:\nalgopy.TransactionType\n\u00b6\nTransaction type as integer\nproperty\ntype_bytes\n:\nalgopy.Bytes\n\u00b6\nTransaction type as bytes\nNext\nalgopy.itxn\nPrevious\nalgopy.arc4\nCopyright \u00a9 2024, Algorand Foundation\nMade with\nSphinx\nand\n@pradyunsg\n's\nFuro"} {"question":"","answer":"Back to top\nView this page\nToggle Light \/ Dark \/ Auto color theme\nToggle table of contents sidebar\nalgopy.itxn\n\u00b6\nModule Contents\n\u00b6\nClasses\n\u00b6\nApplicationCall\nCreates a set of fields used to submit an Application Call inner transaction\nApplicationCallInnerTransaction\nApplication Call inner transaction\nAssetConfig\nCreates a set of fields used to submit an Asset Config inner transaction\nAssetConfigInnerTransaction\nAsset Config inner transaction\nAssetFreeze\nCreates a set of fields used to submit a Asset Freeze inner transaction\nAssetFreezeInnerTransaction\nAsset Freeze inner transaction\nAssetTransfer\nCreates a set of fields used to submit an Asset Transfer inner transaction\nAssetTransferInnerTransaction\nAsset Transfer inner transaction\nInnerTransaction\nCreates a set of fields used to submit an inner transaction of any type\nInnerTransactionResult\nAn inner transaction of any type\nKeyRegistration\nCreates a set of fields used to submit a Key Registration inner transaction\nKeyRegistrationInnerTransaction\nKey Registration inner transaction\nPayment\nCreates a set of fields used to submit a Payment inner transaction\nPaymentInnerTransaction\nPayment inner transaction\nFunctions\n\u00b6\nsubmit_txns\nSubmits a group of up to 16 inner transactions parameters\nAPI\n\u00b6\nclass\nalgopy.itxn.\nApplicationCall\n(\n*\n,\napp_id\n:\nalgopy.Application\n|\nalgopy.UInt64\n|\nint\n=\n...\n,\napproval_program\n:\nalgopy.Bytes\n|\nbytes\n|\ntuple\n[\nalgopy.Bytes\n,\n...\n]\n=\n...\n,\nclear_state_program\n:\nalgopy.Bytes\n|\nbytes\n|\ntuple\n[\nalgopy.Bytes\n,\n...\n]\n=\n...\n,\non_completion\n:\nalgopy.OnCompleteAction\n|\nalgopy.UInt64\n|\nint\n=\n...\n,\nglobal_num_uint\n:\nalgopy.UInt64\n|\nint\n=\n...\n,\nglobal_num_bytes\n:\nalgopy.UInt64\n|\nint\n=\n...\n,\nlocal_num_uint\n:\nalgopy.UInt64\n|\nint\n=\n...\n,\nlocal_num_bytes\n:\nalgopy.UInt64\n|\nint\n=\n...\n,\nextra_program_pages\n:\nalgopy.UInt64\n|\nint\n=\n...\n,\napp_args\n:\ntuple\n[\nobject\n,\n...\n]\n=\n...\n,\naccounts\n:\ntuple\n[\nalgopy.Account\n,\n...\n]\n=\n...\n,\nassets\n:\ntuple\n[\nalgopy.Asset\n,\n...\n]\n=\n...\n,\napps\n:\ntuple\n[\nalgopy.Application\n,\n...\n]\n=\n...\n,\nsender\n:\nalgopy.Account\n|\nstr\n=\n...\n,\nfee\n:\nalgopy.UInt64\n|\nint\n=\n0\n,\nnote\n:\nalgopy.String\n|\nalgopy.Bytes\n|\nstr\n|\nbytes\n=\n...\n,\nrekey_to\n:\nalgopy.Account\n|\nstr\n=\n...\n,\n)\n\u00b6\nCreates a set of fields used to submit an Application Call inner transaction\nInitialization\ncopy\n(\n)\n\u2192\nSelf\n\u00b6\nCopies a set of inner transaction parameters\nset\n(\n*\n,\napp_id\n:\nalgopy.Application\n|\nalgopy.UInt64\n|\nint\n=\n...\n,\napproval_program\n:\nalgopy.Bytes\n|\nbytes\n|\ntuple\n[\nalgopy.Bytes\n,\n...\n]\n=\n...\n,\nclear_state_program\n:\nalgopy.Bytes\n|\nbytes\n|\ntuple\n[\nalgopy.Bytes\n,\n...\n]\n=\n...\n,\non_completion\n:\nalgopy.OnCompleteAction\n|\nalgopy.UInt64\n|\nint\n=\n...\n,\nglobal_num_uint\n:\nalgopy.UInt64\n|\nint\n=\n...\n,\nglobal_num_bytes\n:\nalgopy.UInt64\n|\nint\n=\n...\n,\nlocal_num_uint\n:\nalgopy.UInt64\n|\nint\n=\n...\n,\nlocal_num_bytes\n:\nalgopy.UInt64\n|\nint\n=\n...\n,\nextra_program_pages\n:\nalgopy.UInt64\n|\nint\n=\n...\n,\napp_args\n:\ntuple\n[\nobject\n,\n...\n]\n=\n...\n,\naccounts\n:\ntuple\n[\nalgopy.Account\n,\n...\n]\n=\n...\n,\nassets\n:\ntuple\n[\nalgopy.Asset\n,\n...\n]\n=\n...\n,\napps\n:\ntuple\n[\nalgopy.Application\n,\n...\n]\n=\n...\n,\nsender\n:\nalgopy.Account\n|\nstr\n=\n...\n,\nfee\n:\nalgopy.UInt64\n|\nint\n=\n0\n,\nnote\n:\nalgopy.String\n|\nalgopy.Bytes\n|\nstr\n|\nbytes\n=\n...\n,\nrekey_to\n:\nalgopy.Account\n|\nstr\n=\n...\n,\n)\n\u2192\nNone\n\u00b6\nUpdates inner transaction parameter values\nsubmit\n(\n)\n\u2192\nalgopy.itxn._TResult_co\n\u00b6\nSubmits inner transaction parameters and returns the resulting inner transaction\nclass\nalgopy.itxn.\nApplicationCallInnerTransaction\n\u00b6\nApplication Call inner transaction\naccounts\n(\nindex\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Account\n\u00b6\nAccounts listed in the ApplicationCall transaction\napp_args\n(\nindex\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nArguments passed to the application in the ApplicationCall transaction\nproperty\napp_id\n:\nalgopy.Application\n\u00b6\nApplicationID from ApplicationCall transaction\nproperty\napproval_program\n:\nalgopy.Bytes\n\u00b6\nApproval program\napproval_program_pages\n(\nindex\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nApproval Program as an array of pages\napps\n(\nindex\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Application\n\u00b6\nForeign Apps listed in the ApplicationCall transaction\nassets\n(\nindex\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Asset\n\u00b6\nForeign Assets listed in the ApplicationCall transaction\nproperty\nclear_state_program\n:\nalgopy.Bytes\n\u00b6\nClear State program\nclear_state_program_pages\n(\nindex\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nClear State Program as an array of pages\nproperty\ncreated_app\n:\nalgopy.Application\n\u00b6\nApplicationID allocated by the creation of an application\nproperty\nextra_program_pages\n:\nalgopy.UInt64\n\u00b6\nNumber of additional pages for each of the application\u2019s approval and clear state programs. An ExtraProgramPages of 1 means 2048 more total bytes, or 1024 for each program.\nproperty\nfee\n:\nalgopy.UInt64\n\u00b6\nmicroalgos\nproperty\nfirst_valid\n:\nalgopy.UInt64\n\u00b6\nround number\nproperty\nfirst_valid_time\n:\nalgopy.UInt64\n\u00b6\nUNIX timestamp of block before txn.FirstValid. Fails if negative\nproperty\nglobal_num_bytes\n:\nalgopy.UInt64\n\u00b6\nNumber of global state byteslices in ApplicationCall\nproperty\nglobal_num_uint\n:\nalgopy.UInt64\n\u00b6\nNumber of global state integers in ApplicationCall\nproperty\ngroup_index\n:\nalgopy.UInt64\n\u00b6\nPosition of this transaction within an atomic transaction group.\nA stand-alone transaction is implicitly element 0 in a group of 1\nproperty\nlast_log\n:\nalgopy.Bytes\n\u00b6\nThe last message emitted. Empty bytes if none were emitted. Application mode only\nproperty\nlast_valid\n:\nalgopy.UInt64\n\u00b6\nround number\nproperty\nlease\n:\nalgopy.Bytes\n\u00b6\n32 byte lease value\nproperty\nlocal_num_bytes\n:\nalgopy.UInt64\n\u00b6\nNumber of local state byteslices in ApplicationCall\nproperty\nlocal_num_uint\n:\nalgopy.UInt64\n\u00b6\nNumber of local state integers in ApplicationCall\nlogs\n(\nindex\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.Bytes\n\u00b6\nLog messages emitted by an application call\nproperty\nnote\n:\nalgopy.Bytes\n\u00b6\nAny data up to 1024 bytes\nproperty\nnum_accounts\n:\nalgopy.UInt64\n\u00b6\nNumber of ApplicationArgs\nproperty\nnum_app_args\n:\nalgopy.UInt64\n\u00b6\nNumber of ApplicationArgs\nproperty\nnum_approval_program_pages\n:\nalgopy.UInt64\n\u00b6\nNumber of Approval Program pages\nproperty\nnum_apps\n:\nalgopy.UInt64\n\u00b6\nNumber of Applications\nproperty\nnum_assets\n:\nalgopy.UInt64\n\u00b6\nNumber of Assets\nproperty\nnum_clear_state_program_pages\n:\nalgopy.UInt64\n\u00b6\nNumber of Clear State Program pages\nproperty\nnum_logs\n:\nalgopy.UInt64\n\u00b6\nNumber of logs\nproperty\non_completion\n:\nalgopy.OnCompleteAction\n\u00b6\nApplicationCall transaction on completion action\nproperty\nrekey_to\n:\nalgopy.Account\n\u00b6\n32 byte Sender\u2019s new AuthAddr\nproperty\nsender\n:\nalgopy.Account\n\u00b6\n32 byte address\nproperty\ntxn_id\n:\nalgopy.Bytes\n\u00b6\nThe computed ID for this transaction. 32 bytes.\nproperty\ntype\n:\nalgopy.TransactionType\n\u00b6\nTransaction type as integer\nproperty\ntype_bytes\n:\nalgopy.Bytes\n\u00b6\nTransaction type as bytes\nclass\nalgopy.itxn.\nAssetConfig\n(\n*\n,\nconfig_asset\n:\nalgopy.Asset\n|\nalgopy.UInt64\n|\nint\n=\n...\n,\ntotal\n:\nalgopy.UInt64\n|\nint\n=\n...\n,\nunit_name\n:\nalgopy.String\n|\nalgopy.Bytes\n|\nstr\n|\nbytes\n=\n...\n,\nasset_name\n:\nalgopy.String\n|\nalgopy.Bytes\n|\nstr\n|\nbytes\n=\n...\n,\ndecimals\n:\nalgopy.UInt64\n|\nint\n=\n...\n,\ndefault_frozen\n:\nbool\n=\n...\n,\nurl\n:\nalgopy.String\n|\nalgopy.Bytes\n|\nstr\n|\nbytes\n=\n...\n,\nmetadata_hash\n:\nalgopy.Bytes\n|\nbytes\n=\n...\n,\nmanager\n:\nalgopy.Account\n|\nstr\n=\n...\n,\nreserve\n:\nalgopy.Account\n|\nstr\n=\n...\n,\nfreeze\n:\nalgopy.Account\n|\nstr\n=\n...\n,\nclawback\n:\nalgopy.Account\n|\nstr\n=\n...\n,\nsender\n:\nalgopy.Account\n|\nstr\n=\n...\n,\nfee\n:\nalgopy.UInt64\n|\nint\n=\n0\n,\nnote\n:\nalgopy.String\n|\nalgopy.Bytes\n|\nstr\n|\nbytes\n=\n...\n,\nrekey_to\n:\nalgopy.Account\n|\nstr\n=\n...\n,\n)\n\u00b6\nCreates a set of fields used to submit an Asset Config inner transaction\nInitialization\ncopy\n(\n)\n\u2192\nSelf\n\u00b6\nCopies a set of inner transaction parameters\nset\n(\n*\n,\nconfig_asset\n:\nalgopy.Asset\n|\nalgopy.UInt64\n|\nint\n=\n...\n,\ntotal\n:\nalgopy.UInt64\n|\nint\n=\n...\n,\nunit_name\n:\nalgopy.String\n|\nalgopy.Bytes\n|\nstr\n|\nbytes\n=\n...\n,\nasset_name\n:\nalgopy.String\n|\nalgopy.Bytes\n|\nstr\n|\nbytes\n=\n...\n,\ndecimals\n:\nalgopy.UInt64\n|\nint\n=\n...\n,\ndefault_frozen\n:\nbool\n=\n...\n,\nurl\n:\nalgopy.String\n|\nalgopy.Bytes\n|\nstr\n|\nbytes\n=\n...\n,\nmetadata_hash\n:\nalgopy.Bytes\n|\nbytes\n=\n...\n,\nmanager\n:\nalgopy.Account\n|\nstr\n=\n...\n,\nreserve\n:\nalgopy.Account\n|\nstr\n=\n...\n,\nfreeze\n:\nalgopy.Account\n|\nstr\n=\n...\n,\nclawback\n:\nalgopy.Account\n|\nstr\n=\n...\n,\nsender\n:\nalgopy.Account\n|\nstr\n=\n...\n,\nfee\n:\nalgopy.UInt64\n|\nint\n=\n0\n,\nnote\n:\nalgopy.String\n|\nalgopy.Bytes\n|\nstr\n|\nbytes\n=\n...\n,\nrekey_to\n:\nalgopy.Account\n|\nstr\n=\n...\n,\n)\n\u2192\nNone\n\u00b6\nUpdates inner transaction parameter values\nsubmit\n(\n)\n\u2192\nalgopy.itxn._TResult_co\n\u00b6\nSubmits inner transaction parameters and returns the resulting inner transaction\nclass\nalgopy.itxn.\nAssetConfigInnerTransaction\n\u00b6\nAsset Config inner transaction\nproperty\nasset_name\n:\nalgopy.Bytes\n\u00b6\nThe asset name\nproperty\nclawback\n:\nalgopy.Account\n\u00b6\n32 byte address\nproperty\nconfig_asset\n:\nalgopy.Asset\n\u00b6\nAsset ID in asset config transaction\nproperty\ncreated_asset\n:\nalgopy.Asset\n\u00b6\nAsset ID allocated by the creation of an ASA\nproperty\ndecimals\n:\nalgopy.UInt64\n\u00b6\nNumber of digits to display after the decimal place when displaying the asset\nproperty\ndefault_frozen\n:\nbool\n\u00b6\nWhether the asset\u2019s slots are frozen by default or not, 0 or 1\nproperty\nfee\n:\nalgopy.UInt64\n\u00b6\nmicroalgos\nproperty\nfirst_valid\n:\nalgopy.UInt64\n\u00b6\nround number\nproperty\nfirst_valid_time\n:\nalgopy.UInt64\n\u00b6\nUNIX timestamp of block before txn.FirstValid. Fails if negative\nproperty\nfreeze\n:\nalgopy.Account\n\u00b6\n32 byte address\nproperty\ngroup_index\n:\nalgopy.UInt64\n\u00b6\nPosition of this transaction within an atomic transaction group.\nA stand-alone transaction is implicitly element 0 in a group of 1\nproperty\nlast_valid\n:\nalgopy.UInt64\n\u00b6\nround number\nproperty\nlease\n:\nalgopy.Bytes\n\u00b6\n32 byte lease value\nproperty\nmanager\n:\nalgopy.Account\n\u00b6\n32 byte address\nproperty\nmetadata_hash\n:\nalgopy.Bytes\n\u00b6\n32 byte commitment to unspecified asset metadata\nproperty\nnote\n:\nalgopy.Bytes\n\u00b6\nAny data up to 1024 bytes\nproperty\nrekey_to\n:\nalgopy.Account\n\u00b6\n32 byte Sender\u2019s new AuthAddr\nproperty\nreserve\n:\nalgopy.Account\n\u00b6\n32 byte address\nproperty\nsender\n:\nalgopy.Account\n\u00b6\n32 byte address\nproperty\ntotal\n:\nalgopy.UInt64\n\u00b6\nTotal number of units of this asset created\nproperty\ntxn_id\n:\nalgopy.Bytes\n\u00b6\nThe computed ID for this transaction. 32 bytes.\nproperty\ntype\n:\nalgopy.TransactionType\n\u00b6\nTransaction type as integer\nproperty\ntype_bytes\n:\nalgopy.Bytes\n\u00b6\nTransaction type as bytes\nproperty\nunit_name\n:\nalgopy.Bytes\n\u00b6\nUnit name of the asset\nproperty\nurl\n:\nalgopy.Bytes\n\u00b6\nURL\nclass\nalgopy.itxn.\nAssetFreeze\n(\n*\n,\nfreeze_asset\n:\nalgopy.Asset\n|\nalgopy.UInt64\n|\nint\n,\nfreeze_account\n:\nalgopy.Account\n|\nstr\n,\nfrozen\n:\nbool\n,\nsender\n:\nalgopy.Account\n|\nstr\n=\n...\n,\nfee\n:\nalgopy.UInt64\n|\nint\n=\n0\n,\nnote\n:\nalgopy.String\n|\nalgopy.Bytes\n|\nstr\n|\nbytes\n=\n...\n,\nrekey_to\n:\nalgopy.Account\n|\nstr\n=\n...\n,\n)\n\u00b6\nCreates a set of fields used to submit a Asset Freeze inner transaction\nInitialization\ncopy\n(\n)\n\u2192\nSelf\n\u00b6\nCopies a set of inner transaction parameters\nset\n(\n*\n,\nfreeze_asset\n:\nalgopy.Asset\n|\nalgopy.UInt64\n|\nint\n=\n...\n,\nfreeze_account\n:\nalgopy.Account\n|\nstr\n=\n...\n,\nfrozen\n:\nbool\n=\n...\n,\nsender\n:\nalgopy.Account\n|\nstr\n=\n...\n,\nfee\n:\nalgopy.UInt64\n|\nint\n=\n0\n,\nnote\n:\nalgopy.String\n|\nalgopy.Bytes\n|\nstr\n|\nbytes\n=\n...\n,\nrekey_to\n:\nalgopy.Account\n|\nstr\n=\n...\n,\n)\n\u2192\nNone\n\u00b6\nUpdates inner transaction parameter values\nsubmit\n(\n)\n\u2192\nalgopy.itxn._TResult_co\n\u00b6\nSubmits inner transaction parameters and returns the resulting inner transaction\nclass\nalgopy.itxn.\nAssetFreezeInnerTransaction\n\u00b6\nAsset Freeze inner transaction\nproperty\nfee\n:\nalgopy.UInt64\n\u00b6\nmicroalgos\nproperty\nfirst_valid\n:\nalgopy.UInt64\n\u00b6\nround number\nproperty\nfirst_valid_time\n:\nalgopy.UInt64\n\u00b6\nUNIX timestamp of block before txn.FirstValid. Fails if negative\nproperty\nfreeze_account\n:\nalgopy.Account\n\u00b6\n32 byte address of the account whose asset slot is being frozen or un-frozen\nproperty\nfreeze_asset\n:\nalgopy.Asset\n\u00b6\nAsset ID being frozen or un-frozen\nproperty\nfrozen\n:\nbool\n\u00b6\nThe new frozen value, 0 or 1\nproperty\ngroup_index\n:\nalgopy.UInt64\n\u00b6\nPosition of this transaction within an atomic transaction group.\nA stand-alone transaction is implicitly element 0 in a group of 1\nproperty\nlast_valid\n:\nalgopy.UInt64\n\u00b6\nround number\nproperty\nlease\n:\nalgopy.Bytes\n\u00b6\n32 byte lease value\nproperty\nnote\n:\nalgopy.Bytes\n\u00b6\nAny data up to 1024 bytes\nproperty\nrekey_to\n:\nalgopy.Account\n\u00b6\n32 byte Sender\u2019s new AuthAddr\nproperty\nsender\n:\nalgopy.Account\n\u00b6\n32 byte address\nproperty\ntxn_id\n:\nalgopy.Bytes\n\u00b6\nThe computed ID for this transaction. 32 bytes.\nproperty\ntype\n:\nalgopy.TransactionType\n\u00b6\nTransaction type as integer\nproperty\ntype_bytes\n:\nalgopy.Bytes\n\u00b6\nTransaction type as bytes\nclass\nalgopy.itxn.\nAssetTransfer\n(\n*\n,\nxfer_asset\n:\nalgopy.Asset\n|\nalgopy.UInt64\n|\nint\n,\nasset_receiver\n:\nalgopy.Account\n|\nstr\n,\nasset_amount\n:\nalgopy.UInt64\n|\nint\n=\n...\n,\nasset_sender\n:\nalgopy.Account\n|\nstr\n=\n...\n,\nasset_close_to\n:\nalgopy.Account\n|\nstr\n=\n...\n,\nsender\n:\nalgopy.Account\n|\nstr\n=\n...\n,\nfee\n:\nalgopy.UInt64\n|\nint\n=\n0\n,\nnote\n:\nalgopy.String\n|\nalgopy.Bytes\n|\nstr\n|\nbytes\n=\n...\n,\nrekey_to\n:\nalgopy.Account\n|\nstr\n=\n...\n,\n)\n\u00b6\nCreates a set of fields used to submit an Asset Transfer inner transaction\nInitialization\ncopy\n(\n)\n\u2192\nSelf\n\u00b6\nCopies a set of inner transaction parameters\nset\n(\n*\n,\nxfer_asset\n:\nalgopy.Asset\n|\nalgopy.UInt64\n|\nint\n=\n...\n,\nasset_amount\n:\nalgopy.UInt64\n|\nint\n=\n...\n,\nasset_sender\n:\nalgopy.Account\n|\nstr\n=\n...\n,\nasset_receiver\n:\nalgopy.Account\n|\nstr\n=\n...\n,\nasset_close_to\n:\nalgopy.Account\n|\nstr\n=\n...\n,\nsender\n:\nalgopy.Account\n|\nstr\n=\n...\n,\nfee\n:\nalgopy.UInt64\n|\nint\n=\n0\n,\nnote\n:\nalgopy.String\n|\nalgopy.Bytes\n|\nstr\n|\nbytes\n=\n...\n,\nrekey_to\n:\nalgopy.Account\n|\nstr\n=\n...\n,\n)\n\u2192\nNone\n\u00b6\nUpdates transaction parameter values\nsubmit\n(\n)\n\u2192\nalgopy.itxn._TResult_co\n\u00b6\nSubmits inner transaction parameters and returns the resulting inner transaction\nclass\nalgopy.itxn.\nAssetTransferInnerTransaction\n\u00b6\nAsset Transfer inner transaction\nproperty\nasset_amount\n:\nalgopy.UInt64\n\u00b6\nvalue in Asset\u2019s units\nproperty\nasset_close_to\n:\nalgopy.Account\n\u00b6\n32 byte address\nproperty\nasset_receiver\n:\nalgopy.Account\n\u00b6\n32 byte address\nproperty\nasset_sender\n:\nalgopy.Account\n\u00b6\n32 byte address. Source of assets if Sender is the Asset\u2019s Clawback address.\nproperty\nfee\n:\nalgopy.UInt64\n\u00b6\nmicroalgos\nproperty\nfirst_valid\n:\nalgopy.UInt64\n\u00b6\nround number\nproperty\nfirst_valid_time\n:\nalgopy.UInt64\n\u00b6\nUNIX timestamp of block before txn.FirstValid. Fails if negative\nproperty\ngroup_index\n:\nalgopy.UInt64\n\u00b6\nPosition of this transaction within an atomic transaction group.\nA stand-alone transaction is implicitly element 0 in a group of 1\nproperty\nlast_valid\n:\nalgopy.UInt64\n\u00b6\nround number\nproperty\nlease\n:\nalgopy.Bytes\n\u00b6\n32 byte lease value\nproperty\nnote\n:\nalgopy.Bytes\n\u00b6\nAny data up to 1024 bytes\nproperty\nrekey_to\n:\nalgopy.Account\n\u00b6\n32 byte Sender\u2019s new AuthAddr\nproperty\nsender\n:\nalgopy.Account\n\u00b6\n32 byte address\nproperty\ntxn_id\n:\nalgopy.Bytes\n\u00b6\nThe computed ID for this transaction. 32 bytes.\nproperty\ntype\n:\nalgopy.TransactionType\n\u00b6\nTransaction type as integer\nproperty\ntype_bytes\n:\nalgopy.Bytes\n\u00b6\nTransaction type as bytes\nproperty\nxfer_asset\n:\nalgopy.Asset\n\u00b6\nAsset ID\nclass\nalgopy.itxn.\nInnerTransaction\n(\n*\n,\ntype\n:\nalgopy.TransactionType\n,\nreceiver\n:\nalgopy.Account\n|\nstr\n=\n...\n,\namount\n:\nalgopy.UInt64\n|\nint\n=\n...\n,\nclose_remainder_to\n:\nalgopy.Account\n|\nstr\n=\n...\n,\nvote_key\n:\nalgopy.Bytes\n|\nbytes\n=\n...\n,\nselection_key\n:\nalgopy.Bytes\n|\nbytes\n=\n...\n,\nvote_first\n:\nalgopy.UInt64\n|\nint\n=\n...\n,\nvote_last\n:\nalgopy.UInt64\n|\nint\n=\n...\n,\nvote_key_dilution\n:\nalgopy.UInt64\n|\nint\n=\n...\n,\nnon_participation\n:\nalgopy.UInt64\n|\nint\n|\nbool\n=\n...\n,\nstate_proof_key\n:\nalgopy.Bytes\n|\nbytes\n=\n...\n,\nconfig_asset\n:\nalgopy.Asset\n|\nalgopy.UInt64\n|\nint\n=\n...\n,\ntotal\n:\nalgopy.UInt64\n|\nint\n=\n...\n,\nunit_name\n:\nalgopy.String\n|\nalgopy.Bytes\n|\nstr\n|\nbytes\n=\n...\n,\nasset_name\n:\nalgopy.String\n|\nalgopy.Bytes\n|\nstr\n|\nbytes\n=\n...\n,\ndecimals\n:\nalgopy.UInt64\n|\nint\n=\n...\n,\ndefault_frozen\n:\nbool\n=\n...\n,\nurl\n:\nalgopy.String\n|\nalgopy.Bytes\n|\nbytes\n|\nstr\n=\n...\n,\nmetadata_hash\n:\nalgopy.Bytes\n|\nbytes\n=\n...\n,\nmanager\n:\nalgopy.Account\n|\nstr\n=\n...\n,\nreserve\n:\nalgopy.Account\n|\nstr\n=\n...\n,\nfreeze\n:\nalgopy.Account\n|\nstr\n=\n...\n,\nclawback\n:\nalgopy.Account\n|\nstr\n=\n...\n,\nxfer_asset\n:\nalgopy.Asset\n|\nalgopy.UInt64\n|\nint\n=\n...\n,\nasset_amount\n:\nalgopy.UInt64\n|\nint\n=\n...\n,\nasset_sender\n:\nalgopy.Account\n|\nstr\n=\n...\n,\nasset_receiver\n:\nalgopy.Account\n|\nstr\n=\n...\n,\nasset_close_to\n:\nalgopy.Account\n|\nstr\n=\n...\n,\nfreeze_asset\n:\nalgopy.Asset\n|\nalgopy.UInt64\n|\nint\n=\n...\n,\nfreeze_account\n:\nalgopy.Account\n|\nstr\n=\n...\n,\nfrozen\n:\nbool\n=\n...\n,\napp_id\n:\nalgopy.Application\n|\nalgopy.UInt64\n|\nint\n=\n...\n,\napproval_program\n:\nalgopy.Bytes\n|\nbytes\n|\ntuple\n[\nalgopy.Bytes\n,\n...\n]\n=\n...\n,\nclear_state_program\n:\nalgopy.Bytes\n|\nbytes\n|\ntuple\n[\nalgopy.Bytes\n,\n...\n]\n=\n...\n,\non_completion\n:\nalgopy.OnCompleteAction\n|\nalgopy.UInt64\n|\nint\n=\n...\n,\nglobal_num_uint\n:\nalgopy.UInt64\n|\nint\n=\n...\n,\nglobal_num_bytes\n:\nalgopy.UInt64\n|\nint\n=\n...\n,\nlocal_num_uint\n:\nalgopy.UInt64\n|\nint\n=\n...\n,\nlocal_num_bytes\n:\nalgopy.UInt64\n|\nint\n=\n...\n,\nextra_program_pages\n:\nalgopy.UInt64\n|\nint\n=\n...\n,\napp_args\n:\ntuple\n[\nobject\n,\n...\n]\n=\n...\n,\naccounts\n:\ntuple\n[\nalgopy.Account\n,\n...\n]\n=\n...\n,\nassets\n:\ntuple\n[\nalgopy.Asset\n,\n...\n]\n=\n...\n,\napps\n:\ntuple\n[\nalgopy.Application\n,\n...\n]\n=\n...\n,\nsender\n:\nalgopy.Account\n|\nstr\n=\n...\n,\nfee\n:\nalgopy.UInt64\n|\nint\n=\n0\n,\nnote\n:\nalgopy.String\n|\nalgopy.Bytes\n|\nstr\n|\nbytes\n=\n...\n,\nrekey_to\n:\nalgopy.Account\n|\nstr\n=\n...\n,\n)\n\u00b6\nCreates a set of fields used to submit an inner transaction of any type\nInitialization\ncopy\n(\n)\n\u2192\nSelf\n\u00b6\nCopies a set of inner transaction parameters\nset\n(\n*\n,\ntype\n:\nalgopy.TransactionType\n=\n...\n,\nreceiver\n:\nalgopy.Account\n|\nstr\n=\n...\n,\namount\n:\nalgopy.UInt64\n|\nint\n=\n...\n,\nclose_remainder_to\n:\nalgopy.Account\n|\nstr\n=\n...\n,\nvote_key\n:\nalgopy.Bytes\n|\nbytes\n=\n...\n,\nselection_key\n:\nalgopy.Bytes\n|\nbytes\n=\n...\n,\nvote_first\n:\nalgopy.UInt64\n|\nint\n=\n...\n,\nvote_last\n:\nalgopy.UInt64\n|\nint\n=\n...\n,\nvote_key_dilution\n:\nalgopy.UInt64\n|\nint\n=\n...\n,\nnon_participation\n:\nalgopy.UInt64\n|\nint\n|\nbool\n=\n...\n,\nstate_proof_key\n:\nalgopy.Bytes\n|\nbytes\n=\n...\n,\nconfig_asset\n:\nalgopy.Asset\n|\nalgopy.UInt64\n|\nint\n=\n...\n,\ntotal\n:\nalgopy.UInt64\n|\nint\n=\n...\n,\nunit_name\n:\nalgopy.String\n|\nalgopy.Bytes\n|\nstr\n|\nbytes\n=\n...\n,\nasset_name\n:\nalgopy.String\n|\nalgopy.Bytes\n|\nstr\n|\nbytes\n=\n...\n,\ndecimals\n:\nalgopy.UInt64\n|\nint\n=\n...\n,\ndefault_frozen\n:\nbool\n=\n...\n,\nurl\n:\nalgopy.String\n|\nalgopy.Bytes\n|\nbytes\n|\nstr\n=\n...\n,\nmetadata_hash\n:\nalgopy.Bytes\n|\nbytes\n=\n...\n,\nmanager\n:\nalgopy.Account\n|\nstr\n=\n...\n,\nreserve\n:\nalgopy.Account\n|\nstr\n=\n...\n,\nfreeze\n:\nalgopy.Account\n|\nstr\n=\n...\n,\nclawback\n:\nalgopy.Account\n|\nstr\n=\n...\n,\nxfer_asset\n:\nalgopy.Asset\n|\nalgopy.UInt64\n|\nint\n=\n...\n,\nasset_amount\n:\nalgopy.UInt64\n|\nint\n=\n...\n,\nasset_sender\n:\nalgopy.Account\n|\nstr\n=\n...\n,\nasset_receiver\n:\nalgopy.Account\n|\nstr\n=\n...\n,\nasset_close_to\n:\nalgopy.Account\n|\nstr\n=\n...\n,\nfreeze_asset\n:\nalgopy.Asset\n|\nalgopy.UInt64\n|\nint\n=\n...\n,\nfreeze_account\n:\nalgopy.Account\n|\nstr\n=\n...\n,\nfrozen\n:\nbool\n=\n...\n,\napp_id\n:\nalgopy.Application\n|\nalgopy.UInt64\n|\nint\n=\n...\n,\napproval_program\n:\nalgopy.Bytes\n|\nbytes\n|\ntuple\n[\nalgopy.Bytes\n,\n...\n]\n=\n...\n,\nclear_state_program\n:\nalgopy.Bytes\n|\nbytes\n|\ntuple\n[\nalgopy.Bytes\n,\n...\n]\n=\n...\n,\non_completion\n:\nalgopy.OnCompleteAction\n|\nalgopy.UInt64\n|\nint\n=\n...\n,\nglobal_num_uint\n:\nalgopy.UInt64\n|\nint\n=\n...\n,\nglobal_num_bytes\n:\nalgopy.UInt64\n|\nint\n=\n...\n,\nlocal_num_uint\n:\nalgopy.UInt64\n|\nint\n=\n...\n,\nlocal_num_bytes\n:\nalgopy.UInt64\n|\nint\n=\n...\n,\nextra_program_pages\n:\nalgopy.UInt64\n|\nint\n=\n...\n,\napp_args\n:\ntuple\n[\nobject\n,\n...\n]\n=\n...\n,\naccounts\n:\ntuple\n[\nalgopy.Account\n,\n...\n]\n=\n...\n,\nassets\n:\ntuple\n[\nalgopy.Asset\n,\n...\n]\n=\n...\n,\napps\n:\ntuple\n[\nalgopy.Application\n,\n...\n]\n=\n...\n,\nsender\n:\nalgopy.Account\n|\nstr\n=\n...\n,\nfee\n:\nalgopy.UInt64\n|\nint\n=\n0\n,\nnote\n:\nalgopy.String\n|\nalgopy.Bytes\n|\nstr\n|\nbytes\n=\n...\n,\nrekey_to\n:\nalgopy.Account\n|\nstr\n=\n...\n,\n)\n\u2192\nNone\n\u00b6\nUpdates inner transaction parameter values\nsubmit\n(\n)\n\u2192\nalgopy.itxn._TResult_co\n\u00b6\nSubmits inner transaction parameters and returns the resulting inner transaction\nclass\nalgopy.itxn.\nInnerTransactionResult\n\u00b6\nAn inner transaction of any type\naccounts\n(\nindex\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Account\n\u00b6\nAccounts listed in the ApplicationCall transaction\nproperty\namount\n:\nalgopy.UInt64\n\u00b6\nmicroalgos\napp_args\n(\nindex\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nArguments passed to the application in the ApplicationCall transaction\nproperty\napp_id\n:\nalgopy.Application\n\u00b6\nApplicationID from ApplicationCall transaction\nproperty\napproval_program\n:\nalgopy.Bytes\n\u00b6\nApproval program\napproval_program_pages\n(\nindex\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nApproval Program as an array of pages\napps\n(\nindex\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Application\n\u00b6\nForeign Apps listed in the ApplicationCall transaction\nproperty\nasset_amount\n:\nalgopy.UInt64\n\u00b6\nvalue in Asset\u2019s units\nproperty\nasset_close_to\n:\nalgopy.Account\n\u00b6\n32 byte address\nproperty\nasset_name\n:\nalgopy.Bytes\n\u00b6\nThe asset name\nproperty\nasset_receiver\n:\nalgopy.Account\n\u00b6\n32 byte address\nproperty\nasset_sender\n:\nalgopy.Account\n\u00b6\n32 byte address. Source of assets if Sender is the Asset\u2019s Clawback address.\nassets\n(\nindex\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Asset\n\u00b6\nForeign Assets listed in the ApplicationCall transaction\nproperty\nclawback\n:\nalgopy.Account\n\u00b6\n32 byte address\nproperty\nclear_state_program\n:\nalgopy.Bytes\n\u00b6\nClear State program\nclear_state_program_pages\n(\nindex\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nClear State Program as an array of pages\nproperty\nclose_remainder_to\n:\nalgopy.Account\n\u00b6\n32 byte address\nproperty\nconfig_asset\n:\nalgopy.Asset\n\u00b6\nAsset ID in asset config transaction\nproperty\ncreated_app\n:\nalgopy.Application\n\u00b6\nApplicationID allocated by the creation of an application\nproperty\ncreated_asset\n:\nalgopy.Asset\n\u00b6\nAsset ID allocated by the creation of an ASA\nproperty\ndecimals\n:\nalgopy.UInt64\n\u00b6\nNumber of digits to display after the decimal place when displaying the asset\nproperty\ndefault_frozen\n:\nbool\n\u00b6\nWhether the asset\u2019s slots are frozen by default or not, 0 or 1\nproperty\nextra_program_pages\n:\nalgopy.UInt64\n\u00b6\nNumber of additional pages for each of the application\u2019s approval and clear state programs. An ExtraProgramPages of 1 means 2048 more total bytes, or 1024 for each program.\nproperty\nfee\n:\nalgopy.UInt64\n\u00b6\nmicroalgos\nproperty\nfirst_valid\n:\nalgopy.UInt64\n\u00b6\nround number\nproperty\nfirst_valid_time\n:\nalgopy.UInt64\n\u00b6\nUNIX timestamp of block before txn.FirstValid. Fails if negative\nproperty\nfreeze\n:\nalgopy.Account\n\u00b6\n32 byte address\nproperty\nfreeze_account\n:\nalgopy.Account\n\u00b6\n32 byte address of the account whose asset slot is being frozen or un-frozen\nproperty\nfreeze_asset\n:\nalgopy.Asset\n\u00b6\nAsset ID being frozen or un-frozen\nproperty\nfrozen\n:\nbool\n\u00b6\nThe new frozen value, 0 or 1\nproperty\nglobal_num_bytes\n:\nalgopy.UInt64\n\u00b6\nNumber of global state byteslices in ApplicationCall\nproperty\nglobal_num_uint\n:\nalgopy.UInt64\n\u00b6\nNumber of global state integers in ApplicationCall\nproperty\ngroup_index\n:\nalgopy.UInt64\n\u00b6\nPosition of this transaction within an atomic transaction group.\nA stand-alone transaction is implicitly element 0 in a group of 1\nproperty\nlast_log\n:\nalgopy.Bytes\n\u00b6\nThe last message emitted. Empty bytes if none were emitted. Application mode only\nproperty\nlast_valid\n:\nalgopy.UInt64\n\u00b6\nround number\nproperty\nlease\n:\nalgopy.Bytes\n\u00b6\n32 byte lease value\nproperty\nlocal_num_bytes\n:\nalgopy.UInt64\n\u00b6\nNumber of local state byteslices in ApplicationCall\nproperty\nlocal_num_uint\n:\nalgopy.UInt64\n\u00b6\nNumber of local state integers in ApplicationCall\nlogs\n(\nindex\n:\nalgopy.UInt64\n|\nint\n)\n\u2192\nalgopy.Bytes\n\u00b6\nLog messages emitted by an application call\nproperty\nmanager\n:\nalgopy.Account\n\u00b6\n32 byte address\nproperty\nmetadata_hash\n:\nalgopy.Bytes\n\u00b6\n32 byte commitment to unspecified asset metadata\nproperty\nnon_participation\n:\nbool\n\u00b6\nMarks an account nonparticipating for rewards\nproperty\nnote\n:\nalgopy.Bytes\n\u00b6\nAny data up to 1024 bytes\nproperty\nnum_accounts\n:\nalgopy.UInt64\n\u00b6\nNumber of ApplicationArgs\nproperty\nnum_app_args\n:\nalgopy.UInt64\n\u00b6\nNumber of ApplicationArgs\nproperty\nnum_approval_program_pages\n:\nalgopy.UInt64\n\u00b6\nNumber of Approval Program pages\nproperty\nnum_apps\n:\nalgopy.UInt64\n\u00b6\nNumber of Applications\nproperty\nnum_assets\n:\nalgopy.UInt64\n\u00b6\nNumber of Assets\nproperty\nnum_clear_state_program_pages\n:\nalgopy.UInt64\n\u00b6\nNumber of Clear State Program pages\nproperty\nnum_logs\n:\nalgopy.UInt64\n\u00b6\nNumber of logs\nproperty\non_completion\n:\nalgopy.OnCompleteAction\n\u00b6\nApplicationCall transaction on completion action\nproperty\nreceiver\n:\nalgopy.Account\n\u00b6\n32 byte address\nproperty\nrekey_to\n:\nalgopy.Account\n\u00b6\n32 byte Sender\u2019s new AuthAddr\nproperty\nreserve\n:\nalgopy.Account\n\u00b6\n32 byte address\nproperty\nselection_key\n:\nalgopy.Bytes\n\u00b6\n32 byte address\nproperty\nsender\n:\nalgopy.Account\n\u00b6\n32 byte address\nproperty\nstate_proof_key\n:\nalgopy.Bytes\n\u00b6\n64 byte state proof public key\nproperty\ntotal\n:\nalgopy.UInt64\n\u00b6\nTotal number of units of this asset created\nproperty\ntxn_id\n:\nalgopy.Bytes\n\u00b6\nThe computed ID for this transaction. 32 bytes.\nproperty\ntype\n:\nalgopy.TransactionType\n\u00b6\nTransaction type as integer\nproperty\ntype_bytes\n:\nalgopy.Bytes\n\u00b6\nTransaction type as bytes\nproperty\nunit_name\n:\nalgopy.Bytes\n\u00b6\nUnit name of the asset\nproperty\nurl\n:\nalgopy.Bytes\n\u00b6\nURL\nproperty\nvote_first\n:\nalgopy.UInt64\n\u00b6\nThe first round that the participation key is valid.\nproperty\nvote_key\n:\nalgopy.Bytes\n\u00b6\n32 byte address\nproperty\nvote_key_dilution\n:\nalgopy.UInt64\n\u00b6\nDilution for the 2-level participation key\nproperty\nvote_last\n:\nalgopy.UInt64\n\u00b6\nThe last round that the participation key is valid.\nproperty\nxfer_asset\n:\nalgopy.Asset\n\u00b6\nAsset ID\nclass\nalgopy.itxn.\nKeyRegistration\n(\n*\n,\nvote_key\n:\nalgopy.Bytes\n|\nbytes\n,\nselection_key\n:\nalgopy.Bytes\n|\nbytes\n,\nvote_first\n:\nalgopy.UInt64\n|\nint\n,\nvote_last\n:\nalgopy.UInt64\n|\nint\n,\nvote_key_dilution\n:\nalgopy.UInt64\n|\nint\n,\nnon_participation\n:\nalgopy.UInt64\n|\nint\n|\nbool\n=\n...\n,\nstate_proof_key\n:\nalgopy.Bytes\n|\nbytes\n=\n...\n,\nsender\n:\nalgopy.Account\n|\nstr\n=\n...\n,\nfee\n:\nalgopy.UInt64\n|\nint\n=\n0\n,\nnote\n:\nalgopy.String\n|\nalgopy.Bytes\n|\nstr\n|\nbytes\n=\n...\n,\nrekey_to\n:\nalgopy.Account\n|\nstr\n=\n...\n,\n)\n\u00b6\nCreates a set of fields used to submit a Key Registration inner transaction\nInitialization\ncopy\n(\n)\n\u2192\nSelf\n\u00b6\nCopies a set of inner transaction parameters\nset\n(\n*\n,\nvote_key\n:\nalgopy.Bytes\n|\nbytes\n=\n...\n,\nselection_key\n:\nalgopy.Bytes\n|\nbytes\n=\n...\n,\nvote_first\n:\nalgopy.UInt64\n|\nint\n=\n...\n,\nvote_last\n:\nalgopy.UInt64\n|\nint\n=\n...\n,\nvote_key_dilution\n:\nalgopy.UInt64\n|\nint\n=\n...\n,\nnon_participation\n:\nalgopy.UInt64\n|\nint\n|\nbool\n=\n...\n,\nstate_proof_key\n:\nalgopy.Bytes\n|\nbytes\n=\n...\n,\nsender\n:\nalgopy.Account\n|\nstr\n=\n...\n,\nfee\n:\nalgopy.UInt64\n|\nint\n=\n0\n,\nnote\n:\nalgopy.String\n|\nalgopy.Bytes\n|\nstr\n|\nbytes\n=\n...\n,\nrekey_to\n:\nalgopy.Account\n|\nstr\n=\n...\n,\n)\n\u2192\nNone\n\u00b6\nUpdates inner transaction parameter values\nsubmit\n(\n)\n\u2192\nalgopy.itxn._TResult_co\n\u00b6\nSubmits inner transaction parameters and returns the resulting inner transaction\nclass\nalgopy.itxn.\nKeyRegistrationInnerTransaction\n\u00b6\nKey Registration inner transaction\nproperty\nfee\n:\nalgopy.UInt64\n\u00b6\nmicroalgos\nproperty\nfirst_valid\n:\nalgopy.UInt64\n\u00b6\nround number\nproperty\nfirst_valid_time\n:\nalgopy.UInt64\n\u00b6\nUNIX timestamp of block before txn.FirstValid. Fails if negative\nproperty\ngroup_index\n:\nalgopy.UInt64\n\u00b6\nPosition of this transaction within an atomic transaction group.\nA stand-alone transaction is implicitly element 0 in a group of 1\nproperty\nlast_valid\n:\nalgopy.UInt64\n\u00b6\nround number\nproperty\nlease\n:\nalgopy.Bytes\n\u00b6\n32 byte lease value\nproperty\nnon_participation\n:\nbool\n\u00b6\nMarks an account nonparticipating for rewards\nproperty\nnote\n:\nalgopy.Bytes\n\u00b6\nAny data up to 1024 bytes\nproperty\nrekey_to\n:\nalgopy.Account\n\u00b6\n32 byte Sender\u2019s new AuthAddr\nproperty\nselection_key\n:\nalgopy.Bytes\n\u00b6\n32 byte address\nproperty\nsender\n:\nalgopy.Account\n\u00b6\n32 byte address\nproperty\nstate_proof_key\n:\nalgopy.Bytes\n\u00b6\n64 byte state proof public key\nproperty\ntxn_id\n:\nalgopy.Bytes\n\u00b6\nThe computed ID for this transaction. 32 bytes.\nproperty\ntype\n:\nalgopy.TransactionType\n\u00b6\nTransaction type as integer\nproperty\ntype_bytes\n:\nalgopy.Bytes\n\u00b6\nTransaction type as bytes\nproperty\nvote_first\n:\nalgopy.UInt64\n\u00b6\nThe first round that the participation key is valid.\nproperty\nvote_key\n:\nalgopy.Bytes\n\u00b6\n32 byte address\nproperty\nvote_key_dilution\n:\nalgopy.UInt64\n\u00b6\nDilution for the 2-level participation key\nproperty\nvote_last\n:\nalgopy.UInt64\n\u00b6\nThe last round that the participation key is valid.\nclass\nalgopy.itxn.\nPayment\n(\n*\n,\nreceiver\n:\nalgopy.Account\n|\nstr\n,\namount\n:\nalgopy.UInt64\n|\nint\n=\n...\n,\nclose_remainder_to\n:\nalgopy.Account\n|\nstr\n=\n...\n,\nsender\n:\nalgopy.Account\n|\nstr\n=\n...\n,\nfee\n:\nalgopy.UInt64\n|\nint\n=\n0\n,\nnote\n:\nalgopy.String\n|\nalgopy.Bytes\n|\nstr\n|\nbytes\n=\n...\n,\nrekey_to\n:\nalgopy.Account\n|\nstr\n=\n...\n,\n)\n\u00b6\nCreates a set of fields used to submit a Payment inner transaction\nInitialization\ncopy\n(\n)\n\u2192\nSelf\n\u00b6\nCopies a set of inner transaction parameters\nset\n(\n*\n,\nreceiver\n:\nalgopy.Account\n|\nstr\n=\n...\n,\namount\n:\nalgopy.UInt64\n|\nint\n=\n...\n,\nclose_remainder_to\n:\nalgopy.Account\n|\nstr\n=\n...\n,\nsender\n:\nalgopy.Account\n|\nstr\n=\n...\n,\nfee\n:\nalgopy.UInt64\n|\nint\n=\n0\n,\nnote\n:\nalgopy.String\n|\nalgopy.Bytes\n|\nstr\n|\nbytes\n=\n...\n,\nrekey_to\n:\nalgopy.Account\n|\nstr\n=\n...\n,\n)\n\u2192\nNone\n\u00b6\nUpdates inner transaction parameter values\nsubmit\n(\n)\n\u2192\nalgopy.itxn._TResult_co\n\u00b6\nSubmits inner transaction parameters and returns the resulting inner transaction\nclass\nalgopy.itxn.\nPaymentInnerTransaction\n\u00b6\nPayment inner transaction\nproperty\namount\n:\nalgopy.UInt64\n\u00b6\nmicroalgos\nproperty\nclose_remainder_to\n:\nalgopy.Account\n\u00b6\n32 byte address\nproperty\nfee\n:\nalgopy.UInt64\n\u00b6\nmicroalgos\nproperty\nfirst_valid\n:\nalgopy.UInt64\n\u00b6\nround number\nproperty\nfirst_valid_time\n:\nalgopy.UInt64\n\u00b6\nUNIX timestamp of block before txn.FirstValid. Fails if negative\nproperty\ngroup_index\n:\nalgopy.UInt64\n\u00b6\nPosition of this transaction within an atomic transaction group.\nA stand-alone transaction is implicitly element 0 in a group of 1\nproperty\nlast_valid\n:\nalgopy.UInt64\n\u00b6\nround number\nproperty\nlease\n:\nalgopy.Bytes\n\u00b6\n32 byte lease value\nproperty\nnote\n:\nalgopy.Bytes\n\u00b6\nAny data up to 1024 bytes\nproperty\nreceiver\n:\nalgopy.Account\n\u00b6\n32 byte address\nproperty\nrekey_to\n:\nalgopy.Account\n\u00b6\n32 byte Sender\u2019s new AuthAddr\nproperty\nsender\n:\nalgopy.Account\n\u00b6\n32 byte address\nproperty\ntxn_id\n:\nalgopy.Bytes\n\u00b6\nThe computed ID for this transaction. 32 bytes.\nproperty\ntype\n:\nalgopy.TransactionType\n\u00b6\nTransaction type as integer\nproperty\ntype_bytes\n:\nalgopy.Bytes\n\u00b6\nTransaction type as bytes\nalgopy.itxn.\nsubmit_txns\n(\n_t1\n:\nalgopy.itxn._InnerTransaction\n[\nalgopy.itxn._T1\n]\n,\n_t2\n:\nalgopy.itxn._InnerTransaction\n[\nalgopy.itxn._T2\n]\n,\n_t3\n:\nalgopy.itxn._InnerTransaction\n[\nalgopy.itxn._T3\n]\n,\n_t4\n:\nalgopy.itxn._InnerTransaction\n[\nalgopy.itxn._T4\n]\n,\n_t5\n:\nalgopy.itxn._InnerTransaction\n[\nalgopy.itxn._T5\n]\n,\n_t6\n:\nalgopy.itxn._InnerTransaction\n[\nalgopy.itxn._T6\n]\n,\n_t7\n:\nalgopy.itxn._InnerTransaction\n[\nalgopy.itxn._T7\n]\n,\n_t8\n:\nalgopy.itxn._InnerTransaction\n[\nalgopy.itxn._T8\n]\n,\n_t9\n:\nalgopy.itxn._InnerTransaction\n[\nalgopy.itxn._T9\n]\n,\n_t10\n:\nalgopy.itxn._InnerTransaction\n[\nalgopy.itxn._T10\n]\n,\n_t11\n:\nalgopy.itxn._InnerTransaction\n[\nalgopy.itxn._T11\n]\n,\n_t12\n:\nalgopy.itxn._InnerTransaction\n[\nalgopy.itxn._T12\n]\n,\n_t13\n:\nalgopy.itxn._InnerTransaction\n[\nalgopy.itxn._T13\n]\n,\n_t14\n:\nalgopy.itxn._InnerTransaction\n[\nalgopy.itxn._T14\n]\n,\n_t15\n:\nalgopy.itxn._InnerTransaction\n[\nalgopy.itxn._T15\n]\n,\n_t16\n:\nalgopy.itxn._InnerTransaction\n[\nalgopy.itxn._T16\n]\n,\n\/\n,\n)\n\u2192\ntuple\n[\nalgopy.itxn._T1\n,\nalgopy.itxn._T2\n,\nalgopy.itxn._T3\n,\nalgopy.itxn._T4\n,\nalgopy.itxn._T5\n,\nalgopy.itxn._T6\n,\nalgopy.itxn._T7\n,\nalgopy.itxn._T8\n,\nalgopy.itxn._T9\n,\nalgopy.itxn._T10\n,\nalgopy.itxn._T11\n,\nalgopy.itxn._T12\n,\nalgopy.itxn._T13\n,\nalgopy.itxn._T14\n,\nalgopy.itxn._T15\n,\nalgopy.itxn._T16\n]\n\u00b6\nSubmits a group of up to 16 inner transactions parameters\nReturns\n:\nA tuple of the resulting inner transactions\nNext\nalgopy.op\nPrevious\nalgopy.gtxn\nCopyright \u00a9 2024, Algorand Foundation\nMade with\nSphinx\nand\n@pradyunsg\n's\nFuro"} {"question":"","answer":"Back to top\nView this page\nToggle Light \/ Dark \/ Auto color theme\nToggle table of contents sidebar\nalgopy.op\n\u00b6\nModule Contents\n\u00b6\nClasses\n\u00b6\nAcctParamsGet\nX is field F from account A. Y is 1 if A owns positive algos, else 0\nNative TEAL op:\nacct_params_get\nAppGlobal\nGet or modify Global app state\nNative TEAL ops:\napp_global_del\n,\napp_global_get\n,\napp_global_get_ex\n,\napp_global_put\nAppLocal\nGet or modify Local app state\nNative TEAL ops:\napp_local_del\n,\napp_local_get\n,\napp_local_get_ex\n,\napp_local_put\nAppParamsGet\nX is field F from app A. Y is 1 if A exists, else 0 params: Txn.ForeignApps offset or an\navailable\napp id. Return: did_exist flag (1 if the application existed and 0 otherwise), value.\nNative TEAL op:\napp_params_get\nAssetHoldingGet\nX is field F from account A\u2019s holding of asset B. Y is 1 if A is opted into B, else 0 params: Txn.Accounts offset (or, since v4, an\navailable\naddress), asset id (or, since v4, a Txn.ForeignAssets offset). Return: did_exist flag (1 if the asset existed and 0 otherwise), value.\nNative TEAL op:\nasset_holding_get\nAssetParamsGet\nX is field F from asset A. Y is 1 if A exists, else 0 params: Txn.ForeignAssets offset (or, since v4, an\navailable\nasset id. Return: did_exist flag (1 if the asset existed and 0 otherwise), value.\nNative TEAL op:\nasset_params_get\nBase64\nAvailable values for the\nbase64\nenum\nBlock\nfield F of block A. Fail unless A falls between txn.LastValid-1002 and txn.FirstValid (exclusive)\nNative TEAL op:\nblock\nBox\nGet or modify box state\nNative TEAL ops:\nbox_create\n,\nbox_del\n,\nbox_extract\n,\nbox_get\n,\nbox_len\n,\nbox_put\n,\nbox_replace\n,\nbox_resize\n,\nbox_splice\nEC\nAvailable values for the\nEC\nenum\nECDSA\nAvailable values for the\nECDSA\nenum\nEllipticCurve\nElliptic Curve functions\nNative TEAL ops:\nec_add\n,\nec_map_to\n,\nec_multi_scalar_mul\n,\nec_pairing_check\n,\nec_scalar_mul\n,\nec_subgroup_check\nGITxn\nGet values for inner transaction in the last group submitted\nNative TEAL ops:\ngitxn\n,\ngitxnas\nGTxn\nGet values for transactions in the current group\nNative TEAL ops:\ngtxns\n,\ngtxnsas\nGlobal\nGet Global values\nNative TEAL op:\nglobal\nITxn\nGet values for the last inner transaction\nNative TEAL ops:\nitxn\n,\nitxnas\nITxnCreate\nCreate inner transactions\nNative TEAL ops:\nitxn_begin\n,\nitxn_field\n,\nitxn_next\n,\nitxn_submit\nJsonRef\nkey B\u2019s value, of type R, from a\nvalid\nutf-8 encoded json object A\nWarning\n: Usage should be restricted to very rare use cases, as JSON decoding is expensive and quite limited. In addition, JSON objects are large and not optimized for size. Almost all smart contracts should use simpler and smaller methods (such as the\nABI\n. This opcode should only be used in cases where JSON is only available option, e.g. when a third-party only signs JSON.\nNative TEAL op:\njson_ref\nMiMCConfigurations\nAvailable values for the\nMimc\nConfigurations\nenum\nScratch\nLoad or store scratch values\nNative TEAL ops:\nloads\n,\nstores\nTxn\nGet values for the current executing transaction\nNative TEAL ops:\ntxn\n,\ntxnas\nVoterParamsGet\nX is field F from online account A as of the balance round: 320 rounds before the current round. Y is 1 if A had positive algos online in the agreement round, else Y is 0 and X is a type specific zero-value\nNative TEAL op:\nvoter_params_get\nVrfVerify\nAvailable values for the\nvrf_verify\nenum\nFunctions\n\u00b6\naddw\nA plus B as a 128-bit result. X is the carry-bit, Y is the low-order 64 bits.\napp_opted_in\n1 if account A is opted in to application B, else 0\nparams: Txn.Accounts offset (or, since v4, an\navailable\naccount address),\navailable\napplication id (or, since v4, a Txn.ForeignApps offset). Return: 1 if opted in and 0 otherwise.\narg\nAth LogicSig argument\nbalance\nbalance for account A, in microalgos. The balance is observed after the effects of previous transactions in the group, and after the fee for the current transaction is deducted. Changes caused by inner transactions are observable immediately following\nitxn_submit\nparams: Txn.Accounts offset (or, since v4, an\navailable\naccount address),\navailable\napplication id (or, since v4, a Txn.ForeignApps offset). Return: value.\nbase64_decode\ndecode A which was base64-encoded using\nencoding\nE. Fail if A is not base64 encoded with encoding E\nWarning\n: Usage should be restricted to very rare use cases. In almost all cases, smart contracts should directly handle non-encoded byte-strings. This opcode should only be used in cases where base64 is the only available option, e.g. interoperability with a third-party that only signs base64 strings.\nbitlen\nThe highest set bit in A. If A is a byte-array, it is interpreted as a big-endian unsigned integer. bitlen of 0 is 0, bitlen of 8 is 4\nbitlen interprets arrays as big-endian integers, unlike setbit\/getbit\nbsqrt\nThe largest integer I such that I^2 <= A. A and I are interpreted as big-endian unsigned integers\nbtoi\nconverts big-endian byte array A to uint64. Fails if len(A) > 8. Padded by leading 0s if len(A) < 8.\nbtoi\nfails if the input is longer than 8 bytes.\nbzero\nzero filled byte-array of length A\nconcat\njoin A and B\nconcat\nfails if the result would be greater than 4096 bytes.\ndivmodw\nW,X = (A,B \/ C,D); Y,Z = (A,B modulo C,D)\nThe notation J,K indicates that two uint64 values J and K are interpreted as a uint128 value, with J as the high uint64 and K the low.\ndivw\nA,B \/ C. Fail if C == 0 or if result overflows.\nThe notation A,B indicates that A and B are interpreted as a uint128 value, with A as the high uint64 and B the low.\necdsa_pk_decompress\ndecompress pubkey A into components X, Y\nThe 33 byte public key in a compressed form to be decompressed into X and Y (top) components. All values are big-endian encoded.\necdsa_pk_recover\nfor (data A, recovery id B, signature C, D) recover a public key\nS (top) and R elements of a signature, recovery id and data (bottom) are expected on the stack and used to deriver a public key. All values are big-endian encoded. The signed data must be 32 bytes long.\necdsa_verify\nfor (data A, signature B, C and pubkey D, E) verify the signature of the data against the pubkey => {0 or 1}\nThe 32 byte Y-component of a public key is the last element on the stack, preceded by X-component of a pubkey, preceded by S and R components of a signature, preceded by the data that is fifth element on the stack. All values are big-endian encoded. The signed data must be 32 bytes long, and signatures in lower-S form are only accepted.\ned25519verify\nfor (data A, signature B, pubkey C) verify the signature of (\u201cProgData\u201d || program_hash || data) against the pubkey => {0 or 1}\nThe 32 byte public key is the last element on the stack, preceded by the 64 byte signature at the second-to-last element on the stack, preceded by the data which was signed at the third-to-last element on the stack.\ned25519verify_bare\nfor (data A, signature B, pubkey C) verify the signature of the data against the pubkey => {0 or 1}\nerr\nFail immediately.\nexit\nuse A as success value; end\nexp\nA raised to the Bth power. Fail if A == B == 0 and on overflow\nexpw\nA raised to the Bth power as a 128-bit result in two uint64s. X is the high 64 bits, Y is the low. Fail if A == B == 0 or if the results exceeds 2^128-1\nextract\nA range of bytes from A starting at B up to but not including B+C. If B+C is larger than the array length, the program fails\nextract3\ncan be called using\nextract\nwith no immediates.\nextract_uint16\nA uint16 formed from a range of big-endian bytes from A starting at B up to but not including B+2. If B+2 is larger than the array length, the program fails\nextract_uint32\nA uint32 formed from a range of big-endian bytes from A starting at B up to but not including B+4. If B+4 is larger than the array length, the program fails\nextract_uint64\nA uint64 formed from a range of big-endian bytes from A starting at B up to but not including B+8. If B+8 is larger than the array length, the program fails\nfalcon_verify\nfor (data A, compressed-format signature B, pubkey C) verify the signature of data against the pubkey\nMin AVM version: 12\ngaid\nID of the asset or application created in the Ath transaction of the current group\ngaids\nfails unless the requested transaction created an asset or application and A < GroupIndex.\ngetbit\nBth bit of (byte-array or integer) A. If B is greater than or equal to the bit length of the value (8*byte length), the program fails\nsee explanation of bit ordering in setbit\ngetbyte\nBth byte of A, as an integer. If B is greater than or equal to the array length, the program fails\ngload_bytes\nBth scratch space value of the Ath transaction in the current group\ngload_uint64\nBth scratch space value of the Ath transaction in the current group\nitob\nconverts uint64 A to big-endian byte array, always of length 8\nkeccak256\nKeccak256 hash of value A, yields [32]byte\nmimc\nMiMC hash of scalars A, using curve and parameters specified by configuration C\nA is a list of concatenated 32 byte big-endian unsigned integer scalars. Fail if A\u2019s length is not a multiple of 32 or any element exceeds the curve modulus.\nmin_balance\nminimum required balance for account A, in microalgos. Required balance is affected by ASA, App, and Box usage. When creating or opting into an app, the minimum balance grows before the app code runs, therefore the increase is visible there. When deleting or closing out, the minimum balance decreases after the app executes. Changes caused by inner transactions or box usage are observable immediately following the opcode effecting the change.\nparams: Txn.Accounts offset (or, since v4, an\navailable\naccount address),\navailable\napplication id (or, since v4, a Txn.ForeignApps offset). Return: value.\nmulw\nA times B as a 128-bit result in two uint64s. X is the high 64 bits, Y is the low\nonline_stake\nthe total online stake in the agreement round\nMin AVM version: 11\nreplace\nCopy of A with the bytes starting at B replaced by the bytes of C. Fails if B+len(C) exceeds len(A)\nreplace3\ncan be called using\nreplace\nwith no immediates.\nselect_bytes\nselects one of two values based on top-of-stack: B if C != 0, else A\nselect_uint64\nselects one of two values based on top-of-stack: B if C != 0, else A\nsetbit_bytes\nCopy of (byte-array or integer) A, with the Bth bit set to (0 or 1) C. If B is greater than or equal to the bit length of the value (8*byte length), the program fails\nWhen A is a uint64, index 0 is the least significant bit. Setting bit 3 to 1 on the integer 0 yields 8, or 2^3. When A is a byte array, index 0 is the leftmost bit of the leftmost byte. Setting bits 0 through 11 to 1 in a 4-byte-array of 0s yields the byte array 0xfff00000. Setting bit 3 to 1 on the 1-byte-array 0x00 yields the byte array 0x10.\nsetbit_uint64\nCopy of (byte-array or integer) A, with the Bth bit set to (0 or 1) C. If B is greater than or equal to the bit length of the value (8*byte length), the program fails\nWhen A is a uint64, index 0 is the least significant bit. Setting bit 3 to 1 on the integer 0 yields 8, or 2^3. When A is a byte array, index 0 is the leftmost bit of the leftmost byte. Setting bits 0 through 11 to 1 in a 4-byte-array of 0s yields the byte array 0xfff00000. Setting bit 3 to 1 on the 1-byte-array 0x00 yields the byte array 0x10.\nsetbyte\nCopy of A with the Bth byte set to small integer (between 0..255) C. If B is greater than or equal to the array length, the program fails\nsha256\nSHA256 hash of value A, yields [32]byte\nsha3_256\nSHA3_256 hash of value A, yields [32]byte\nsha512_256\nSHA512_256 hash of value A, yields [32]byte\nshl\nA times 2^B, modulo 2^64\nshr\nA divided by 2^B\nsqrt\nThe largest integer I such that I^2 <= A\nsubstring\nA range of bytes from A starting at B up to but not including C. If C < B, or either is larger than the array length, the program fails\nsumhash512\nsumhash512 of value A, yields [64]byte\nMin AVM version: 12\nvrf_verify\nVerify the proof B of message A against pubkey C. Returns vrf output and verification flag.\nVrfAlgorand\nis the VRF used in Algorand. It is ECVRF-ED25519-SHA512-Elligator2, specified in the IETF internet draft\ndraft-irtf-cfrg-vrf-03\n.\nAPI\n\u00b6\nclass\nalgopy.op.\nAcctParamsGet\n\u00b6\nX is field F from account A. Y is 1 if A owns positive algos, else 0\nNative TEAL op:\nacct_params_get\nstatic\nacct_auth_addr\n(\na\n:\nalgopy.Account\n|\nalgopy.UInt64\n|\nint\n,\n\/\n,\n)\n\u2192\ntuple\n[\nalgopy.Account\n,\nbool\n]\n\u00b6\nAddress the account is rekeyed to.\nNative TEAL opcode:\nacct_params_get\nstatic\nacct_balance\n(\na\n:\nalgopy.Account\n|\nalgopy.UInt64\n|\nint\n,\n\/\n,\n)\n\u2192\ntuple\n[\nalgopy.UInt64\n,\nbool\n]\n\u00b6\nAccount balance in microalgos\nNative TEAL opcode:\nacct_params_get\nstatic\nacct_incentive_eligible\n(\na\n:\nalgopy.Account\n|\nalgopy.UInt64\n|\nint\n,\n\/\n,\n)\n\u2192\ntuple\n[\nbool\n,\nbool\n]\n\u00b6\nMin AVM version: 11\nReturns tuple[bool, bool]\n:\nHas this account opted into block payouts\nNative TEAL opcode:\nacct_params_get\nstatic\nacct_last_heartbeat\n(\na\n:\nalgopy.Account\n|\nalgopy.UInt64\n|\nint\n,\n\/\n,\n)\n\u2192\ntuple\n[\nalgopy.UInt64\n,\nbool\n]\n\u00b6\nMin AVM version: 11\nReturns tuple[UInt64, bool]\n:\nThe round number of the last block this account sent a heartbeat.\nNative TEAL opcode:\nacct_params_get\nstatic\nacct_last_proposed\n(\na\n:\nalgopy.Account\n|\nalgopy.UInt64\n|\nint\n,\n\/\n,\n)\n\u2192\ntuple\n[\nalgopy.UInt64\n,\nbool\n]\n\u00b6\nMin AVM version: 11\nReturns tuple[UInt64, bool]\n:\nThe round number of the last block this account proposed.\nNative TEAL opcode:\nacct_params_get\nstatic\nacct_min_balance\n(\na\n:\nalgopy.Account\n|\nalgopy.UInt64\n|\nint\n,\n\/\n,\n)\n\u2192\ntuple\n[\nalgopy.UInt64\n,\nbool\n]\n\u00b6\nMinimum required balance for account, in microalgos\nNative TEAL opcode:\nacct_params_get\nstatic\nacct_total_apps_created\n(\na\n:\nalgopy.Account\n|\nalgopy.UInt64\n|\nint\n,\n\/\n,\n)\n\u2192\ntuple\n[\nalgopy.UInt64\n,\nbool\n]\n\u00b6\nThe number of existing apps created by this account.\nNative TEAL opcode:\nacct_params_get\nstatic\nacct_total_apps_opted_in\n(\na\n:\nalgopy.Account\n|\nalgopy.UInt64\n|\nint\n,\n\/\n,\n)\n\u2192\ntuple\n[\nalgopy.UInt64\n,\nbool\n]\n\u00b6\nThe number of apps this account is opted into.\nNative TEAL opcode:\nacct_params_get\nstatic\nacct_total_assets\n(\na\n:\nalgopy.Account\n|\nalgopy.UInt64\n|\nint\n,\n\/\n,\n)\n\u2192\ntuple\n[\nalgopy.UInt64\n,\nbool\n]\n\u00b6\nThe numbers of ASAs held by this account (including ASAs this account created).\nNative TEAL opcode:\nacct_params_get\nstatic\nacct_total_assets_created\n(\na\n:\nalgopy.Account\n|\nalgopy.UInt64\n|\nint\n,\n\/\n,\n)\n\u2192\ntuple\n[\nalgopy.UInt64\n,\nbool\n]\n\u00b6\nThe number of existing ASAs created by this account.\nNative TEAL opcode:\nacct_params_get\nstatic\nacct_total_box_bytes\n(\na\n:\nalgopy.Account\n|\nalgopy.UInt64\n|\nint\n,\n\/\n,\n)\n\u2192\ntuple\n[\nalgopy.UInt64\n,\nbool\n]\n\u00b6\nThe total number of bytes used by this account\u2019s app\u2019s box keys and values.\nNative TEAL opcode:\nacct_params_get\nstatic\nacct_total_boxes\n(\na\n:\nalgopy.Account\n|\nalgopy.UInt64\n|\nint\n,\n\/\n,\n)\n\u2192\ntuple\n[\nalgopy.UInt64\n,\nbool\n]\n\u00b6\nThe number of existing boxes created by this account\u2019s app.\nNative TEAL opcode:\nacct_params_get\nstatic\nacct_total_extra_app_pages\n(\na\n:\nalgopy.Account\n|\nalgopy.UInt64\n|\nint\n,\n\/\n,\n)\n\u2192\ntuple\n[\nalgopy.UInt64\n,\nbool\n]\n\u00b6\nThe number of extra app code pages used by this account.\nNative TEAL opcode:\nacct_params_get\nstatic\nacct_total_num_byte_slice\n(\na\n:\nalgopy.Account\n|\nalgopy.UInt64\n|\nint\n,\n\/\n,\n)\n\u2192\ntuple\n[\nalgopy.UInt64\n,\nbool\n]\n\u00b6\nThe total number of byte array values allocated by this account in Global and Local States.\nNative TEAL opcode:\nacct_params_get\nstatic\nacct_total_num_uint\n(\na\n:\nalgopy.Account\n|\nalgopy.UInt64\n|\nint\n,\n\/\n,\n)\n\u2192\ntuple\n[\nalgopy.UInt64\n,\nbool\n]\n\u00b6\nThe total number of uint64 values allocated by this account in Global and Local States.\nNative TEAL opcode:\nacct_params_get\nclass\nalgopy.op.\nAppGlobal\n\u00b6\nGet or modify Global app state\nNative TEAL ops:\napp_global_del\n,\napp_global_get\n,\napp_global_get_ex\n,\napp_global_put\nstatic\ndelete\n(\na\n:\nalgopy.Bytes\n|\nbytes\n,\n\/\n)\n\u2192\nNone\n\u00b6\ndelete key A from the global state of the current application\nparams: state key.\nDeleting a key which is already absent has no effect on the application global state. (In particular, it does\nnot\ncause the program to fail.)\nNative TEAL opcode:\napp_global_del\nstatic\nget_bytes\n(\na\n:\nalgopy.Bytes\n|\nbytes\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nglobal state of the key A in the current application\nparams: state key. Return: value. The value is zero (of type uint64) if the key does not exist.\nNative TEAL opcode:\napp_global_get\nstatic\nget_ex_bytes\n(\na\n:\nalgopy.Application\n|\nalgopy.UInt64\n|\nint\n,\nb\n:\nalgopy.Bytes\n|\nbytes\n,\n\/\n,\n)\n\u2192\ntuple\n[\nalgopy.Bytes\n,\nbool\n]\n\u00b6\nX is the global state of application A, key B. Y is 1 if key existed, else 0\nparams: Txn.ForeignApps offset (or, since v4, an\navailable\napplication id), state key. Return: did_exist flag (top of the stack, 1 if the application and key existed and 0 otherwise), value. The value is zero (of type uint64) if the key does not exist.\nNative TEAL opcode:\napp_global_get_ex\nstatic\nget_ex_uint64\n(\na\n:\nalgopy.Application\n|\nalgopy.UInt64\n|\nint\n,\nb\n:\nalgopy.Bytes\n|\nbytes\n,\n\/\n,\n)\n\u2192\ntuple\n[\nalgopy.UInt64\n,\nbool\n]\n\u00b6\nX is the global state of application A, key B. Y is 1 if key existed, else 0\nparams: Txn.ForeignApps offset (or, since v4, an\navailable\napplication id), state key. Return: did_exist flag (top of the stack, 1 if the application and key existed and 0 otherwise), value. The value is zero (of type uint64) if the key does not exist.\nNative TEAL opcode:\napp_global_get_ex\nstatic\nget_uint64\n(\na\n:\nalgopy.Bytes\n|\nbytes\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nglobal state of the key A in the current application\nparams: state key. Return: value. The value is zero (of type uint64) if the key does not exist.\nNative TEAL opcode:\napp_global_get\nstatic\nput\n(\na\n:\nalgopy.Bytes\n|\nbytes\n,\nb\n:\nalgopy.Bytes\n|\nalgopy.UInt64\n|\nbytes\n|\nint\n,\n\/\n,\n)\n\u2192\nNone\n\u00b6\nwrite B to key A in the global state of the current application\nNative TEAL opcode:\napp_global_put\nclass\nalgopy.op.\nAppLocal\n\u00b6\nGet or modify Local app state\nNative TEAL ops:\napp_local_del\n,\napp_local_get\n,\napp_local_get_ex\n,\napp_local_put\nstatic\ndelete\n(\na\n:\nalgopy.Account\n|\nalgopy.UInt64\n|\nint\n,\nb\n:\nalgopy.Bytes\n|\nbytes\n,\n\/\n,\n)\n\u2192\nNone\n\u00b6\ndelete key B from account A\u2019s local state of the current application\nparams: Txn.Accounts offset (or, since v4, an\navailable\naccount address), state key.\nDeleting a key which is already absent has no effect on the application local state. (In particular, it does\nnot\ncause the program to fail.)\nNative TEAL opcode:\napp_local_del\nstatic\nget_bytes\n(\na\n:\nalgopy.Account\n|\nalgopy.UInt64\n|\nint\n,\nb\n:\nalgopy.Bytes\n|\nbytes\n,\n\/\n,\n)\n\u2192\nalgopy.Bytes\n\u00b6\nlocal state of the key B in the current application in account A\nparams: Txn.Accounts offset (or, since v4, an\navailable\naccount address), state key. Return: value. The value is zero (of type uint64) if the key does not exist.\nNative TEAL opcode:\napp_local_get\nstatic\nget_ex_bytes\n(\na\n:\nalgopy.Account\n|\nalgopy.UInt64\n|\nint\n,\nb\n:\nalgopy.Application\n|\nalgopy.UInt64\n|\nint\n,\nc\n:\nalgopy.Bytes\n|\nbytes\n,\n\/\n,\n)\n\u2192\ntuple\n[\nalgopy.Bytes\n,\nbool\n]\n\u00b6\nX is the local state of application B, key C in account A. Y is 1 if key existed, else 0\nparams: Txn.Accounts offset (or, since v4, an\navailable\naccount address),\navailable\napplication id (or, since v4, a Txn.ForeignApps offset), state key. Return: did_exist flag (top of the stack, 1 if the application and key existed and 0 otherwise), value. The value is zero (of type uint64) if the key does not exist.\nNative TEAL opcode:\napp_local_get_ex\nstatic\nget_ex_uint64\n(\na\n:\nalgopy.Account\n|\nalgopy.UInt64\n|\nint\n,\nb\n:\nalgopy.Application\n|\nalgopy.UInt64\n|\nint\n,\nc\n:\nalgopy.Bytes\n|\nbytes\n,\n\/\n,\n)\n\u2192\ntuple\n[\nalgopy.UInt64\n,\nbool\n]\n\u00b6\nX is the local state of application B, key C in account A. Y is 1 if key existed, else 0\nparams: Txn.Accounts offset (or, since v4, an\navailable\naccount address),\navailable\napplication id (or, since v4, a Txn.ForeignApps offset), state key. Return: did_exist flag (top of the stack, 1 if the application and key existed and 0 otherwise), value. The value is zero (of type uint64) if the key does not exist.\nNative TEAL opcode:\napp_local_get_ex\nstatic\nget_uint64\n(\na\n:\nalgopy.Account\n|\nalgopy.UInt64\n|\nint\n,\nb\n:\nalgopy.Bytes\n|\nbytes\n,\n\/\n,\n)\n\u2192\nalgopy.UInt64\n\u00b6\nlocal state of the key B in the current application in account A\nparams: Txn.Accounts offset (or, since v4, an\navailable\naccount address), state key. Return: value. The value is zero (of type uint64) if the key does not exist.\nNative TEAL opcode:\napp_local_get\nstatic\nput\n(\na\n:\nalgopy.Account\n|\nalgopy.UInt64\n|\nint\n,\nb\n:\nalgopy.Bytes\n|\nbytes\n,\nc\n:\nalgopy.Bytes\n|\nalgopy.UInt64\n|\nbytes\n|\nint\n,\n\/\n,\n)\n\u2192\nNone\n\u00b6\nwrite C to key B in account A\u2019s local state of the current application\nparams: Txn.Accounts offset (or, since v4, an\navailable\naccount address), state key, value.\nNative TEAL opcode:\napp_local_put\nclass\nalgopy.op.\nAppParamsGet\n\u00b6\nX is field F from app A. Y is 1 if A exists, else 0 params: Txn.ForeignApps offset or an\navailable\napp id. Return: did_exist flag (1 if the application existed and 0 otherwise), value.\nNative TEAL op:\napp_params_get\nstatic\napp_address\n(\na\n:\nalgopy.Application\n|\nalgopy.UInt64\n|\nint\n,\n\/\n,\n)\n\u2192\ntuple\n[\nalgopy.Account\n,\nbool\n]\n\u00b6\nAddress for which this application has authority\nNative TEAL opcode:\napp_params_get\nstatic\napp_approval_program\n(\na\n:\nalgopy.Application\n|\nalgopy.UInt64\n|\nint\n,\n\/\n,\n)\n\u2192\ntuple\n[\nalgopy.Bytes\n,\nbool\n]\n\u00b6\nBytecode of Approval Program\nNative TEAL opcode:\napp_params_get\nstatic\napp_clear_state_program\n(\na\n:\nalgopy.Application\n|\nalgopy.UInt64\n|\nint\n,\n\/\n,\n)\n\u2192\ntuple\n[\nalgopy.Bytes\n,\nbool\n]\n\u00b6\nBytecode of Clear State Program\nNative TEAL opcode:\napp_params_get\nstatic\napp_creator\n(\na\n:\nalgopy.Application\n|\nalgopy.UInt64\n|\nint\n,\n\/\n,\n)\n\u2192\ntuple\n[\nalgopy.Account\n,\nbool\n]\n\u00b6\nCreator address\nNative TEAL opcode:\napp_params_get\nstatic\napp_extra_program_pages\n(\na\n:\nalgopy.Application\n|\nalgopy.UInt64\n|\nint\n,\n\/\n,\n)\n\u2192\ntuple\n[\nalgopy.UInt64\n,\nbool\n]\n\u00b6\nNumber of Extra Program Pages of code space\nNative TEAL opcode:\napp_params_get\nstatic\napp_global_num_byte_slice\n(\na\n:\nalgopy.Application\n|\nalgopy.UInt64\n|\nint\n,\n\/\n,\n)\n\u2192\ntuple\n[\nalgopy.UInt64\n,\nbool\n]\n\u00b6\nNumber of byte array values allowed in Global State\nNative TEAL opcode:\napp_params_get\nstatic\napp_global_num_uint\n(\na\n:\nalgopy.Application\n|\nalgopy.UInt64\n|\nint\n,\n\/\n,\n)\n\u2192\ntuple\n[\nalgopy.UInt64\n,\nbool\n]\n\u00b6\nNumber of uint64 values allowed in Global State\nNative TEAL opcode:\napp_params_get\nstatic\napp_local_num_byte_slice\n(\na\n:\nalgopy.Application\n|\nalgopy.UInt64\n|\nint\n,\n\/\n,\n)\n\u2192\ntuple\n[\nalgopy.UInt64\n,\nbool\n]\n\u00b6\nNumber of byte array values allowed in Local State\nNative TEAL opcode:\napp_params_get\nstatic\napp_local_num_uint\n(\na\n:\nalgopy.Application\n|\nalgopy.UInt64\n|\nint\n,\n\/\n,\n)\n\u2192\ntuple\n[\nalgopy.UInt64\n,\nbool\n]\n\u00b6\nNumber of uint64 values allowed in Local State\nNative TEAL opcode:\napp_params_get\nclass\nalgopy.op.\nAssetHoldingGet\n\u00b6\nX is field F from account A\u2019s holding of asset B. Y is 1 if A is opted into B, else 0 params: Txn.Accounts offset (or, since v4, an\navailable\naddress), asset id (or, since v4, a Txn.ForeignAssets offset). Return: did_exist flag (1 if the asset existed and 0 otherwise), value.\nNative TEAL op:\nasset_holding_get\nstatic\nasset_balance\n(\na\n:\nalgopy.Account\n|\nalgopy.UInt64\n|\nint\n,\nb\n:\nalgopy.Asset\n|\nalgopy.UInt64\n|\nint\n,\n\/\n,\n)\n\u2192\ntuple\n[\nalgopy.UInt64\n,\nbool\n]\n\u00b6\nAmount of the asset unit held by this account\nNative TEAL opcode:\nasset_holding_get\nstatic\nasset_frozen\n(\na\n:\nalgopy.Account\n|\nalgopy.UInt64\n|\nint\n,\nb\n:\nalgopy.Asset\n|\nalgopy.UInt64\n|\nint\n,\n\/\n,\n)\n\u2192\ntuple\n[\nbool\n,\nbool\n]\n\u00b6\nIs the asset frozen or not\nNative TEAL opcode:\nasset_holding_get\nclass\nalgopy.op.\nAssetParamsGet\n\u00b6\nX is field F from asset A. Y is 1 if A exists, else 0 params: Txn.ForeignAssets offset (or, since v4, an\navailable\nasset id. Return: did_exist flag (1 if the asset existed and 0 otherwise), value.\nNative TEAL op:\nasset_params_get\nstatic\nasset_clawback\n(\na\n:\nalgopy.Asset\n|\nalgopy.UInt64\n|\nint\n,\n\/\n,\n)\n\u2192\ntuple\n[\nalgopy.Account\n,\nbool\n]\n\u00b6\nClawback address\nNative TEAL opcode:\nasset_params_get\nstatic\nasset_creator\n(\na\n:\nalgopy.Asset\n|\nalgopy.UInt64\n|\nint\n,\n\/\n,\n)\n\u2192\ntuple\n[\nalgopy.Account\n,\nbool\n]\n\u00b6\nCreator address\nNative TEAL opcode:\nasset_params_get\nstatic\nasset_decimals\n(\na\n:\nalgopy.Asset\n|\nalgopy.UInt64\n|\nint\n,\n\/\n,\n)\n\u2192\ntuple\n[\nalgopy.UInt64\n,\nbool\n]\n\u00b6\nSee AssetParams.Decimals\nNative TEAL opcode:\nasset_params_get\nstatic\nasset_default_frozen\n(\na\n:\nalgopy.Asset\n|\nalgopy.UInt64\n|\nint\n,\n\/\n,\n)\n\u2192\ntuple\n[\nbool\n,\nbool\n]\n\u00b6\nFrozen by default or not\nNative TEAL opcode:\nasset_params_get\nstatic\nasset_freeze\n(\na\n:\nalgopy.Asset\n|\nalgopy.UInt64\n|\nint\n,\n\/\n,\n)\n\u2192\ntuple\n[\nalgopy.Account\n,\nbool\n]\n\u00b6\nFreeze address\nNative TEAL opcode:\nasset_params_get\nstatic\nasset_manager\n(\na\n:\nalgopy.Asset\n|\nalgopy.UInt64\n|\nint\n,\n\/\n,\n)\n\u2192\ntuple\n[\nalgopy.Account\n,\nbool\n]\n\u00b6\nManager address\nNative TEAL opcode:\nasset_params_get\nstatic\nasset_metadata_hash\n(\na\n:\nalgopy.Asset\n|\nalgopy.UInt64\n|\nint\n,\n\/\n,\n)\n\u2192\ntuple\n[\nalgopy.Bytes\n,\nbool\n]\n\u00b6\nArbitrary commitment\nNative TEAL opcode:\nasset_params_get\nstatic\nasset_name\n(\na\n:\nalgopy.Asset\n|\nalgopy.UInt64\n|\nint\n,\n\/\n,\n)\n\u2192\ntuple\n[\nalgopy.Bytes\n,\nbool\n]\n\u00b6\nAsset name\nNative TEAL opcode:\nasset_params_get\nstatic\nasset_reserve\n(\na\n:\nalgopy.Asset\n|\nalgopy.UInt64\n|\nint\n,\n\/\n,\n)\n\u2192\ntuple\n[\nalgopy.Account\n,\nbool\n]\n\u00b6\nReserve address\nNative TEAL opcode:\nasset_params_get\nstatic\nasset_total\n(\na\n:\nalgopy.Asset\n|\nalgopy.UInt64\n|\nint\n,\n\/\n,\n)\n\u2192\ntuple\n[\nalgopy.UInt64\n,\nbool\n]\n\u00b6\nTotal number of units of this asset\nNative TEAL opcode:\nasset_params_get\nstatic\nasset_unit_name\n(\na\n:\nalgopy.Asset\n|\nalgopy.UInt64\n|\nint\n,\n\/\n,\n)\n\u2192\ntuple\n[\nalgopy.Bytes\n,\nbool\n]\n\u00b6\nAsset unit name\nNative TEAL opcode:\nasset_params_get\nstatic\nasset_url\n(\na\n:\nalgopy.Asset\n|\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\ntuple\n[\nalgopy.Bytes\n,\nbool\n]\n\u00b6\nURL with additional info about the asset\nNative TEAL opcode:\nasset_params_get\nclass\nalgopy.op.\nBase64\n\u00b6\nAvailable values for the\nbase64\nenum\nInitialization\nInitialize self. See help(type(self)) for accurate signature.\n__add__\n(\n)\n\u00b6\nReturn self+value.\n__contains__\n(\n)\n\u00b6\nReturn bool(key in self).\n__delattr__\n(\n)\n\u00b6\nImplement delattr(self, name).\n__dir__\n(\n)\n\u00b6\nDefault dir() implementation.\n__eq__\n(\n)\n\u00b6\nReturn self==value.\n__format__\n(\n)\n\u00b6\nReturn a formatted version of the string as described by format_spec.\n__ge__\n(\n)\n\u00b6\nReturn self>=value.\n__getattribute__\n(\n)\n\u00b6\nReturn getattr(self, name).\n__getitem__\n(\n)\n\u00b6\nReturn self[key].\n__getstate__\n(\n)\n\u00b6\nHelper for pickle.\n__gt__\n(\n)\n\u00b6\nReturn self>value.\n__hash__\n(\n)\n\u00b6\nReturn hash(self).\n__iter__\n(\n)\n\u00b6\nImplement iter(self).\n__le__\n(\n)\n\u00b6\nReturn self<=value.\n__len__\n(\n)\n\u00b6\nReturn len(self).\n__lt__\n(\n)\n\u00b6\nReturn self int\nReturn the number of non-overlapping occurrences of substring sub in\nstring S[start:end]. Optional arguments start and end are\ninterpreted as in slice notation.\nencode\n(\n)\n\u00b6\nEncode the string using the codec registered for encoding.\nencoding\nThe encoding in which to encode the string.\nerrors\nThe error handling scheme to use for encoding errors.\nThe default is \u2018strict\u2019 meaning that encoding errors raise a\nUnicodeEncodeError. Other possible values are \u2018ignore\u2019, \u2018replace\u2019 and\n\u2018xmlcharrefreplace\u2019 as well as any other name registered with\ncodecs.register_error that can handle UnicodeEncodeErrors.\nendswith\n(\n)\n\u00b6\nS.endswith(suffix[, start[, end]]) -> bool\nReturn True if S ends with the specified suffix, False otherwise.\nWith optional start, test S beginning at that position.\nWith optional end, stop comparing S at that position.\nsuffix can also be a tuple of strings to try.\nexpandtabs\n(\n)\n\u00b6\nReturn a copy where all tab characters are expanded using spaces.\nIf tabsize is not given, a tab size of 8 characters is assumed.\nfind\n(\n)\n\u00b6\nS.find(sub[, start[, end]]) -> int\nReturn the lowest index in S where substring sub is found,\nsuch that sub is contained within S[start:end]. Optional\narguments start and end are interpreted as in slice notation.\nReturn -1 on failure.\nformat\n(\n)\n\u00b6\nS.format(*args, **kwargs) -> str\nReturn a formatted version of S, using substitutions from args and kwargs.\nThe substitutions are identified by braces (\u2018{\u2019 and \u2018}\u2019).\nformat_map\n(\n)\n\u00b6\nS.format_map(mapping) -> str\nReturn a formatted version of S, using substitutions from mapping.\nThe substitutions are identified by braces (\u2018{\u2019 and \u2018}\u2019).\nindex\n(\n)\n\u00b6\nS.index(sub[, start[, end]]) -> int\nReturn the lowest index in S where substring sub is found,\nsuch that sub is contained within S[start:end]. Optional\narguments start and end are interpreted as in slice notation.\nRaises ValueError when the substring is not found.\nisalnum\n(\n)\n\u00b6\nReturn True if the string is an alpha-numeric string, False otherwise.\nA string is alpha-numeric if all characters in the string are alpha-numeric and\nthere is at least one character in the string.\nisalpha\n(\n)\n\u00b6\nReturn True if the string is an alphabetic string, False otherwise.\nA string is alphabetic if all characters in the string are alphabetic and there\nis at least one character in the string.\nisascii\n(\n)\n\u00b6\nReturn True if all characters in the string are ASCII, False otherwise.\nASCII characters have code points in the range U+0000-U+007F.\nEmpty string is ASCII too.\nisdecimal\n(\n)\n\u00b6\nReturn True if the string is a decimal string, False otherwise.\nA string is a decimal string if all characters in the string are decimal and\nthere is at least one character in the string.\nisdigit\n(\n)\n\u00b6\nReturn True if the string is a digit string, False otherwise.\nA string is a digit string if all characters in the string are digits and there\nis at least one character in the string.\nisidentifier\n(\n)\n\u00b6\nReturn True if the string is a valid Python identifier, False otherwise.\nCall keyword.iskeyword(s) to test whether string s is a reserved identifier,\nsuch as \u201cdef\u201d or \u201cclass\u201d.\nislower\n(\n)\n\u00b6\nReturn True if the string is a lowercase string, False otherwise.\nA string is lowercase if all cased characters in the string are lowercase and\nthere is at least one cased character in the string.\nisnumeric\n(\n)\n\u00b6\nReturn True if the string is a numeric string, False otherwise.\nA string is numeric if all characters in the string are numeric and there is at\nleast one character in the string.\nisprintable\n(\n)\n\u00b6\nReturn True if the string is printable, False otherwise.\nA string is printable if all of its characters are considered printable in\nrepr() or if it is empty.\nisspace\n(\n)\n\u00b6\nReturn True if the string is a whitespace string, False otherwise.\nA string is whitespace if all characters in the string are whitespace and there\nis at least one character in the string.\nistitle\n(\n)\n\u00b6\nReturn True if the string is a title-cased string, False otherwise.\nIn a title-cased string, upper- and title-case characters may only\nfollow uncased characters and lowercase characters only cased ones.\nisupper\n(\n)\n\u00b6\nReturn True if the string is an uppercase string, False otherwise.\nA string is uppercase if all cased characters in the string are uppercase and\nthere is at least one cased character in the string.\njoin\n(\n)\n\u00b6\nConcatenate any number of strings.\nThe string whose method is called is inserted in between each given string.\nThe result is returned as a new string.\nExample: \u2018.\u2019.join([\u2018ab\u2019, \u2018pq\u2019, \u2018rs\u2019]) -> \u2018ab.pq.rs\u2019\nljust\n(\n)\n\u00b6\nReturn a left-justified string of length width.\nPadding is done using the specified fill character (default is a space).\nlower\n(\n)\n\u00b6\nReturn a copy of the string converted to lowercase.\nlstrip\n(\n)\n\u00b6\nReturn a copy of the string with leading whitespace removed.\nIf chars is given and not None, remove characters in chars instead.\npartition\n(\n)\n\u00b6\nPartition the string into three parts using the given separator.\nThis will search for the separator in the string. If the separator is found,\nreturns a 3-tuple containing the part before the separator, the separator\nitself, and the part after it.\nIf the separator is not found, returns a 3-tuple containing the original string\nand two empty strings.\nremoveprefix\n(\n)\n\u00b6\nReturn a str with the given prefix string removed if present.\nIf the string starts with the prefix string, return string[len(prefix):].\nOtherwise, return a copy of the original string.\nremovesuffix\n(\n)\n\u00b6\nReturn a str with the given suffix string removed if present.\nIf the string ends with the suffix string and that suffix is not empty,\nreturn string[:-len(suffix)]. Otherwise, return a copy of the original\nstring.\nreplace\n(\n)\n\u00b6\nReturn a copy with all occurrences of substring old replaced by new.\ncount\nMaximum number of occurrences to replace.\n-1 (the default value) means replace all occurrences.\nIf the optional argument count is given, only the first count occurrences are\nreplaced.\nrfind\n(\n)\n\u00b6\nS.rfind(sub[, start[, end]]) -> int\nReturn the highest index in S where substring sub is found,\nsuch that sub is contained within S[start:end]. Optional\narguments start and end are interpreted as in slice notation.\nReturn -1 on failure.\nrindex\n(\n)\n\u00b6\nS.rindex(sub[, start[, end]]) -> int\nReturn the highest index in S where substring sub is found,\nsuch that sub is contained within S[start:end]. Optional\narguments start and end are interpreted as in slice notation.\nRaises ValueError when the substring is not found.\nrjust\n(\n)\n\u00b6\nReturn a right-justified string of length width.\nPadding is done using the specified fill character (default is a space).\nrpartition\n(\n)\n\u00b6\nPartition the string into three parts using the given separator.\nThis will search for the separator in the string, starting at the end. If\nthe separator is found, returns a 3-tuple containing the part before the\nseparator, the separator itself, and the part after it.\nIf the separator is not found, returns a 3-tuple containing two empty strings\nand the original string.\nrsplit\n(\n)\n\u00b6\nReturn a list of the substrings in the string, using sep as the separator string.\nsep\nThe separator used to split the string.\nWhen set to None (the default value), will split on any whitespace\ncharacter (including \\n \\r \\t \\f and spaces) and will discard\nempty strings from the result.\nmaxsplit\nMaximum number of splits.\n-1 (the default value) means no limit.\nSplitting starts at the end of the string and works to the front.\nrstrip\n(\n)\n\u00b6\nReturn a copy of the string with trailing whitespace removed.\nIf chars is given and not None, remove characters in chars instead.\nsplit\n(\n)\n\u00b6\nReturn a list of the substrings in the string, using sep as the separator string.\nsep\nThe separator used to split the string.\nWhen set to None (the default value), will split on any whitespace\ncharacter (including \\n \\r \\t \\f and spaces) and will discard\nempty strings from the result.\nmaxsplit\nMaximum number of splits.\n-1 (the default value) means no limit.\nSplitting starts at the front of the string and works to the end.\nNote, str.split() is mainly useful for data that has been intentionally\ndelimited. With natural text that includes punctuation, consider using\nthe regular expression module.\nsplitlines\n(\n)\n\u00b6\nReturn a list of the lines in the string, breaking at line boundaries.\nLine breaks are not included in the resulting list unless keepends is given and\ntrue.\nstartswith\n(\n)\n\u00b6\nS.startswith(prefix[, start[, end]]) -> bool\nReturn True if S starts with the specified prefix, False otherwise.\nWith optional start, test S beginning at that position.\nWith optional end, stop comparing S at that position.\nprefix can also be a tuple of strings to try.\nstrip\n(\n)\n\u00b6\nReturn a copy of the string with leading and trailing whitespace removed.\nIf chars is given and not None, remove characters in chars instead.\nswapcase\n(\n)\n\u00b6\nConvert uppercase characters to lowercase and lowercase characters to uppercase.\ntitle\n(\n)\n\u00b6\nReturn a version of the string where each word is titlecased.\nMore specifically, words start with uppercased characters and all remaining\ncased characters have lower case.\ntranslate\n(\n)\n\u00b6\nReplace each character in the string using the given translation table.\ntable\nTranslation table, which must be a mapping of Unicode ordinals to\nUnicode ordinals, strings, or None.\nThe table must implement lookup\/indexing via\ngetitem\n, for instance a\ndictionary or list. If this operation raises LookupError, the character is\nleft untouched. Characters mapped to None are deleted.\nupper\n(\n)\n\u00b6\nReturn a copy of the string converted to uppercase.\nzfill\n(\n)\n\u00b6\nPad a numeric string with zeros on the left, to fill a field of the given width.\nThe string is never truncated.\nclass\nalgopy.op.\nBlock\n\u00b6\nfield F of block A. Fail unless A falls between txn.LastValid-1002 and txn.FirstValid (exclusive)\nNative TEAL op:\nblock\nstatic\nblk_bonus\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nMin AVM version: 11\nNative TEAL opcode:\nblock\nstatic\nblk_branch\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nMin AVM version: 11\nNative TEAL opcode:\nblock\nstatic\nblk_fee_sink\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Account\n\u00b6\nMin AVM version: 11\nNative TEAL opcode:\nblock\nstatic\nblk_fees_collected\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nMin AVM version: 11\nNative TEAL opcode:\nblock\nstatic\nblk_proposer\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Account\n\u00b6\nMin AVM version: 11\nNative TEAL opcode:\nblock\nstatic\nblk_proposer_payout\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nMin AVM version: 11\nNative TEAL opcode:\nblock\nstatic\nblk_protocol\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nMin AVM version: 11\nNative TEAL opcode:\nblock\nstatic\nblk_seed\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nNative TEAL opcode:\nblock\nstatic\nblk_timestamp\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nNative TEAL opcode:\nblock\nstatic\nblk_txn_counter\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nMin AVM version: 11\nNative TEAL opcode:\nblock\nclass\nalgopy.op.\nBox\n\u00b6\nGet or modify box state\nNative TEAL ops:\nbox_create\n,\nbox_del\n,\nbox_extract\n,\nbox_get\n,\nbox_len\n,\nbox_put\n,\nbox_replace\n,\nbox_resize\n,\nbox_splice\nstatic\ncreate\n(\na\n:\nalgopy.Bytes\n|\nbytes\n,\nb\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nbool\n\u00b6\ncreate a box named A, of length B. Fail if the name A is empty or B exceeds 32,768. Returns 0 if A already existed, else 1\nNewly created boxes are filled with 0 bytes.\nbox_create\nwill fail if the referenced box already exists with a different size. Otherwise, existing boxes are unchanged by\nbox_create\n.\nNative TEAL opcode:\nbox_create\nstatic\ndelete\n(\na\n:\nalgopy.Bytes\n|\nbytes\n,\n\/\n)\n\u2192\nbool\n\u00b6\ndelete box named A if it exists. Return 1 if A existed, 0 otherwise\nNative TEAL opcode:\nbox_del\nstatic\nextract\n(\na\n:\nalgopy.Bytes\n|\nbytes\n,\nb\n:\nalgopy.UInt64\n|\nint\n,\nc\n:\nalgopy.UInt64\n|\nint\n,\n\/\n,\n)\n\u2192\nalgopy.Bytes\n\u00b6\nread C bytes from box A, starting at offset B. Fail if A does not exist, or the byte range is outside A\u2019s size.\nNative TEAL opcode:\nbox_extract\nstatic\nget\n(\na\n:\nalgopy.Bytes\n|\nbytes\n,\n\/\n)\n\u2192\ntuple\n[\nalgopy.Bytes\n,\nbool\n]\n\u00b6\nX is the contents of box A if A exists, else \u2018\u2019. Y is 1 if A exists, else 0.\nFor boxes that exceed 4,096 bytes, consider\nbox_create\n,\nbox_extract\n, and\nbox_replace\nNative TEAL opcode:\nbox_get\nstatic\nlength\n(\na\n:\nalgopy.Bytes\n|\nbytes\n,\n\/\n)\n\u2192\ntuple\n[\nalgopy.UInt64\n,\nbool\n]\n\u00b6\nX is the length of box A if A exists, else 0. Y is 1 if A exists, else 0.\nNative TEAL opcode:\nbox_len\nstatic\nput\n(\na\n:\nalgopy.Bytes\n|\nbytes\n,\nb\n:\nalgopy.Bytes\n|\nbytes\n,\n\/\n)\n\u2192\nNone\n\u00b6\nreplaces the contents of box A with byte-array B. Fails if A exists and len(B) != len(box A). Creates A if it does not exist\nFor boxes that exceed 4,096 bytes, consider\nbox_create\n,\nbox_extract\n, and\nbox_replace\nNative TEAL opcode:\nbox_put\nstatic\nreplace\n(\na\n:\nalgopy.Bytes\n|\nbytes\n,\nb\n:\nalgopy.UInt64\n|\nint\n,\nc\n:\nalgopy.Bytes\n|\nbytes\n,\n\/\n,\n)\n\u2192\nNone\n\u00b6\nwrite byte-array C into box A, starting at offset B. Fail if A does not exist, or the byte range is outside A\u2019s size.\nNative TEAL opcode:\nbox_replace\nstatic\nresize\n(\na\n:\nalgopy.Bytes\n|\nbytes\n,\nb\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nNone\n\u00b6\nchange the size of box named A to be of length B, adding zero bytes to end or removing bytes from the end, as needed. Fail if the name A is empty, A is not an existing box, or B exceeds 32,768.\nNative TEAL opcode:\nbox_resize\nstatic\nsplice\n(\na\n:\nalgopy.Bytes\n|\nbytes\n,\nb\n:\nalgopy.UInt64\n|\nint\n,\nc\n:\nalgopy.UInt64\n|\nint\n,\nd\n:\nalgopy.Bytes\n|\nbytes\n,\n\/\n,\n)\n\u2192\nNone\n\u00b6\nset box A to contain its previous bytes up to index B, followed by D, followed by the original bytes of A that began at index B+C.\nBoxes are of constant length. If C < len(D), then len(D)-C bytes will be removed from the end. If C > len(D), zero bytes will be appended to the end to reach the box length.\nNative TEAL opcode:\nbox_splice\nclass\nalgopy.op.\nEC\n\u00b6\nAvailable values for the\nEC\nenum\nInitialization\nInitialize self. See help(type(self)) for accurate signature.\nBLS12_381g1\n:\nalgopy.op.EC\n\u00b6\nEllipsis\nG1 of the BLS 12-381 curve. Points encoded as 48 byte X following by 48 byte Y\nBLS12_381g2\n:\nalgopy.op.EC\n\u00b6\nEllipsis\nG2 of the BLS 12-381 curve. Points encoded as 96 byte X following by 96 byte Y\nBN254g1\n:\nalgopy.op.EC\n\u00b6\nEllipsis\nG1 of the BN254 curve. Points encoded as 32 byte X following by 32 byte Y\nBN254g2\n:\nalgopy.op.EC\n\u00b6\nEllipsis\nG2 of the BN254 curve. Points encoded as 64 byte X following by 64 byte Y\n__add__\n(\n)\n\u00b6\nReturn self+value.\n__contains__\n(\n)\n\u00b6\nReturn bool(key in self).\n__delattr__\n(\n)\n\u00b6\nImplement delattr(self, name).\n__dir__\n(\n)\n\u00b6\nDefault dir() implementation.\n__eq__\n(\n)\n\u00b6\nReturn self==value.\n__format__\n(\n)\n\u00b6\nReturn a formatted version of the string as described by format_spec.\n__ge__\n(\n)\n\u00b6\nReturn self>=value.\n__getattribute__\n(\n)\n\u00b6\nReturn getattr(self, name).\n__getitem__\n(\n)\n\u00b6\nReturn self[key].\n__getstate__\n(\n)\n\u00b6\nHelper for pickle.\n__gt__\n(\n)\n\u00b6\nReturn self>value.\n__hash__\n(\n)\n\u00b6\nReturn hash(self).\n__iter__\n(\n)\n\u00b6\nImplement iter(self).\n__le__\n(\n)\n\u00b6\nReturn self<=value.\n__len__\n(\n)\n\u00b6\nReturn len(self).\n__lt__\n(\n)\n\u00b6\nReturn self int\nReturn the number of non-overlapping occurrences of substring sub in\nstring S[start:end]. Optional arguments start and end are\ninterpreted as in slice notation.\nencode\n(\n)\n\u00b6\nEncode the string using the codec registered for encoding.\nencoding\nThe encoding in which to encode the string.\nerrors\nThe error handling scheme to use for encoding errors.\nThe default is \u2018strict\u2019 meaning that encoding errors raise a\nUnicodeEncodeError. Other possible values are \u2018ignore\u2019, \u2018replace\u2019 and\n\u2018xmlcharrefreplace\u2019 as well as any other name registered with\ncodecs.register_error that can handle UnicodeEncodeErrors.\nendswith\n(\n)\n\u00b6\nS.endswith(suffix[, start[, end]]) -> bool\nReturn True if S ends with the specified suffix, False otherwise.\nWith optional start, test S beginning at that position.\nWith optional end, stop comparing S at that position.\nsuffix can also be a tuple of strings to try.\nexpandtabs\n(\n)\n\u00b6\nReturn a copy where all tab characters are expanded using spaces.\nIf tabsize is not given, a tab size of 8 characters is assumed.\nfind\n(\n)\n\u00b6\nS.find(sub[, start[, end]]) -> int\nReturn the lowest index in S where substring sub is found,\nsuch that sub is contained within S[start:end]. Optional\narguments start and end are interpreted as in slice notation.\nReturn -1 on failure.\nformat\n(\n)\n\u00b6\nS.format(*args, **kwargs) -> str\nReturn a formatted version of S, using substitutions from args and kwargs.\nThe substitutions are identified by braces (\u2018{\u2019 and \u2018}\u2019).\nformat_map\n(\n)\n\u00b6\nS.format_map(mapping) -> str\nReturn a formatted version of S, using substitutions from mapping.\nThe substitutions are identified by braces (\u2018{\u2019 and \u2018}\u2019).\nindex\n(\n)\n\u00b6\nS.index(sub[, start[, end]]) -> int\nReturn the lowest index in S where substring sub is found,\nsuch that sub is contained within S[start:end]. Optional\narguments start and end are interpreted as in slice notation.\nRaises ValueError when the substring is not found.\nisalnum\n(\n)\n\u00b6\nReturn True if the string is an alpha-numeric string, False otherwise.\nA string is alpha-numeric if all characters in the string are alpha-numeric and\nthere is at least one character in the string.\nisalpha\n(\n)\n\u00b6\nReturn True if the string is an alphabetic string, False otherwise.\nA string is alphabetic if all characters in the string are alphabetic and there\nis at least one character in the string.\nisascii\n(\n)\n\u00b6\nReturn True if all characters in the string are ASCII, False otherwise.\nASCII characters have code points in the range U+0000-U+007F.\nEmpty string is ASCII too.\nisdecimal\n(\n)\n\u00b6\nReturn True if the string is a decimal string, False otherwise.\nA string is a decimal string if all characters in the string are decimal and\nthere is at least one character in the string.\nisdigit\n(\n)\n\u00b6\nReturn True if the string is a digit string, False otherwise.\nA string is a digit string if all characters in the string are digits and there\nis at least one character in the string.\nisidentifier\n(\n)\n\u00b6\nReturn True if the string is a valid Python identifier, False otherwise.\nCall keyword.iskeyword(s) to test whether string s is a reserved identifier,\nsuch as \u201cdef\u201d or \u201cclass\u201d.\nislower\n(\n)\n\u00b6\nReturn True if the string is a lowercase string, False otherwise.\nA string is lowercase if all cased characters in the string are lowercase and\nthere is at least one cased character in the string.\nisnumeric\n(\n)\n\u00b6\nReturn True if the string is a numeric string, False otherwise.\nA string is numeric if all characters in the string are numeric and there is at\nleast one character in the string.\nisprintable\n(\n)\n\u00b6\nReturn True if the string is printable, False otherwise.\nA string is printable if all of its characters are considered printable in\nrepr() or if it is empty.\nisspace\n(\n)\n\u00b6\nReturn True if the string is a whitespace string, False otherwise.\nA string is whitespace if all characters in the string are whitespace and there\nis at least one character in the string.\nistitle\n(\n)\n\u00b6\nReturn True if the string is a title-cased string, False otherwise.\nIn a title-cased string, upper- and title-case characters may only\nfollow uncased characters and lowercase characters only cased ones.\nisupper\n(\n)\n\u00b6\nReturn True if the string is an uppercase string, False otherwise.\nA string is uppercase if all cased characters in the string are uppercase and\nthere is at least one cased character in the string.\njoin\n(\n)\n\u00b6\nConcatenate any number of strings.\nThe string whose method is called is inserted in between each given string.\nThe result is returned as a new string.\nExample: \u2018.\u2019.join([\u2018ab\u2019, \u2018pq\u2019, \u2018rs\u2019]) -> \u2018ab.pq.rs\u2019\nljust\n(\n)\n\u00b6\nReturn a left-justified string of length width.\nPadding is done using the specified fill character (default is a space).\nlower\n(\n)\n\u00b6\nReturn a copy of the string converted to lowercase.\nlstrip\n(\n)\n\u00b6\nReturn a copy of the string with leading whitespace removed.\nIf chars is given and not None, remove characters in chars instead.\npartition\n(\n)\n\u00b6\nPartition the string into three parts using the given separator.\nThis will search for the separator in the string. If the separator is found,\nreturns a 3-tuple containing the part before the separator, the separator\nitself, and the part after it.\nIf the separator is not found, returns a 3-tuple containing the original string\nand two empty strings.\nremoveprefix\n(\n)\n\u00b6\nReturn a str with the given prefix string removed if present.\nIf the string starts with the prefix string, return string[len(prefix):].\nOtherwise, return a copy of the original string.\nremovesuffix\n(\n)\n\u00b6\nReturn a str with the given suffix string removed if present.\nIf the string ends with the suffix string and that suffix is not empty,\nreturn string[:-len(suffix)]. Otherwise, return a copy of the original\nstring.\nreplace\n(\n)\n\u00b6\nReturn a copy with all occurrences of substring old replaced by new.\ncount\nMaximum number of occurrences to replace.\n-1 (the default value) means replace all occurrences.\nIf the optional argument count is given, only the first count occurrences are\nreplaced.\nrfind\n(\n)\n\u00b6\nS.rfind(sub[, start[, end]]) -> int\nReturn the highest index in S where substring sub is found,\nsuch that sub is contained within S[start:end]. Optional\narguments start and end are interpreted as in slice notation.\nReturn -1 on failure.\nrindex\n(\n)\n\u00b6\nS.rindex(sub[, start[, end]]) -> int\nReturn the highest index in S where substring sub is found,\nsuch that sub is contained within S[start:end]. Optional\narguments start and end are interpreted as in slice notation.\nRaises ValueError when the substring is not found.\nrjust\n(\n)\n\u00b6\nReturn a right-justified string of length width.\nPadding is done using the specified fill character (default is a space).\nrpartition\n(\n)\n\u00b6\nPartition the string into three parts using the given separator.\nThis will search for the separator in the string, starting at the end. If\nthe separator is found, returns a 3-tuple containing the part before the\nseparator, the separator itself, and the part after it.\nIf the separator is not found, returns a 3-tuple containing two empty strings\nand the original string.\nrsplit\n(\n)\n\u00b6\nReturn a list of the substrings in the string, using sep as the separator string.\nsep\nThe separator used to split the string.\nWhen set to None (the default value), will split on any whitespace\ncharacter (including \\n \\r \\t \\f and spaces) and will discard\nempty strings from the result.\nmaxsplit\nMaximum number of splits.\n-1 (the default value) means no limit.\nSplitting starts at the end of the string and works to the front.\nrstrip\n(\n)\n\u00b6\nReturn a copy of the string with trailing whitespace removed.\nIf chars is given and not None, remove characters in chars instead.\nsplit\n(\n)\n\u00b6\nReturn a list of the substrings in the string, using sep as the separator string.\nsep\nThe separator used to split the string.\nWhen set to None (the default value), will split on any whitespace\ncharacter (including \\n \\r \\t \\f and spaces) and will discard\nempty strings from the result.\nmaxsplit\nMaximum number of splits.\n-1 (the default value) means no limit.\nSplitting starts at the front of the string and works to the end.\nNote, str.split() is mainly useful for data that has been intentionally\ndelimited. With natural text that includes punctuation, consider using\nthe regular expression module.\nsplitlines\n(\n)\n\u00b6\nReturn a list of the lines in the string, breaking at line boundaries.\nLine breaks are not included in the resulting list unless keepends is given and\ntrue.\nstartswith\n(\n)\n\u00b6\nS.startswith(prefix[, start[, end]]) -> bool\nReturn True if S starts with the specified prefix, False otherwise.\nWith optional start, test S beginning at that position.\nWith optional end, stop comparing S at that position.\nprefix can also be a tuple of strings to try.\nstrip\n(\n)\n\u00b6\nReturn a copy of the string with leading and trailing whitespace removed.\nIf chars is given and not None, remove characters in chars instead.\nswapcase\n(\n)\n\u00b6\nConvert uppercase characters to lowercase and lowercase characters to uppercase.\ntitle\n(\n)\n\u00b6\nReturn a version of the string where each word is titlecased.\nMore specifically, words start with uppercased characters and all remaining\ncased characters have lower case.\ntranslate\n(\n)\n\u00b6\nReplace each character in the string using the given translation table.\ntable\nTranslation table, which must be a mapping of Unicode ordinals to\nUnicode ordinals, strings, or None.\nThe table must implement lookup\/indexing via\ngetitem\n, for instance a\ndictionary or list. If this operation raises LookupError, the character is\nleft untouched. Characters mapped to None are deleted.\nupper\n(\n)\n\u00b6\nReturn a copy of the string converted to uppercase.\nzfill\n(\n)\n\u00b6\nPad a numeric string with zeros on the left, to fill a field of the given width.\nThe string is never truncated.\nclass\nalgopy.op.\nECDSA\n\u00b6\nAvailable values for the\nECDSA\nenum\nInitialization\nInitialize self. See help(type(self)) for accurate signature.\nSecp256k1\n:\nalgopy.op.ECDSA\n\u00b6\nEllipsis\nsecp256k1 curve, used in Bitcoin\nSecp256r1\n:\nalgopy.op.ECDSA\n\u00b6\nEllipsis\nsecp256r1 curve, NIST standard\n__add__\n(\n)\n\u00b6\nReturn self+value.\n__contains__\n(\n)\n\u00b6\nReturn bool(key in self).\n__delattr__\n(\n)\n\u00b6\nImplement delattr(self, name).\n__dir__\n(\n)\n\u00b6\nDefault dir() implementation.\n__eq__\n(\n)\n\u00b6\nReturn self==value.\n__format__\n(\n)\n\u00b6\nReturn a formatted version of the string as described by format_spec.\n__ge__\n(\n)\n\u00b6\nReturn self>=value.\n__getattribute__\n(\n)\n\u00b6\nReturn getattr(self, name).\n__getitem__\n(\n)\n\u00b6\nReturn self[key].\n__getstate__\n(\n)\n\u00b6\nHelper for pickle.\n__gt__\n(\n)\n\u00b6\nReturn self>value.\n__hash__\n(\n)\n\u00b6\nReturn hash(self).\n__iter__\n(\n)\n\u00b6\nImplement iter(self).\n__le__\n(\n)\n\u00b6\nReturn self<=value.\n__len__\n(\n)\n\u00b6\nReturn len(self).\n__lt__\n(\n)\n\u00b6\nReturn self int\nReturn the number of non-overlapping occurrences of substring sub in\nstring S[start:end]. Optional arguments start and end are\ninterpreted as in slice notation.\nencode\n(\n)\n\u00b6\nEncode the string using the codec registered for encoding.\nencoding\nThe encoding in which to encode the string.\nerrors\nThe error handling scheme to use for encoding errors.\nThe default is \u2018strict\u2019 meaning that encoding errors raise a\nUnicodeEncodeError. Other possible values are \u2018ignore\u2019, \u2018replace\u2019 and\n\u2018xmlcharrefreplace\u2019 as well as any other name registered with\ncodecs.register_error that can handle UnicodeEncodeErrors.\nendswith\n(\n)\n\u00b6\nS.endswith(suffix[, start[, end]]) -> bool\nReturn True if S ends with the specified suffix, False otherwise.\nWith optional start, test S beginning at that position.\nWith optional end, stop comparing S at that position.\nsuffix can also be a tuple of strings to try.\nexpandtabs\n(\n)\n\u00b6\nReturn a copy where all tab characters are expanded using spaces.\nIf tabsize is not given, a tab size of 8 characters is assumed.\nfind\n(\n)\n\u00b6\nS.find(sub[, start[, end]]) -> int\nReturn the lowest index in S where substring sub is found,\nsuch that sub is contained within S[start:end]. Optional\narguments start and end are interpreted as in slice notation.\nReturn -1 on failure.\nformat\n(\n)\n\u00b6\nS.format(*args, **kwargs) -> str\nReturn a formatted version of S, using substitutions from args and kwargs.\nThe substitutions are identified by braces (\u2018{\u2019 and \u2018}\u2019).\nformat_map\n(\n)\n\u00b6\nS.format_map(mapping) -> str\nReturn a formatted version of S, using substitutions from mapping.\nThe substitutions are identified by braces (\u2018{\u2019 and \u2018}\u2019).\nindex\n(\n)\n\u00b6\nS.index(sub[, start[, end]]) -> int\nReturn the lowest index in S where substring sub is found,\nsuch that sub is contained within S[start:end]. Optional\narguments start and end are interpreted as in slice notation.\nRaises ValueError when the substring is not found.\nisalnum\n(\n)\n\u00b6\nReturn True if the string is an alpha-numeric string, False otherwise.\nA string is alpha-numeric if all characters in the string are alpha-numeric and\nthere is at least one character in the string.\nisalpha\n(\n)\n\u00b6\nReturn True if the string is an alphabetic string, False otherwise.\nA string is alphabetic if all characters in the string are alphabetic and there\nis at least one character in the string.\nisascii\n(\n)\n\u00b6\nReturn True if all characters in the string are ASCII, False otherwise.\nASCII characters have code points in the range U+0000-U+007F.\nEmpty string is ASCII too.\nisdecimal\n(\n)\n\u00b6\nReturn True if the string is a decimal string, False otherwise.\nA string is a decimal string if all characters in the string are decimal and\nthere is at least one character in the string.\nisdigit\n(\n)\n\u00b6\nReturn True if the string is a digit string, False otherwise.\nA string is a digit string if all characters in the string are digits and there\nis at least one character in the string.\nisidentifier\n(\n)\n\u00b6\nReturn True if the string is a valid Python identifier, False otherwise.\nCall keyword.iskeyword(s) to test whether string s is a reserved identifier,\nsuch as \u201cdef\u201d or \u201cclass\u201d.\nislower\n(\n)\n\u00b6\nReturn True if the string is a lowercase string, False otherwise.\nA string is lowercase if all cased characters in the string are lowercase and\nthere is at least one cased character in the string.\nisnumeric\n(\n)\n\u00b6\nReturn True if the string is a numeric string, False otherwise.\nA string is numeric if all characters in the string are numeric and there is at\nleast one character in the string.\nisprintable\n(\n)\n\u00b6\nReturn True if the string is printable, False otherwise.\nA string is printable if all of its characters are considered printable in\nrepr() or if it is empty.\nisspace\n(\n)\n\u00b6\nReturn True if the string is a whitespace string, False otherwise.\nA string is whitespace if all characters in the string are whitespace and there\nis at least one character in the string.\nistitle\n(\n)\n\u00b6\nReturn True if the string is a title-cased string, False otherwise.\nIn a title-cased string, upper- and title-case characters may only\nfollow uncased characters and lowercase characters only cased ones.\nisupper\n(\n)\n\u00b6\nReturn True if the string is an uppercase string, False otherwise.\nA string is uppercase if all cased characters in the string are uppercase and\nthere is at least one cased character in the string.\njoin\n(\n)\n\u00b6\nConcatenate any number of strings.\nThe string whose method is called is inserted in between each given string.\nThe result is returned as a new string.\nExample: \u2018.\u2019.join([\u2018ab\u2019, \u2018pq\u2019, \u2018rs\u2019]) -> \u2018ab.pq.rs\u2019\nljust\n(\n)\n\u00b6\nReturn a left-justified string of length width.\nPadding is done using the specified fill character (default is a space).\nlower\n(\n)\n\u00b6\nReturn a copy of the string converted to lowercase.\nlstrip\n(\n)\n\u00b6\nReturn a copy of the string with leading whitespace removed.\nIf chars is given and not None, remove characters in chars instead.\npartition\n(\n)\n\u00b6\nPartition the string into three parts using the given separator.\nThis will search for the separator in the string. If the separator is found,\nreturns a 3-tuple containing the part before the separator, the separator\nitself, and the part after it.\nIf the separator is not found, returns a 3-tuple containing the original string\nand two empty strings.\nremoveprefix\n(\n)\n\u00b6\nReturn a str with the given prefix string removed if present.\nIf the string starts with the prefix string, return string[len(prefix):].\nOtherwise, return a copy of the original string.\nremovesuffix\n(\n)\n\u00b6\nReturn a str with the given suffix string removed if present.\nIf the string ends with the suffix string and that suffix is not empty,\nreturn string[:-len(suffix)]. Otherwise, return a copy of the original\nstring.\nreplace\n(\n)\n\u00b6\nReturn a copy with all occurrences of substring old replaced by new.\ncount\nMaximum number of occurrences to replace.\n-1 (the default value) means replace all occurrences.\nIf the optional argument count is given, only the first count occurrences are\nreplaced.\nrfind\n(\n)\n\u00b6\nS.rfind(sub[, start[, end]]) -> int\nReturn the highest index in S where substring sub is found,\nsuch that sub is contained within S[start:end]. Optional\narguments start and end are interpreted as in slice notation.\nReturn -1 on failure.\nrindex\n(\n)\n\u00b6\nS.rindex(sub[, start[, end]]) -> int\nReturn the highest index in S where substring sub is found,\nsuch that sub is contained within S[start:end]. Optional\narguments start and end are interpreted as in slice notation.\nRaises ValueError when the substring is not found.\nrjust\n(\n)\n\u00b6\nReturn a right-justified string of length width.\nPadding is done using the specified fill character (default is a space).\nrpartition\n(\n)\n\u00b6\nPartition the string into three parts using the given separator.\nThis will search for the separator in the string, starting at the end. If\nthe separator is found, returns a 3-tuple containing the part before the\nseparator, the separator itself, and the part after it.\nIf the separator is not found, returns a 3-tuple containing two empty strings\nand the original string.\nrsplit\n(\n)\n\u00b6\nReturn a list of the substrings in the string, using sep as the separator string.\nsep\nThe separator used to split the string.\nWhen set to None (the default value), will split on any whitespace\ncharacter (including \\n \\r \\t \\f and spaces) and will discard\nempty strings from the result.\nmaxsplit\nMaximum number of splits.\n-1 (the default value) means no limit.\nSplitting starts at the end of the string and works to the front.\nrstrip\n(\n)\n\u00b6\nReturn a copy of the string with trailing whitespace removed.\nIf chars is given and not None, remove characters in chars instead.\nsplit\n(\n)\n\u00b6\nReturn a list of the substrings in the string, using sep as the separator string.\nsep\nThe separator used to split the string.\nWhen set to None (the default value), will split on any whitespace\ncharacter (including \\n \\r \\t \\f and spaces) and will discard\nempty strings from the result.\nmaxsplit\nMaximum number of splits.\n-1 (the default value) means no limit.\nSplitting starts at the front of the string and works to the end.\nNote, str.split() is mainly useful for data that has been intentionally\ndelimited. With natural text that includes punctuation, consider using\nthe regular expression module.\nsplitlines\n(\n)\n\u00b6\nReturn a list of the lines in the string, breaking at line boundaries.\nLine breaks are not included in the resulting list unless keepends is given and\ntrue.\nstartswith\n(\n)\n\u00b6\nS.startswith(prefix[, start[, end]]) -> bool\nReturn True if S starts with the specified prefix, False otherwise.\nWith optional start, test S beginning at that position.\nWith optional end, stop comparing S at that position.\nprefix can also be a tuple of strings to try.\nstrip\n(\n)\n\u00b6\nReturn a copy of the string with leading and trailing whitespace removed.\nIf chars is given and not None, remove characters in chars instead.\nswapcase\n(\n)\n\u00b6\nConvert uppercase characters to lowercase and lowercase characters to uppercase.\ntitle\n(\n)\n\u00b6\nReturn a version of the string where each word is titlecased.\nMore specifically, words start with uppercased characters and all remaining\ncased characters have lower case.\ntranslate\n(\n)\n\u00b6\nReplace each character in the string using the given translation table.\ntable\nTranslation table, which must be a mapping of Unicode ordinals to\nUnicode ordinals, strings, or None.\nThe table must implement lookup\/indexing via\ngetitem\n, for instance a\ndictionary or list. If this operation raises LookupError, the character is\nleft untouched. Characters mapped to None are deleted.\nupper\n(\n)\n\u00b6\nReturn a copy of the string converted to uppercase.\nzfill\n(\n)\n\u00b6\nPad a numeric string with zeros on the left, to fill a field of the given width.\nThe string is never truncated.\nclass\nalgopy.op.\nEllipticCurve\n\u00b6\nElliptic Curve functions\nNative TEAL ops:\nec_add\n,\nec_map_to\n,\nec_multi_scalar_mul\n,\nec_pairing_check\n,\nec_scalar_mul\n,\nec_subgroup_check\nstatic\nadd\n(\ng\n:\nalgopy.op.EC\n,\na\n:\nalgopy.Bytes\n|\nbytes\n,\nb\n:\nalgopy.Bytes\n|\nbytes\n,\n\/\n,\n)\n\u2192\nalgopy.Bytes\n\u00b6\nfor curve points A and B, return the curve point A + B\nA and B are curve points in affine representation: field element X concatenated with field element Y. Field element\nZ\nis encoded as follows.\nFor the base field elements (Fp),\nZ\nis encoded as a big-endian number and must be lower than the field modulus.\nFor the quadratic field extension (Fp2),\nZ\nis encoded as the concatenation of the individual encoding of the coefficients. For an Fp2 element of the form\nZ\n=\nZ0\n+\nZ1\ni\n, where\ni\nis a formal quadratic non-residue, the encoding of Z is the concatenation of the encoding of\nZ0\nand\nZ1\nin this order. (\nZ0\nand\nZ1\nmust be less than the field modulus).\nThe point at infinity is encoded as\n(X,Y)\n=\n(0,0)\n.\nGroups G1 and G2 are denoted additively.\nFails if A or B is not in G.\nA and\/or B are allowed to be the point at infinity.\nDoes\nnot\ncheck if A and B are in the main prime-order subgroup.\nParameters\n:\ng\n(\nEC\n) \u2013 curve index\nNative TEAL opcode:\nec_add\nstatic\nmap_to\n(\ng\n:\nalgopy.op.EC\n,\na\n:\nalgopy.Bytes\n|\nbytes\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nmaps field element A to group G\nBN254 points are mapped by the SVDW map. BLS12-381 points are mapped by the SSWU map.\nG1 element inputs are base field elements and G2 element inputs are quadratic field elements, with nearly the same encoding rules (for field elements) as defined in\nec_add\n. There is one difference of encoding rule: G1 element inputs do not need to be 0-padded if they fit in less than 32 bytes for BN254 and less than 48 bytes for BLS12-381. (As usual, the empty byte array represents 0.) G2 elements inputs need to be always have the required size.\nParameters\n:\ng\n(\nEC\n) \u2013 curve index\nNative TEAL opcode:\nec_map_to\nstatic\npairing_check\n(\ng\n:\nalgopy.op.EC\n,\na\n:\nalgopy.Bytes\n|\nbytes\n,\nb\n:\nalgopy.Bytes\n|\nbytes\n,\n\/\n,\n)\n\u2192\nbool\n\u00b6\n1 if the product of the pairing of each point in A with its respective point in B is equal to the identity element of the target group Gt, else 0\nA and B are concatenated points, encoded and checked as described in\nec_add\n. A contains points of the group G, B contains points of the associated group (G2 if G is G1, and vice versa). Fails if A and B have a different number of points, or if any point is not in its described group or outside the main prime-order subgroup - a stronger condition than other opcodes. AVM values are limited to 4096 bytes, so\nec_pairing_check\nis limited by the size of the points in the groups being operated upon.\nParameters\n:\ng\n(\nEC\n) \u2013 curve index\nNative TEAL opcode:\nec_pairing_check\nstatic\nscalar_mul\n(\ng\n:\nalgopy.op.EC\n,\na\n:\nalgopy.Bytes\n|\nbytes\n,\nb\n:\nalgopy.Bytes\n|\nbytes\n,\n\/\n,\n)\n\u2192\nalgopy.Bytes\n\u00b6\nfor curve point A and scalar B, return the curve point BA, the point A multiplied by the scalar B.\nA is a curve point encoded and checked as described in\nec_add\n. Scalar B is interpreted as a big-endian unsigned integer. Fails if B exceeds 32 bytes.\nParameters\n:\ng\n(\nEC\n) \u2013 curve index\nNative TEAL opcode:\nec_scalar_mul\nstatic\nscalar_mul_multi\n(\ng\n:\nalgopy.op.EC\n,\na\n:\nalgopy.Bytes\n|\nbytes\n,\nb\n:\nalgopy.Bytes\n|\nbytes\n,\n\/\n,\n)\n\u2192\nalgopy.Bytes\n\u00b6\nfor curve points A and scalars B, return curve point B0A0 + B1A1 + B2A2 + \u2026 + BnAn\nA is a list of concatenated points, encoded and checked as described in\nec_add\n. B is a list of concatenated scalars which, unlike ec_scalar_mul, must all be exactly 32 bytes long.\nThe name\nec_multi_scalar_mul\nwas chosen to reflect common usage, but a more consistent name would be\nec_multi_scalar_mul\n. AVM values are limited to 4096 bytes, so\nec_multi_scalar_mul\nis limited by the size of the points in the group being operated upon.\nParameters\n:\ng\n(\nEC\n) \u2013 curve index\nNative TEAL opcode:\nec_multi_scalar_mul\nstatic\nsubgroup_check\n(\ng\n:\nalgopy.op.EC\n,\na\n:\nalgopy.Bytes\n|\nbytes\n,\n\/\n)\n\u2192\nbool\n\u00b6\n1 if A is in the main prime-order subgroup of G (including the point at infinity) else 0. Program fails if A is not in G at all.\nParameters\n:\ng\n(\nEC\n) \u2013 curve index\nNative TEAL opcode:\nec_subgroup_check\nclass\nalgopy.op.\nGITxn\n\u00b6\nGet values for inner transaction in the last group submitted\nNative TEAL ops:\ngitxn\n,\ngitxnas\nstatic\naccounts\n(\nt\n:\nint\n,\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Account\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns Account\n:\nAccounts listed in the ApplicationCall transaction\nNative TEAL opcode:\ngitxna\n,\ngitxnas\nstatic\namount\n(\nt\n:\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns UInt64\n:\nmicroalgos\nNative TEAL opcode:\ngitxn\nstatic\napplication_args\n(\nt\n:\nint\n,\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns Bytes\n:\nArguments passed to the application in the ApplicationCall transaction\nNative TEAL opcode:\ngitxna\n,\ngitxnas\nstatic\napplication_id\n(\nt\n:\nint\n,\n\/\n)\n\u2192\nalgopy.Application\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns Application\n:\nApplicationID from ApplicationCall transaction\nNative TEAL opcode:\ngitxn\nstatic\napplications\n(\nt\n:\nint\n,\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Application\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns Application\n:\nForeign Apps listed in the ApplicationCall transaction\nNative TEAL opcode:\ngitxna\n,\ngitxnas\nstatic\napproval_program\n(\nt\n:\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns Bytes\n:\nApproval program\nNative TEAL opcode:\ngitxn\nstatic\napproval_program_pages\n(\nt\n:\nint\n,\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns Bytes\n:\nApproval Program as an array of pages\nNative TEAL opcode:\ngitxna\n,\ngitxnas\nstatic\nasset_amount\n(\nt\n:\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns UInt64\n:\nvalue in Asset\u2019s units\nNative TEAL opcode:\ngitxn\nstatic\nasset_close_to\n(\nt\n:\nint\n,\n\/\n)\n\u2192\nalgopy.Account\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns Account\n:\n32 byte address\nNative TEAL opcode:\ngitxn\nstatic\nasset_receiver\n(\nt\n:\nint\n,\n\/\n)\n\u2192\nalgopy.Account\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns Account\n:\n32 byte address\nNative TEAL opcode:\ngitxn\nstatic\nasset_sender\n(\nt\n:\nint\n,\n\/\n)\n\u2192\nalgopy.Account\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns Account\n:\n32 byte address. Source of assets if Sender is the Asset\u2019s Clawback address.\nNative TEAL opcode:\ngitxn\nstatic\nassets\n(\nt\n:\nint\n,\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Asset\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns Asset\n:\nForeign Assets listed in the ApplicationCall transaction\nNative TEAL opcode:\ngitxna\n,\ngitxnas\nstatic\nclear_state_program\n(\nt\n:\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns Bytes\n:\nClear state program\nNative TEAL opcode:\ngitxn\nstatic\nclear_state_program_pages\n(\nt\n:\nint\n,\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns Bytes\n:\nClearState Program as an array of pages\nNative TEAL opcode:\ngitxna\n,\ngitxnas\nstatic\nclose_remainder_to\n(\nt\n:\nint\n,\n\/\n)\n\u2192\nalgopy.Account\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns Account\n:\n32 byte address\nNative TEAL opcode:\ngitxn\nstatic\nconfig_asset\n(\nt\n:\nint\n,\n\/\n)\n\u2192\nalgopy.Asset\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns Asset\n:\nAsset ID in asset config transaction\nNative TEAL opcode:\ngitxn\nstatic\nconfig_asset_clawback\n(\nt\n:\nint\n,\n\/\n)\n\u2192\nalgopy.Account\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns Account\n:\n32 byte address\nNative TEAL opcode:\ngitxn\nstatic\nconfig_asset_decimals\n(\nt\n:\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns UInt64\n:\nNumber of digits to display after the decimal place when displaying the asset\nNative TEAL opcode:\ngitxn\nstatic\nconfig_asset_default_frozen\n(\nt\n:\nint\n,\n\/\n)\n\u2192\nbool\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns bool\n:\nWhether the asset\u2019s slots are frozen by default or not, 0 or 1\nNative TEAL opcode:\ngitxn\nstatic\nconfig_asset_freeze\n(\nt\n:\nint\n,\n\/\n)\n\u2192\nalgopy.Account\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns Account\n:\n32 byte address\nNative TEAL opcode:\ngitxn\nstatic\nconfig_asset_manager\n(\nt\n:\nint\n,\n\/\n)\n\u2192\nalgopy.Account\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns Account\n:\n32 byte address\nNative TEAL opcode:\ngitxn\nstatic\nconfig_asset_metadata_hash\n(\nt\n:\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns Bytes\n:\n32 byte commitment to unspecified asset metadata\nNative TEAL opcode:\ngitxn\nstatic\nconfig_asset_name\n(\nt\n:\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns Bytes\n:\nThe asset name\nNative TEAL opcode:\ngitxn\nstatic\nconfig_asset_reserve\n(\nt\n:\nint\n,\n\/\n)\n\u2192\nalgopy.Account\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns Account\n:\n32 byte address\nNative TEAL opcode:\ngitxn\nstatic\nconfig_asset_total\n(\nt\n:\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns UInt64\n:\nTotal number of units of this asset created\nNative TEAL opcode:\ngitxn\nstatic\nconfig_asset_unit_name\n(\nt\n:\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns Bytes\n:\nUnit name of the asset\nNative TEAL opcode:\ngitxn\nstatic\nconfig_asset_url\n(\nt\n:\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns Bytes\n:\nURL\nNative TEAL opcode:\ngitxn\nstatic\ncreated_application_id\n(\nt\n:\nint\n,\n\/\n)\n\u2192\nalgopy.Application\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns Application\n:\nApplicationID allocated by the creation of an application (only with\nitxn\nin v5). Application mode only\nNative TEAL opcode:\ngitxn\nstatic\ncreated_asset_id\n(\nt\n:\nint\n,\n\/\n)\n\u2192\nalgopy.Asset\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns Asset\n:\nAsset ID allocated by the creation of an ASA (only with\nitxn\nin v5). Application mode only\nNative TEAL opcode:\ngitxn\nstatic\nextra_program_pages\n(\nt\n:\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns UInt64\n:\nNumber of additional pages for each of the application\u2019s approval and clear state programs. An ExtraProgramPages of 1 means 2048 more total bytes, or 1024 for each program.\nNative TEAL opcode:\ngitxn\nstatic\nfee\n(\nt\n:\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns UInt64\n:\nmicroalgos\nNative TEAL opcode:\ngitxn\nstatic\nfirst_valid\n(\nt\n:\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns UInt64\n:\nround number\nNative TEAL opcode:\ngitxn\nstatic\nfirst_valid_time\n(\nt\n:\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns UInt64\n:\nUNIX timestamp of block before txn.FirstValid. Fails if negative\nNative TEAL opcode:\ngitxn\nstatic\nfreeze_asset\n(\nt\n:\nint\n,\n\/\n)\n\u2192\nalgopy.Asset\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns Asset\n:\nAsset ID being frozen or un-frozen\nNative TEAL opcode:\ngitxn\nstatic\nfreeze_asset_account\n(\nt\n:\nint\n,\n\/\n)\n\u2192\nalgopy.Account\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns Account\n:\n32 byte address of the account whose asset slot is being frozen or un-frozen\nNative TEAL opcode:\ngitxn\nstatic\nfreeze_asset_frozen\n(\nt\n:\nint\n,\n\/\n)\n\u2192\nbool\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns bool\n:\nThe new frozen value, 0 or 1\nNative TEAL opcode:\ngitxn\nstatic\nglobal_num_byte_slice\n(\nt\n:\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns UInt64\n:\nNumber of global state byteslices in ApplicationCall\nNative TEAL opcode:\ngitxn\nstatic\nglobal_num_uint\n(\nt\n:\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns UInt64\n:\nNumber of global state integers in ApplicationCall\nNative TEAL opcode:\ngitxn\nstatic\ngroup_index\n(\nt\n:\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns UInt64\n:\nPosition of this transaction within an atomic transaction group. A stand-alone transaction is implicitly element 0 in a group of 1\nNative TEAL opcode:\ngitxn\nstatic\nlast_log\n(\nt\n:\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns Bytes\n:\nThe last message emitted. Empty bytes if none were emitted. Application mode only\nNative TEAL opcode:\ngitxn\nstatic\nlast_valid\n(\nt\n:\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns UInt64\n:\nround number\nNative TEAL opcode:\ngitxn\nstatic\nlease\n(\nt\n:\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns Bytes\n:\n32 byte lease value\nNative TEAL opcode:\ngitxn\nstatic\nlocal_num_byte_slice\n(\nt\n:\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns UInt64\n:\nNumber of local state byteslices in ApplicationCall\nNative TEAL opcode:\ngitxn\nstatic\nlocal_num_uint\n(\nt\n:\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns UInt64\n:\nNumber of local state integers in ApplicationCall\nNative TEAL opcode:\ngitxn\nstatic\nlogs\n(\nt\n:\nint\n,\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns Bytes\n:\nLog messages emitted by an application call (only with\nitxn\nin v5). Application mode only\nNative TEAL opcode:\ngitxna\n,\ngitxnas\nstatic\nnonparticipation\n(\nt\n:\nint\n,\n\/\n)\n\u2192\nbool\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns bool\n:\nMarks an account nonparticipating for rewards\nNative TEAL opcode:\ngitxn\nstatic\nnote\n(\nt\n:\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns Bytes\n:\nAny data up to 1024 bytes\nNative TEAL opcode:\ngitxn\nstatic\nnum_accounts\n(\nt\n:\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns UInt64\n:\nNumber of Accounts\nNative TEAL opcode:\ngitxn\nstatic\nnum_app_args\n(\nt\n:\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns UInt64\n:\nNumber of ApplicationArgs\nNative TEAL opcode:\ngitxn\nstatic\nnum_applications\n(\nt\n:\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns UInt64\n:\nNumber of Applications\nNative TEAL opcode:\ngitxn\nstatic\nnum_approval_program_pages\n(\nt\n:\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns UInt64\n:\nNumber of Approval Program pages\nNative TEAL opcode:\ngitxn\nstatic\nnum_assets\n(\nt\n:\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns UInt64\n:\nNumber of Assets\nNative TEAL opcode:\ngitxn\nstatic\nnum_clear_state_program_pages\n(\nt\n:\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns UInt64\n:\nNumber of ClearState Program pages\nNative TEAL opcode:\ngitxn\nstatic\nnum_logs\n(\nt\n:\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns UInt64\n:\nNumber of Logs (only with\nitxn\nin v5). Application mode only\nNative TEAL opcode:\ngitxn\nstatic\non_completion\n(\nt\n:\nint\n,\n\/\n)\n\u2192\nalgopy.OnCompleteAction\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns OnCompleteAction\n:\nApplicationCall transaction on completion action\nNative TEAL opcode:\ngitxn\nstatic\nreceiver\n(\nt\n:\nint\n,\n\/\n)\n\u2192\nalgopy.Account\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns Account\n:\n32 byte address\nNative TEAL opcode:\ngitxn\nstatic\nrekey_to\n(\nt\n:\nint\n,\n\/\n)\n\u2192\nalgopy.Account\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns Account\n:\n32 byte Sender\u2019s new AuthAddr\nNative TEAL opcode:\ngitxn\nstatic\nselection_pk\n(\nt\n:\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns Bytes\n:\n32 byte address\nNative TEAL opcode:\ngitxn\nstatic\nsender\n(\nt\n:\nint\n,\n\/\n)\n\u2192\nalgopy.Account\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns Account\n:\n32 byte address\nNative TEAL opcode:\ngitxn\nstatic\nstate_proof_pk\n(\nt\n:\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns Bytes\n:\n64 byte state proof public key\nNative TEAL opcode:\ngitxn\nstatic\ntx_id\n(\nt\n:\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns Bytes\n:\nThe computed ID for this transaction. 32 bytes.\nNative TEAL opcode:\ngitxn\nstatic\ntype\n(\nt\n:\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns Bytes\n:\nTransaction type as bytes\nNative TEAL opcode:\ngitxn\nstatic\ntype_enum\n(\nt\n:\nint\n,\n\/\n)\n\u2192\nalgopy.TransactionType\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns TransactionType\n:\nTransaction type as integer\nNative TEAL opcode:\ngitxn\nstatic\nvote_first\n(\nt\n:\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns UInt64\n:\nThe first round that the participation key is valid.\nNative TEAL opcode:\ngitxn\nstatic\nvote_key_dilution\n(\nt\n:\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns UInt64\n:\nDilution for the 2-level participation key\nNative TEAL opcode:\ngitxn\nstatic\nvote_last\n(\nt\n:\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns UInt64\n:\nThe last round that the participation key is valid.\nNative TEAL opcode:\ngitxn\nstatic\nvote_pk\n(\nt\n:\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns Bytes\n:\n32 byte address\nNative TEAL opcode:\ngitxn\nstatic\nxfer_asset\n(\nt\n:\nint\n,\n\/\n)\n\u2192\nalgopy.Asset\n\u00b6\nParameters\n:\nt\n(\nint\n) \u2013 transaction group index\nReturns Asset\n:\nAsset ID\nNative TEAL opcode:\ngitxn\nclass\nalgopy.op.\nGTxn\n\u00b6\nGet values for transactions in the current group\nNative TEAL ops:\ngtxns\n,\ngtxnsas\nstatic\naccounts\n(\na\n:\nalgopy.UInt64\n|\nint\n,\nb\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Account\n\u00b6\nAccounts listed in the ApplicationCall transaction\nNative TEAL opcode:\ngtxna\n,\ngtxnas\n,\ngtxnsa\n,\ngtxnsas\nstatic\namount\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nmicroalgos\nNative TEAL opcode:\ngtxn\n,\ngtxns\nstatic\napplication_args\n(\na\n:\nalgopy.UInt64\n|\nint\n,\nb\n:\nalgopy.UInt64\n|\nint\n,\n\/\n,\n)\n\u2192\nalgopy.Bytes\n\u00b6\nArguments passed to the application in the ApplicationCall transaction\nNative TEAL opcode:\ngtxna\n,\ngtxnas\n,\ngtxnsa\n,\ngtxnsas\nstatic\napplication_id\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Application\n\u00b6\nApplicationID from ApplicationCall transaction\nNative TEAL opcode:\ngtxn\n,\ngtxns\nstatic\napplications\n(\na\n:\nalgopy.UInt64\n|\nint\n,\nb\n:\nalgopy.UInt64\n|\nint\n,\n\/\n,\n)\n\u2192\nalgopy.Application\n\u00b6\nForeign Apps listed in the ApplicationCall transaction\nNative TEAL opcode:\ngtxna\n,\ngtxnas\n,\ngtxnsa\n,\ngtxnsas\nstatic\napproval_program\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nApproval program\nNative TEAL opcode:\ngtxn\n,\ngtxns\nstatic\napproval_program_pages\n(\na\n:\nalgopy.UInt64\n|\nint\n,\nb\n:\nalgopy.UInt64\n|\nint\n,\n\/\n,\n)\n\u2192\nalgopy.Bytes\n\u00b6\nApproval Program as an array of pages\nNative TEAL opcode:\ngtxna\n,\ngtxnas\n,\ngtxnsa\n,\ngtxnsas\nstatic\nasset_amount\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nvalue in Asset\u2019s units\nNative TEAL opcode:\ngtxn\n,\ngtxns\nstatic\nasset_close_to\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Account\n\u00b6\n32 byte address\nNative TEAL opcode:\ngtxn\n,\ngtxns\nstatic\nasset_receiver\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Account\n\u00b6\n32 byte address\nNative TEAL opcode:\ngtxn\n,\ngtxns\nstatic\nasset_sender\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Account\n\u00b6\n32 byte address. Source of assets if Sender is the Asset\u2019s Clawback address.\nNative TEAL opcode:\ngtxn\n,\ngtxns\nstatic\nassets\n(\na\n:\nalgopy.UInt64\n|\nint\n,\nb\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Asset\n\u00b6\nForeign Assets listed in the ApplicationCall transaction\nNative TEAL opcode:\ngtxna\n,\ngtxnas\n,\ngtxnsa\n,\ngtxnsas\nstatic\nclear_state_program\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nClear state program\nNative TEAL opcode:\ngtxn\n,\ngtxns\nstatic\nclear_state_program_pages\n(\na\n:\nalgopy.UInt64\n|\nint\n,\nb\n:\nalgopy.UInt64\n|\nint\n,\n\/\n,\n)\n\u2192\nalgopy.Bytes\n\u00b6\nClearState Program as an array of pages\nNative TEAL opcode:\ngtxna\n,\ngtxnas\n,\ngtxnsa\n,\ngtxnsas\nstatic\nclose_remainder_to\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Account\n\u00b6\n32 byte address\nNative TEAL opcode:\ngtxn\n,\ngtxns\nstatic\nconfig_asset\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Asset\n\u00b6\nAsset ID in asset config transaction\nNative TEAL opcode:\ngtxn\n,\ngtxns\nstatic\nconfig_asset_clawback\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Account\n\u00b6\n32 byte address\nNative TEAL opcode:\ngtxn\n,\ngtxns\nstatic\nconfig_asset_decimals\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nNumber of digits to display after the decimal place when displaying the asset\nNative TEAL opcode:\ngtxn\n,\ngtxns\nstatic\nconfig_asset_default_frozen\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nbool\n\u00b6\nWhether the asset\u2019s slots are frozen by default or not, 0 or 1\nNative TEAL opcode:\ngtxn\n,\ngtxns\nstatic\nconfig_asset_freeze\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Account\n\u00b6\n32 byte address\nNative TEAL opcode:\ngtxn\n,\ngtxns\nstatic\nconfig_asset_manager\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Account\n\u00b6\n32 byte address\nNative TEAL opcode:\ngtxn\n,\ngtxns\nstatic\nconfig_asset_metadata_hash\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\n32 byte commitment to unspecified asset metadata\nNative TEAL opcode:\ngtxn\n,\ngtxns\nstatic\nconfig_asset_name\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nThe asset name\nNative TEAL opcode:\ngtxn\n,\ngtxns\nstatic\nconfig_asset_reserve\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Account\n\u00b6\n32 byte address\nNative TEAL opcode:\ngtxn\n,\ngtxns\nstatic\nconfig_asset_total\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nTotal number of units of this asset created\nNative TEAL opcode:\ngtxn\n,\ngtxns\nstatic\nconfig_asset_unit_name\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nUnit name of the asset\nNative TEAL opcode:\ngtxn\n,\ngtxns\nstatic\nconfig_asset_url\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nURL\nNative TEAL opcode:\ngtxn\n,\ngtxns\nstatic\ncreated_application_id\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Application\n\u00b6\nApplicationID allocated by the creation of an application (only with\nitxn\nin v5). Application mode only\nNative TEAL opcode:\ngtxn\n,\ngtxns\nstatic\ncreated_asset_id\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Asset\n\u00b6\nAsset ID allocated by the creation of an ASA (only with\nitxn\nin v5). Application mode only\nNative TEAL opcode:\ngtxn\n,\ngtxns\nstatic\nextra_program_pages\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nNumber of additional pages for each of the application\u2019s approval and clear state programs. An ExtraProgramPages of 1 means 2048 more total bytes, or 1024 for each program.\nNative TEAL opcode:\ngtxn\n,\ngtxns\nstatic\nfee\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nmicroalgos\nNative TEAL opcode:\ngtxn\n,\ngtxns\nstatic\nfirst_valid\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nround number\nNative TEAL opcode:\ngtxn\n,\ngtxns\nstatic\nfirst_valid_time\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nUNIX timestamp of block before txn.FirstValid. Fails if negative\nNative TEAL opcode:\ngtxn\n,\ngtxns\nstatic\nfreeze_asset\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Asset\n\u00b6\nAsset ID being frozen or un-frozen\nNative TEAL opcode:\ngtxn\n,\ngtxns\nstatic\nfreeze_asset_account\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Account\n\u00b6\n32 byte address of the account whose asset slot is being frozen or un-frozen\nNative TEAL opcode:\ngtxn\n,\ngtxns\nstatic\nfreeze_asset_frozen\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nbool\n\u00b6\nThe new frozen value, 0 or 1\nNative TEAL opcode:\ngtxn\n,\ngtxns\nstatic\nglobal_num_byte_slice\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nNumber of global state byteslices in ApplicationCall\nNative TEAL opcode:\ngtxn\n,\ngtxns\nstatic\nglobal_num_uint\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nNumber of global state integers in ApplicationCall\nNative TEAL opcode:\ngtxn\n,\ngtxns\nstatic\ngroup_index\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nPosition of this transaction within an atomic transaction group. A stand-alone transaction is implicitly element 0 in a group of 1\nNative TEAL opcode:\ngtxn\n,\ngtxns\nstatic\nlast_log\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nThe last message emitted. Empty bytes if none were emitted. Application mode only\nNative TEAL opcode:\ngtxn\n,\ngtxns\nstatic\nlast_valid\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nround number\nNative TEAL opcode:\ngtxn\n,\ngtxns\nstatic\nlease\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\n32 byte lease value\nNative TEAL opcode:\ngtxn\n,\ngtxns\nstatic\nlocal_num_byte_slice\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nNumber of local state byteslices in ApplicationCall\nNative TEAL opcode:\ngtxn\n,\ngtxns\nstatic\nlocal_num_uint\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nNumber of local state integers in ApplicationCall\nNative TEAL opcode:\ngtxn\n,\ngtxns\nstatic\nlogs\n(\na\n:\nalgopy.UInt64\n|\nint\n,\nb\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nLog messages emitted by an application call (only with\nitxn\nin v5). Application mode only\nNative TEAL opcode:\ngtxna\n,\ngtxnas\n,\ngtxnsa\n,\ngtxnsas\nstatic\nnonparticipation\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nbool\n\u00b6\nMarks an account nonparticipating for rewards\nNative TEAL opcode:\ngtxn\n,\ngtxns\nstatic\nnote\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nAny data up to 1024 bytes\nNative TEAL opcode:\ngtxn\n,\ngtxns\nstatic\nnum_accounts\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nNumber of Accounts\nNative TEAL opcode:\ngtxn\n,\ngtxns\nstatic\nnum_app_args\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nNumber of ApplicationArgs\nNative TEAL opcode:\ngtxn\n,\ngtxns\nstatic\nnum_applications\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nNumber of Applications\nNative TEAL opcode:\ngtxn\n,\ngtxns\nstatic\nnum_approval_program_pages\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nNumber of Approval Program pages\nNative TEAL opcode:\ngtxn\n,\ngtxns\nstatic\nnum_assets\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nNumber of Assets\nNative TEAL opcode:\ngtxn\n,\ngtxns\nstatic\nnum_clear_state_program_pages\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nNumber of ClearState Program pages\nNative TEAL opcode:\ngtxn\n,\ngtxns\nstatic\nnum_logs\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nNumber of Logs (only with\nitxn\nin v5). Application mode only\nNative TEAL opcode:\ngtxn\n,\ngtxns\nstatic\non_completion\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.OnCompleteAction\n\u00b6\nApplicationCall transaction on completion action\nNative TEAL opcode:\ngtxn\n,\ngtxns\nstatic\nreceiver\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Account\n\u00b6\n32 byte address\nNative TEAL opcode:\ngtxn\n,\ngtxns\nstatic\nrekey_to\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Account\n\u00b6\n32 byte Sender\u2019s new AuthAddr\nNative TEAL opcode:\ngtxn\n,\ngtxns\nstatic\nselection_pk\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\n32 byte address\nNative TEAL opcode:\ngtxn\n,\ngtxns\nstatic\nsender\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Account\n\u00b6\n32 byte address\nNative TEAL opcode:\ngtxn\n,\ngtxns\nstatic\nstate_proof_pk\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\n64 byte state proof public key\nNative TEAL opcode:\ngtxn\n,\ngtxns\nstatic\ntx_id\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nThe computed ID for this transaction. 32 bytes.\nNative TEAL opcode:\ngtxn\n,\ngtxns\nstatic\ntype\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nTransaction type as bytes\nNative TEAL opcode:\ngtxn\n,\ngtxns\nstatic\ntype_enum\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.TransactionType\n\u00b6\nTransaction type as integer\nNative TEAL opcode:\ngtxn\n,\ngtxns\nstatic\nvote_first\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nThe first round that the participation key is valid.\nNative TEAL opcode:\ngtxn\n,\ngtxns\nstatic\nvote_key_dilution\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nDilution for the 2-level participation key\nNative TEAL opcode:\ngtxn\n,\ngtxns\nstatic\nvote_last\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nThe last round that the participation key is valid.\nNative TEAL opcode:\ngtxn\n,\ngtxns\nstatic\nvote_pk\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\n32 byte address\nNative TEAL opcode:\ngtxn\n,\ngtxns\nstatic\nxfer_asset\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Asset\n\u00b6\nAsset ID\nNative TEAL opcode:\ngtxn\n,\ngtxns\nclass\nalgopy.op.\nGlobal\n\u00b6\nGet Global values\nNative TEAL op:\nglobal\nasset_create_min_balance\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nThe additional minimum balance required to create (and opt-in to) an asset.\nasset_opt_in_min_balance\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nThe additional minimum balance required to opt-in to an asset.\ncaller_application_address\n:\nFinal\n[\nalgopy.Account\n]\n\u00b6\nEllipsis\nThe application address of the application that called this application. ZeroAddress if this application is at the top-level. Application mode only.\ncaller_application_id\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nThe application ID of the application that called this application. 0 if this application is at the top-level. Application mode only.\ncreator_address\n:\nFinal\n[\nalgopy.Account\n]\n\u00b6\nEllipsis\nAddress of the creator of the current application. Application mode only.\ncurrent_application_address\n:\nFinal\n[\nalgopy.Account\n]\n\u00b6\nEllipsis\nAddress that the current application controls. Application mode only.\ncurrent_application_id\n:\nFinal\n[\nalgopy.Application\n]\n\u00b6\nEllipsis\nID of current application executing. Application mode only.\ngenesis_hash\n:\nFinal\n[\nalgopy.Bytes\n]\n\u00b6\nEllipsis\nThe Genesis Hash for the network.\ngroup_id\n:\nFinal\n[\nalgopy.Bytes\n]\n\u00b6\nEllipsis\nID of the transaction group. 32 zero bytes if the transaction is not part of a group.\ngroup_size\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nNumber of transactions in this atomic transaction group. At least 1\nlatest_timestamp\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nLast confirmed block UNIX timestamp. Fails if negative. Application mode only.\nlogic_sig_version\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nMaximum supported version\nmax_txn_life\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nrounds\nmin_balance\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nmicroalgos\nmin_txn_fee\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nmicroalgos\nstatic\nopcode_budget\n(\n)\n\u2192\nalgopy.UInt64\n\u00b6\nThe remaining cost that can be spent by opcodes in this program.\nNative TEAL opcode:\nglobal\npayouts_enabled\n:\nFinal\n[\nbool\n]\n\u00b6\nEllipsis\nWhether block proposal payouts are enabled.\nMin AVM version: 11\npayouts_go_online_fee\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nThe fee required in a keyreg transaction to make an account incentive eligible.\nMin AVM version: 11\npayouts_max_balance\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nThe maximum balance an account can have in the agreement round to receive block payouts in the proposal round.\nMin AVM version: 11\npayouts_min_balance\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nThe minimum balance an account must have in the agreement round to receive block payouts in the proposal round.\nMin AVM version: 11\npayouts_percent\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nThe percentage of transaction fees in a block that can be paid to the block proposer.\nMin AVM version: 11\nround\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nCurrent round number. Application mode only.\nzero_address\n:\nFinal\n[\nalgopy.Account\n]\n\u00b6\nEllipsis\n32 byte address of all zero bytes\nclass\nalgopy.op.\nITxn\n\u00b6\nGet values for the last inner transaction\nNative TEAL ops:\nitxn\n,\nitxnas\nstatic\naccounts\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Account\n\u00b6\nAccounts listed in the ApplicationCall transaction\nNative TEAL opcode:\nitxna\n,\nitxnas\nstatic\namount\n(\n)\n\u2192\nalgopy.UInt64\n\u00b6\nmicroalgos\nNative TEAL opcode:\nitxn\nstatic\napplication_args\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nArguments passed to the application in the ApplicationCall transaction\nNative TEAL opcode:\nitxna\n,\nitxnas\nstatic\napplication_id\n(\n)\n\u2192\nalgopy.Application\n\u00b6\nApplicationID from ApplicationCall transaction\nNative TEAL opcode:\nitxn\nstatic\napplications\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Application\n\u00b6\nForeign Apps listed in the ApplicationCall transaction\nNative TEAL opcode:\nitxna\n,\nitxnas\nstatic\napproval_program\n(\n)\n\u2192\nalgopy.Bytes\n\u00b6\nApproval program\nNative TEAL opcode:\nitxn\nstatic\napproval_program_pages\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nApproval Program as an array of pages\nNative TEAL opcode:\nitxna\n,\nitxnas\nstatic\nasset_amount\n(\n)\n\u2192\nalgopy.UInt64\n\u00b6\nvalue in Asset\u2019s units\nNative TEAL opcode:\nitxn\nstatic\nasset_close_to\n(\n)\n\u2192\nalgopy.Account\n\u00b6\n32 byte address\nNative TEAL opcode:\nitxn\nstatic\nasset_receiver\n(\n)\n\u2192\nalgopy.Account\n\u00b6\n32 byte address\nNative TEAL opcode:\nitxn\nstatic\nasset_sender\n(\n)\n\u2192\nalgopy.Account\n\u00b6\n32 byte address. Source of assets if Sender is the Asset\u2019s Clawback address.\nNative TEAL opcode:\nitxn\nstatic\nassets\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Asset\n\u00b6\nForeign Assets listed in the ApplicationCall transaction\nNative TEAL opcode:\nitxna\n,\nitxnas\nstatic\nclear_state_program\n(\n)\n\u2192\nalgopy.Bytes\n\u00b6\nClear state program\nNative TEAL opcode:\nitxn\nstatic\nclear_state_program_pages\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nClearState Program as an array of pages\nNative TEAL opcode:\nitxna\n,\nitxnas\nstatic\nclose_remainder_to\n(\n)\n\u2192\nalgopy.Account\n\u00b6\n32 byte address\nNative TEAL opcode:\nitxn\nstatic\nconfig_asset\n(\n)\n\u2192\nalgopy.Asset\n\u00b6\nAsset ID in asset config transaction\nNative TEAL opcode:\nitxn\nstatic\nconfig_asset_clawback\n(\n)\n\u2192\nalgopy.Account\n\u00b6\n32 byte address\nNative TEAL opcode:\nitxn\nstatic\nconfig_asset_decimals\n(\n)\n\u2192\nalgopy.UInt64\n\u00b6\nNumber of digits to display after the decimal place when displaying the asset\nNative TEAL opcode:\nitxn\nstatic\nconfig_asset_default_frozen\n(\n)\n\u2192\nbool\n\u00b6\nWhether the asset\u2019s slots are frozen by default or not, 0 or 1\nNative TEAL opcode:\nitxn\nstatic\nconfig_asset_freeze\n(\n)\n\u2192\nalgopy.Account\n\u00b6\n32 byte address\nNative TEAL opcode:\nitxn\nstatic\nconfig_asset_manager\n(\n)\n\u2192\nalgopy.Account\n\u00b6\n32 byte address\nNative TEAL opcode:\nitxn\nstatic\nconfig_asset_metadata_hash\n(\n)\n\u2192\nalgopy.Bytes\n\u00b6\n32 byte commitment to unspecified asset metadata\nNative TEAL opcode:\nitxn\nstatic\nconfig_asset_name\n(\n)\n\u2192\nalgopy.Bytes\n\u00b6\nThe asset name\nNative TEAL opcode:\nitxn\nstatic\nconfig_asset_reserve\n(\n)\n\u2192\nalgopy.Account\n\u00b6\n32 byte address\nNative TEAL opcode:\nitxn\nstatic\nconfig_asset_total\n(\n)\n\u2192\nalgopy.UInt64\n\u00b6\nTotal number of units of this asset created\nNative TEAL opcode:\nitxn\nstatic\nconfig_asset_unit_name\n(\n)\n\u2192\nalgopy.Bytes\n\u00b6\nUnit name of the asset\nNative TEAL opcode:\nitxn\nstatic\nconfig_asset_url\n(\n)\n\u2192\nalgopy.Bytes\n\u00b6\nURL\nNative TEAL opcode:\nitxn\nstatic\ncreated_application_id\n(\n)\n\u2192\nalgopy.Application\n\u00b6\nApplicationID allocated by the creation of an application (only with\nitxn\nin v5). Application mode only\nNative TEAL opcode:\nitxn\nstatic\ncreated_asset_id\n(\n)\n\u2192\nalgopy.Asset\n\u00b6\nAsset ID allocated by the creation of an ASA (only with\nitxn\nin v5). Application mode only\nNative TEAL opcode:\nitxn\nstatic\nextra_program_pages\n(\n)\n\u2192\nalgopy.UInt64\n\u00b6\nNumber of additional pages for each of the application\u2019s approval and clear state programs. An ExtraProgramPages of 1 means 2048 more total bytes, or 1024 for each program.\nNative TEAL opcode:\nitxn\nstatic\nfee\n(\n)\n\u2192\nalgopy.UInt64\n\u00b6\nmicroalgos\nNative TEAL opcode:\nitxn\nstatic\nfirst_valid\n(\n)\n\u2192\nalgopy.UInt64\n\u00b6\nround number\nNative TEAL opcode:\nitxn\nstatic\nfirst_valid_time\n(\n)\n\u2192\nalgopy.UInt64\n\u00b6\nUNIX timestamp of block before txn.FirstValid. Fails if negative\nNative TEAL opcode:\nitxn\nstatic\nfreeze_asset\n(\n)\n\u2192\nalgopy.Asset\n\u00b6\nAsset ID being frozen or un-frozen\nNative TEAL opcode:\nitxn\nstatic\nfreeze_asset_account\n(\n)\n\u2192\nalgopy.Account\n\u00b6\n32 byte address of the account whose asset slot is being frozen or un-frozen\nNative TEAL opcode:\nitxn\nstatic\nfreeze_asset_frozen\n(\n)\n\u2192\nbool\n\u00b6\nThe new frozen value, 0 or 1\nNative TEAL opcode:\nitxn\nstatic\nglobal_num_byte_slice\n(\n)\n\u2192\nalgopy.UInt64\n\u00b6\nNumber of global state byteslices in ApplicationCall\nNative TEAL opcode:\nitxn\nstatic\nglobal_num_uint\n(\n)\n\u2192\nalgopy.UInt64\n\u00b6\nNumber of global state integers in ApplicationCall\nNative TEAL opcode:\nitxn\nstatic\ngroup_index\n(\n)\n\u2192\nalgopy.UInt64\n\u00b6\nPosition of this transaction within an atomic transaction group. A stand-alone transaction is implicitly element 0 in a group of 1\nNative TEAL opcode:\nitxn\nstatic\nlast_log\n(\n)\n\u2192\nalgopy.Bytes\n\u00b6\nThe last message emitted. Empty bytes if none were emitted. Application mode only\nNative TEAL opcode:\nitxn\nstatic\nlast_valid\n(\n)\n\u2192\nalgopy.UInt64\n\u00b6\nround number\nNative TEAL opcode:\nitxn\nstatic\nlease\n(\n)\n\u2192\nalgopy.Bytes\n\u00b6\n32 byte lease value\nNative TEAL opcode:\nitxn\nstatic\nlocal_num_byte_slice\n(\n)\n\u2192\nalgopy.UInt64\n\u00b6\nNumber of local state byteslices in ApplicationCall\nNative TEAL opcode:\nitxn\nstatic\nlocal_num_uint\n(\n)\n\u2192\nalgopy.UInt64\n\u00b6\nNumber of local state integers in ApplicationCall\nNative TEAL opcode:\nitxn\nstatic\nlogs\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nLog messages emitted by an application call (only with\nitxn\nin v5). Application mode only\nNative TEAL opcode:\nitxna\n,\nitxnas\nstatic\nnonparticipation\n(\n)\n\u2192\nbool\n\u00b6\nMarks an account nonparticipating for rewards\nNative TEAL opcode:\nitxn\nstatic\nnote\n(\n)\n\u2192\nalgopy.Bytes\n\u00b6\nAny data up to 1024 bytes\nNative TEAL opcode:\nitxn\nstatic\nnum_accounts\n(\n)\n\u2192\nalgopy.UInt64\n\u00b6\nNumber of Accounts\nNative TEAL opcode:\nitxn\nstatic\nnum_app_args\n(\n)\n\u2192\nalgopy.UInt64\n\u00b6\nNumber of ApplicationArgs\nNative TEAL opcode:\nitxn\nstatic\nnum_applications\n(\n)\n\u2192\nalgopy.UInt64\n\u00b6\nNumber of Applications\nNative TEAL opcode:\nitxn\nstatic\nnum_approval_program_pages\n(\n)\n\u2192\nalgopy.UInt64\n\u00b6\nNumber of Approval Program pages\nNative TEAL opcode:\nitxn\nstatic\nnum_assets\n(\n)\n\u2192\nalgopy.UInt64\n\u00b6\nNumber of Assets\nNative TEAL opcode:\nitxn\nstatic\nnum_clear_state_program_pages\n(\n)\n\u2192\nalgopy.UInt64\n\u00b6\nNumber of ClearState Program pages\nNative TEAL opcode:\nitxn\nstatic\nnum_logs\n(\n)\n\u2192\nalgopy.UInt64\n\u00b6\nNumber of Logs (only with\nitxn\nin v5). Application mode only\nNative TEAL opcode:\nitxn\nstatic\non_completion\n(\n)\n\u2192\nalgopy.OnCompleteAction\n\u00b6\nApplicationCall transaction on completion action\nNative TEAL opcode:\nitxn\nstatic\nreceiver\n(\n)\n\u2192\nalgopy.Account\n\u00b6\n32 byte address\nNative TEAL opcode:\nitxn\nstatic\nrekey_to\n(\n)\n\u2192\nalgopy.Account\n\u00b6\n32 byte Sender\u2019s new AuthAddr\nNative TEAL opcode:\nitxn\nstatic\nselection_pk\n(\n)\n\u2192\nalgopy.Bytes\n\u00b6\n32 byte address\nNative TEAL opcode:\nitxn\nstatic\nsender\n(\n)\n\u2192\nalgopy.Account\n\u00b6\n32 byte address\nNative TEAL opcode:\nitxn\nstatic\nstate_proof_pk\n(\n)\n\u2192\nalgopy.Bytes\n\u00b6\n64 byte state proof public key\nNative TEAL opcode:\nitxn\nstatic\ntx_id\n(\n)\n\u2192\nalgopy.Bytes\n\u00b6\nThe computed ID for this transaction. 32 bytes.\nNative TEAL opcode:\nitxn\nstatic\ntype\n(\n)\n\u2192\nalgopy.Bytes\n\u00b6\nTransaction type as bytes\nNative TEAL opcode:\nitxn\nstatic\ntype_enum\n(\n)\n\u2192\nalgopy.TransactionType\n\u00b6\nTransaction type as integer\nNative TEAL opcode:\nitxn\nstatic\nvote_first\n(\n)\n\u2192\nalgopy.UInt64\n\u00b6\nThe first round that the participation key is valid.\nNative TEAL opcode:\nitxn\nstatic\nvote_key_dilution\n(\n)\n\u2192\nalgopy.UInt64\n\u00b6\nDilution for the 2-level participation key\nNative TEAL opcode:\nitxn\nstatic\nvote_last\n(\n)\n\u2192\nalgopy.UInt64\n\u00b6\nThe last round that the participation key is valid.\nNative TEAL opcode:\nitxn\nstatic\nvote_pk\n(\n)\n\u2192\nalgopy.Bytes\n\u00b6\n32 byte address\nNative TEAL opcode:\nitxn\nstatic\nxfer_asset\n(\n)\n\u2192\nalgopy.Asset\n\u00b6\nAsset ID\nNative TEAL opcode:\nitxn\nclass\nalgopy.op.\nITxnCreate\n\u00b6\nCreate inner transactions\nNative TEAL ops:\nitxn_begin\n,\nitxn_field\n,\nitxn_next\n,\nitxn_submit\nstatic\nbegin\n(\n)\n\u2192\nNone\n\u00b6\nbegin preparation of a new inner transaction in a new transaction group\nitxn_begin\ninitializes Sender to the application address; Fee to the minimum allowable, taking into account MinTxnFee and credit from overpaying in earlier transactions; FirstValid\/LastValid to the values in the invoking transaction, and all other fields to zero or empty values.\nNative TEAL opcode:\nitxn_begin\nstatic\nnext\n(\n)\n\u2192\nNone\n\u00b6\nbegin preparation of a new inner transaction in the same transaction group\nitxn_next\ninitializes the transaction exactly as\nitxn_begin\ndoes\nNative TEAL opcode:\nitxn_next\nstatic\nset_accounts\n(\na\n:\nalgopy.Account\n,\n\/\n)\n\u2192\nNone\n\u00b6\nParameters\n:\na\n(\nAccount\n) \u2013 Accounts listed in the ApplicationCall transaction\nNative TEAL opcode:\nitxn_field\nstatic\nset_amount\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nNone\n\u00b6\nParameters\n:\na\n(\nUInt64\n|\nint\n) \u2013 microalgos\nNative TEAL opcode:\nitxn_field\nstatic\nset_application_args\n(\na\n:\nalgopy.Bytes\n|\nbytes\n,\n\/\n)\n\u2192\nNone\n\u00b6\nParameters\n:\na\n(\nBytes\n|\nbytes\n) \u2013 Arguments passed to the application in the ApplicationCall transaction\nNative TEAL opcode:\nitxn_field\nstatic\nset_application_id\n(\na\n:\nalgopy.Application\n|\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nNone\n\u00b6\nParameters\n:\na\n(\nApplication\n|\nUInt64\n|\nint\n) \u2013 ApplicationID from ApplicationCall transaction\nNative TEAL opcode:\nitxn_field\nstatic\nset_applications\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nNone\n\u00b6\nParameters\n:\na\n(\nUInt64\n|\nint\n) \u2013 Foreign Apps listed in the ApplicationCall transaction\nNative TEAL opcode:\nitxn_field\nstatic\nset_approval_program\n(\na\n:\nalgopy.Bytes\n|\nbytes\n,\n\/\n)\n\u2192\nNone\n\u00b6\nParameters\n:\na\n(\nBytes\n|\nbytes\n) \u2013 Approval program\nNative TEAL opcode:\nitxn_field\nstatic\nset_approval_program_pages\n(\na\n:\nalgopy.Bytes\n|\nbytes\n,\n\/\n)\n\u2192\nNone\n\u00b6\nParameters\n:\na\n(\nBytes\n|\nbytes\n) \u2013 Approval Program as an array of pages\nNative TEAL opcode:\nitxn_field\nstatic\nset_asset_amount\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nNone\n\u00b6\nParameters\n:\na\n(\nUInt64\n|\nint\n) \u2013 value in Asset\u2019s units\nNative TEAL opcode:\nitxn_field\nstatic\nset_asset_close_to\n(\na\n:\nalgopy.Account\n,\n\/\n)\n\u2192\nNone\n\u00b6\nParameters\n:\na\n(\nAccount\n) \u2013 32 byte address\nNative TEAL opcode:\nitxn_field\nstatic\nset_asset_receiver\n(\na\n:\nalgopy.Account\n,\n\/\n)\n\u2192\nNone\n\u00b6\nParameters\n:\na\n(\nAccount\n) \u2013 32 byte address\nNative TEAL opcode:\nitxn_field\nstatic\nset_asset_sender\n(\na\n:\nalgopy.Account\n,\n\/\n)\n\u2192\nNone\n\u00b6\nParameters\n:\na\n(\nAccount\n) \u2013 32 byte address. Source of assets if Sender is the Asset\u2019s Clawback address.\nNative TEAL opcode:\nitxn_field\nstatic\nset_assets\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nNone\n\u00b6\nParameters\n:\na\n(\nUInt64\n|\nint\n) \u2013 Foreign Assets listed in the ApplicationCall transaction\nNative TEAL opcode:\nitxn_field\nstatic\nset_clear_state_program\n(\na\n:\nalgopy.Bytes\n|\nbytes\n,\n\/\n)\n\u2192\nNone\n\u00b6\nParameters\n:\na\n(\nBytes\n|\nbytes\n) \u2013 Clear state program\nNative TEAL opcode:\nitxn_field\nstatic\nset_clear_state_program_pages\n(\na\n:\nalgopy.Bytes\n|\nbytes\n,\n\/\n)\n\u2192\nNone\n\u00b6\nParameters\n:\na\n(\nBytes\n|\nbytes\n) \u2013 ClearState Program as an array of pages\nNative TEAL opcode:\nitxn_field\nstatic\nset_close_remainder_to\n(\na\n:\nalgopy.Account\n,\n\/\n)\n\u2192\nNone\n\u00b6\nParameters\n:\na\n(\nAccount\n) \u2013 32 byte address\nNative TEAL opcode:\nitxn_field\nstatic\nset_config_asset\n(\na\n:\nalgopy.Asset\n|\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nNone\n\u00b6\nParameters\n:\na\n(\nAsset\n|\nUInt64\n|\nint\n) \u2013 Asset ID in asset config transaction\nNative TEAL opcode:\nitxn_field\nstatic\nset_config_asset_clawback\n(\na\n:\nalgopy.Account\n,\n\/\n)\n\u2192\nNone\n\u00b6\nParameters\n:\na\n(\nAccount\n) \u2013 32 byte address\nNative TEAL opcode:\nitxn_field\nstatic\nset_config_asset_decimals\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nNone\n\u00b6\nParameters\n:\na\n(\nUInt64\n|\nint\n) \u2013 Number of digits to display after the decimal place when displaying the asset\nNative TEAL opcode:\nitxn_field\nstatic\nset_config_asset_default_frozen\n(\na\n:\nbool\n|\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nNone\n\u00b6\nParameters\n:\na\n(\nbool\n|\nUInt64\n|\nint\n) \u2013 Whether the asset\u2019s slots are frozen by default or not, 0 or 1\nNative TEAL opcode:\nitxn_field\nstatic\nset_config_asset_freeze\n(\na\n:\nalgopy.Account\n,\n\/\n)\n\u2192\nNone\n\u00b6\nParameters\n:\na\n(\nAccount\n) \u2013 32 byte address\nNative TEAL opcode:\nitxn_field\nstatic\nset_config_asset_manager\n(\na\n:\nalgopy.Account\n,\n\/\n)\n\u2192\nNone\n\u00b6\nParameters\n:\na\n(\nAccount\n) \u2013 32 byte address\nNative TEAL opcode:\nitxn_field\nstatic\nset_config_asset_metadata_hash\n(\na\n:\nalgopy.Bytes\n|\nbytes\n,\n\/\n)\n\u2192\nNone\n\u00b6\nParameters\n:\na\n(\nBytes\n|\nbytes\n) \u2013 32 byte commitment to unspecified asset metadata\nNative TEAL opcode:\nitxn_field\nstatic\nset_config_asset_name\n(\na\n:\nalgopy.Bytes\n|\nbytes\n,\n\/\n)\n\u2192\nNone\n\u00b6\nParameters\n:\na\n(\nBytes\n|\nbytes\n) \u2013 The asset name\nNative TEAL opcode:\nitxn_field\nstatic\nset_config_asset_reserve\n(\na\n:\nalgopy.Account\n,\n\/\n)\n\u2192\nNone\n\u00b6\nParameters\n:\na\n(\nAccount\n) \u2013 32 byte address\nNative TEAL opcode:\nitxn_field\nstatic\nset_config_asset_total\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nNone\n\u00b6\nParameters\n:\na\n(\nUInt64\n|\nint\n) \u2013 Total number of units of this asset created\nNative TEAL opcode:\nitxn_field\nstatic\nset_config_asset_unit_name\n(\na\n:\nalgopy.Bytes\n|\nbytes\n,\n\/\n)\n\u2192\nNone\n\u00b6\nParameters\n:\na\n(\nBytes\n|\nbytes\n) \u2013 Unit name of the asset\nNative TEAL opcode:\nitxn_field\nstatic\nset_config_asset_url\n(\na\n:\nalgopy.Bytes\n|\nbytes\n,\n\/\n)\n\u2192\nNone\n\u00b6\nParameters\n:\na\n(\nBytes\n|\nbytes\n) \u2013 URL\nNative TEAL opcode:\nitxn_field\nstatic\nset_extra_program_pages\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nNone\n\u00b6\nParameters\n:\na\n(\nUInt64\n|\nint\n) \u2013 Number of additional pages for each of the application\u2019s approval and clear state programs. An ExtraProgramPages of 1 means 2048 more total bytes, or 1024 for each program.\nNative TEAL opcode:\nitxn_field\nstatic\nset_fee\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nNone\n\u00b6\nParameters\n:\na\n(\nUInt64\n|\nint\n) \u2013 microalgos\nNative TEAL opcode:\nitxn_field\nstatic\nset_freeze_asset\n(\na\n:\nalgopy.Asset\n|\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nNone\n\u00b6\nParameters\n:\na\n(\nAsset\n|\nUInt64\n|\nint\n) \u2013 Asset ID being frozen or un-frozen\nNative TEAL opcode:\nitxn_field\nstatic\nset_freeze_asset_account\n(\na\n:\nalgopy.Account\n,\n\/\n)\n\u2192\nNone\n\u00b6\nParameters\n:\na\n(\nAccount\n) \u2013 32 byte address of the account whose asset slot is being frozen or un-frozen\nNative TEAL opcode:\nitxn_field\nstatic\nset_freeze_asset_frozen\n(\na\n:\nbool\n|\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nNone\n\u00b6\nParameters\n:\na\n(\nbool\n|\nUInt64\n|\nint\n) \u2013 The new frozen value, 0 or 1\nNative TEAL opcode:\nitxn_field\nstatic\nset_global_num_byte_slice\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nNone\n\u00b6\nParameters\n:\na\n(\nUInt64\n|\nint\n) \u2013 Number of global state byteslices in ApplicationCall\nNative TEAL opcode:\nitxn_field\nstatic\nset_global_num_uint\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nNone\n\u00b6\nParameters\n:\na\n(\nUInt64\n|\nint\n) \u2013 Number of global state integers in ApplicationCall\nNative TEAL opcode:\nitxn_field\nstatic\nset_local_num_byte_slice\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nNone\n\u00b6\nParameters\n:\na\n(\nUInt64\n|\nint\n) \u2013 Number of local state byteslices in ApplicationCall\nNative TEAL opcode:\nitxn_field\nstatic\nset_local_num_uint\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nNone\n\u00b6\nParameters\n:\na\n(\nUInt64\n|\nint\n) \u2013 Number of local state integers in ApplicationCall\nNative TEAL opcode:\nitxn_field\nstatic\nset_nonparticipation\n(\na\n:\nbool\n|\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nNone\n\u00b6\nParameters\n:\na\n(\nbool\n|\nUInt64\n|\nint\n) \u2013 Marks an account nonparticipating for rewards\nNative TEAL opcode:\nitxn_field\nstatic\nset_note\n(\na\n:\nalgopy.Bytes\n|\nbytes\n,\n\/\n)\n\u2192\nNone\n\u00b6\nParameters\n:\na\n(\nBytes\n|\nbytes\n) \u2013 Any data up to 1024 bytes\nNative TEAL opcode:\nitxn_field\nstatic\nset_on_completion\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nNone\n\u00b6\nParameters\n:\na\n(\nUInt64\n|\nint\n) \u2013 ApplicationCall transaction on completion action\nNative TEAL opcode:\nitxn_field\nstatic\nset_receiver\n(\na\n:\nalgopy.Account\n,\n\/\n)\n\u2192\nNone\n\u00b6\nParameters\n:\na\n(\nAccount\n) \u2013 32 byte address\nNative TEAL opcode:\nitxn_field\nstatic\nset_rekey_to\n(\na\n:\nalgopy.Account\n,\n\/\n)\n\u2192\nNone\n\u00b6\nParameters\n:\na\n(\nAccount\n) \u2013 32 byte Sender\u2019s new AuthAddr\nNative TEAL opcode:\nitxn_field\nstatic\nset_selection_pk\n(\na\n:\nalgopy.Bytes\n|\nbytes\n,\n\/\n)\n\u2192\nNone\n\u00b6\nParameters\n:\na\n(\nBytes\n|\nbytes\n) \u2013 32 byte address\nNative TEAL opcode:\nitxn_field\nstatic\nset_sender\n(\na\n:\nalgopy.Account\n,\n\/\n)\n\u2192\nNone\n\u00b6\nParameters\n:\na\n(\nAccount\n) \u2013 32 byte address\nNative TEAL opcode:\nitxn_field\nstatic\nset_state_proof_pk\n(\na\n:\nalgopy.Bytes\n|\nbytes\n,\n\/\n)\n\u2192\nNone\n\u00b6\nParameters\n:\na\n(\nBytes\n|\nbytes\n) \u2013 64 byte state proof public key\nNative TEAL opcode:\nitxn_field\nstatic\nset_type\n(\na\n:\nalgopy.Bytes\n|\nbytes\n,\n\/\n)\n\u2192\nNone\n\u00b6\nParameters\n:\na\n(\nBytes\n|\nbytes\n) \u2013 Transaction type as bytes\nNative TEAL opcode:\nitxn_field\nstatic\nset_type_enum\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nNone\n\u00b6\nParameters\n:\na\n(\nUInt64\n|\nint\n) \u2013 Transaction type as integer\nNative TEAL opcode:\nitxn_field\nstatic\nset_vote_first\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nNone\n\u00b6\nParameters\n:\na\n(\nUInt64\n|\nint\n) \u2013 The first round that the participation key is valid.\nNative TEAL opcode:\nitxn_field\nstatic\nset_vote_key_dilution\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nNone\n\u00b6\nParameters\n:\na\n(\nUInt64\n|\nint\n) \u2013 Dilution for the 2-level participation key\nNative TEAL opcode:\nitxn_field\nstatic\nset_vote_last\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nNone\n\u00b6\nParameters\n:\na\n(\nUInt64\n|\nint\n) \u2013 The last round that the participation key is valid.\nNative TEAL opcode:\nitxn_field\nstatic\nset_vote_pk\n(\na\n:\nalgopy.Bytes\n|\nbytes\n,\n\/\n)\n\u2192\nNone\n\u00b6\nParameters\n:\na\n(\nBytes\n|\nbytes\n) \u2013 32 byte address\nNative TEAL opcode:\nitxn_field\nstatic\nset_xfer_asset\n(\na\n:\nalgopy.Asset\n|\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nNone\n\u00b6\nParameters\n:\na\n(\nAsset\n|\nUInt64\n|\nint\n) \u2013 Asset ID\nNative TEAL opcode:\nitxn_field\nstatic\nsubmit\n(\n)\n\u2192\nNone\n\u00b6\nexecute the current inner transaction group. Fail if executing this group would exceed the inner transaction limit, or if any transaction in the group fails.\nitxn_submit\nresets the current transaction so that it can not be resubmitted. A new\nitxn_begin\nis required to prepare another inner transaction.\nNative TEAL opcode:\nitxn_submit\nclass\nalgopy.op.\nJsonRef\n\u00b6\nkey B\u2019s value, of type R, from a\nvalid\nutf-8 encoded json object A\nWarning\n: Usage should be restricted to very rare use cases, as JSON decoding is expensive and quite limited. In addition, JSON objects are large and not optimized for size. Almost all smart contracts should use simpler and smaller methods (such as the\nABI\n. This opcode should only be used in cases where JSON is only available option, e.g. when a third-party only signs JSON.\nNative TEAL op:\njson_ref\nstatic\njson_object\n(\na\n:\nalgopy.Bytes\n|\nbytes\n,\nb\n:\nalgopy.Bytes\n|\nbytes\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nNative TEAL opcode:\njson_ref\nstatic\njson_string\n(\na\n:\nalgopy.Bytes\n|\nbytes\n,\nb\n:\nalgopy.Bytes\n|\nbytes\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nNative TEAL opcode:\njson_ref\nstatic\njson_uint64\n(\na\n:\nalgopy.Bytes\n|\nbytes\n,\nb\n:\nalgopy.Bytes\n|\nbytes\n,\n\/\n,\n)\n\u2192\nalgopy.UInt64\n\u00b6\nNative TEAL opcode:\njson_ref\nclass\nalgopy.op.\nMiMCConfigurations\n\u00b6\nAvailable values for the\nMimc\nConfigurations\nenum\nInitialization\nInitialize self. See help(type(self)) for accurate signature.\nBLS12_381Mp111\n:\nalgopy.op.MiMCConfigurations\n\u00b6\nEllipsis\nMiMC configuration for the BLS12-381 curve with Miyaguchi-Preneel mode, 111 rounds, exponent 5, seed \u201cseed\u201d\nMin AVM version: 11\nBN254Mp110\n:\nalgopy.op.MiMCConfigurations\n\u00b6\nEllipsis\nMiMC configuration for the BN254 curve with Miyaguchi-Preneel mode, 110 rounds, exponent 5, seed \u201cseed\u201d\nMin AVM version: 11\n__add__\n(\n)\n\u00b6\nReturn self+value.\n__contains__\n(\n)\n\u00b6\nReturn bool(key in self).\n__delattr__\n(\n)\n\u00b6\nImplement delattr(self, name).\n__dir__\n(\n)\n\u00b6\nDefault dir() implementation.\n__eq__\n(\n)\n\u00b6\nReturn self==value.\n__format__\n(\n)\n\u00b6\nReturn a formatted version of the string as described by format_spec.\n__ge__\n(\n)\n\u00b6\nReturn self>=value.\n__getattribute__\n(\n)\n\u00b6\nReturn getattr(self, name).\n__getitem__\n(\n)\n\u00b6\nReturn self[key].\n__getstate__\n(\n)\n\u00b6\nHelper for pickle.\n__gt__\n(\n)\n\u00b6\nReturn self>value.\n__hash__\n(\n)\n\u00b6\nReturn hash(self).\n__iter__\n(\n)\n\u00b6\nImplement iter(self).\n__le__\n(\n)\n\u00b6\nReturn self<=value.\n__len__\n(\n)\n\u00b6\nReturn len(self).\n__lt__\n(\n)\n\u00b6\nReturn self int\nReturn the number of non-overlapping occurrences of substring sub in\nstring S[start:end]. Optional arguments start and end are\ninterpreted as in slice notation.\nencode\n(\n)\n\u00b6\nEncode the string using the codec registered for encoding.\nencoding\nThe encoding in which to encode the string.\nerrors\nThe error handling scheme to use for encoding errors.\nThe default is \u2018strict\u2019 meaning that encoding errors raise a\nUnicodeEncodeError. Other possible values are \u2018ignore\u2019, \u2018replace\u2019 and\n\u2018xmlcharrefreplace\u2019 as well as any other name registered with\ncodecs.register_error that can handle UnicodeEncodeErrors.\nendswith\n(\n)\n\u00b6\nS.endswith(suffix[, start[, end]]) -> bool\nReturn True if S ends with the specified suffix, False otherwise.\nWith optional start, test S beginning at that position.\nWith optional end, stop comparing S at that position.\nsuffix can also be a tuple of strings to try.\nexpandtabs\n(\n)\n\u00b6\nReturn a copy where all tab characters are expanded using spaces.\nIf tabsize is not given, a tab size of 8 characters is assumed.\nfind\n(\n)\n\u00b6\nS.find(sub[, start[, end]]) -> int\nReturn the lowest index in S where substring sub is found,\nsuch that sub is contained within S[start:end]. Optional\narguments start and end are interpreted as in slice notation.\nReturn -1 on failure.\nformat\n(\n)\n\u00b6\nS.format(*args, **kwargs) -> str\nReturn a formatted version of S, using substitutions from args and kwargs.\nThe substitutions are identified by braces (\u2018{\u2019 and \u2018}\u2019).\nformat_map\n(\n)\n\u00b6\nS.format_map(mapping) -> str\nReturn a formatted version of S, using substitutions from mapping.\nThe substitutions are identified by braces (\u2018{\u2019 and \u2018}\u2019).\nindex\n(\n)\n\u00b6\nS.index(sub[, start[, end]]) -> int\nReturn the lowest index in S where substring sub is found,\nsuch that sub is contained within S[start:end]. Optional\narguments start and end are interpreted as in slice notation.\nRaises ValueError when the substring is not found.\nisalnum\n(\n)\n\u00b6\nReturn True if the string is an alpha-numeric string, False otherwise.\nA string is alpha-numeric if all characters in the string are alpha-numeric and\nthere is at least one character in the string.\nisalpha\n(\n)\n\u00b6\nReturn True if the string is an alphabetic string, False otherwise.\nA string is alphabetic if all characters in the string are alphabetic and there\nis at least one character in the string.\nisascii\n(\n)\n\u00b6\nReturn True if all characters in the string are ASCII, False otherwise.\nASCII characters have code points in the range U+0000-U+007F.\nEmpty string is ASCII too.\nisdecimal\n(\n)\n\u00b6\nReturn True if the string is a decimal string, False otherwise.\nA string is a decimal string if all characters in the string are decimal and\nthere is at least one character in the string.\nisdigit\n(\n)\n\u00b6\nReturn True if the string is a digit string, False otherwise.\nA string is a digit string if all characters in the string are digits and there\nis at least one character in the string.\nisidentifier\n(\n)\n\u00b6\nReturn True if the string is a valid Python identifier, False otherwise.\nCall keyword.iskeyword(s) to test whether string s is a reserved identifier,\nsuch as \u201cdef\u201d or \u201cclass\u201d.\nislower\n(\n)\n\u00b6\nReturn True if the string is a lowercase string, False otherwise.\nA string is lowercase if all cased characters in the string are lowercase and\nthere is at least one cased character in the string.\nisnumeric\n(\n)\n\u00b6\nReturn True if the string is a numeric string, False otherwise.\nA string is numeric if all characters in the string are numeric and there is at\nleast one character in the string.\nisprintable\n(\n)\n\u00b6\nReturn True if the string is printable, False otherwise.\nA string is printable if all of its characters are considered printable in\nrepr() or if it is empty.\nisspace\n(\n)\n\u00b6\nReturn True if the string is a whitespace string, False otherwise.\nA string is whitespace if all characters in the string are whitespace and there\nis at least one character in the string.\nistitle\n(\n)\n\u00b6\nReturn True if the string is a title-cased string, False otherwise.\nIn a title-cased string, upper- and title-case characters may only\nfollow uncased characters and lowercase characters only cased ones.\nisupper\n(\n)\n\u00b6\nReturn True if the string is an uppercase string, False otherwise.\nA string is uppercase if all cased characters in the string are uppercase and\nthere is at least one cased character in the string.\njoin\n(\n)\n\u00b6\nConcatenate any number of strings.\nThe string whose method is called is inserted in between each given string.\nThe result is returned as a new string.\nExample: \u2018.\u2019.join([\u2018ab\u2019, \u2018pq\u2019, \u2018rs\u2019]) -> \u2018ab.pq.rs\u2019\nljust\n(\n)\n\u00b6\nReturn a left-justified string of length width.\nPadding is done using the specified fill character (default is a space).\nlower\n(\n)\n\u00b6\nReturn a copy of the string converted to lowercase.\nlstrip\n(\n)\n\u00b6\nReturn a copy of the string with leading whitespace removed.\nIf chars is given and not None, remove characters in chars instead.\npartition\n(\n)\n\u00b6\nPartition the string into three parts using the given separator.\nThis will search for the separator in the string. If the separator is found,\nreturns a 3-tuple containing the part before the separator, the separator\nitself, and the part after it.\nIf the separator is not found, returns a 3-tuple containing the original string\nand two empty strings.\nremoveprefix\n(\n)\n\u00b6\nReturn a str with the given prefix string removed if present.\nIf the string starts with the prefix string, return string[len(prefix):].\nOtherwise, return a copy of the original string.\nremovesuffix\n(\n)\n\u00b6\nReturn a str with the given suffix string removed if present.\nIf the string ends with the suffix string and that suffix is not empty,\nreturn string[:-len(suffix)]. Otherwise, return a copy of the original\nstring.\nreplace\n(\n)\n\u00b6\nReturn a copy with all occurrences of substring old replaced by new.\ncount\nMaximum number of occurrences to replace.\n-1 (the default value) means replace all occurrences.\nIf the optional argument count is given, only the first count occurrences are\nreplaced.\nrfind\n(\n)\n\u00b6\nS.rfind(sub[, start[, end]]) -> int\nReturn the highest index in S where substring sub is found,\nsuch that sub is contained within S[start:end]. Optional\narguments start and end are interpreted as in slice notation.\nReturn -1 on failure.\nrindex\n(\n)\n\u00b6\nS.rindex(sub[, start[, end]]) -> int\nReturn the highest index in S where substring sub is found,\nsuch that sub is contained within S[start:end]. Optional\narguments start and end are interpreted as in slice notation.\nRaises ValueError when the substring is not found.\nrjust\n(\n)\n\u00b6\nReturn a right-justified string of length width.\nPadding is done using the specified fill character (default is a space).\nrpartition\n(\n)\n\u00b6\nPartition the string into three parts using the given separator.\nThis will search for the separator in the string, starting at the end. If\nthe separator is found, returns a 3-tuple containing the part before the\nseparator, the separator itself, and the part after it.\nIf the separator is not found, returns a 3-tuple containing two empty strings\nand the original string.\nrsplit\n(\n)\n\u00b6\nReturn a list of the substrings in the string, using sep as the separator string.\nsep\nThe separator used to split the string.\nWhen set to None (the default value), will split on any whitespace\ncharacter (including \\n \\r \\t \\f and spaces) and will discard\nempty strings from the result.\nmaxsplit\nMaximum number of splits.\n-1 (the default value) means no limit.\nSplitting starts at the end of the string and works to the front.\nrstrip\n(\n)\n\u00b6\nReturn a copy of the string with trailing whitespace removed.\nIf chars is given and not None, remove characters in chars instead.\nsplit\n(\n)\n\u00b6\nReturn a list of the substrings in the string, using sep as the separator string.\nsep\nThe separator used to split the string.\nWhen set to None (the default value), will split on any whitespace\ncharacter (including \\n \\r \\t \\f and spaces) and will discard\nempty strings from the result.\nmaxsplit\nMaximum number of splits.\n-1 (the default value) means no limit.\nSplitting starts at the front of the string and works to the end.\nNote, str.split() is mainly useful for data that has been intentionally\ndelimited. With natural text that includes punctuation, consider using\nthe regular expression module.\nsplitlines\n(\n)\n\u00b6\nReturn a list of the lines in the string, breaking at line boundaries.\nLine breaks are not included in the resulting list unless keepends is given and\ntrue.\nstartswith\n(\n)\n\u00b6\nS.startswith(prefix[, start[, end]]) -> bool\nReturn True if S starts with the specified prefix, False otherwise.\nWith optional start, test S beginning at that position.\nWith optional end, stop comparing S at that position.\nprefix can also be a tuple of strings to try.\nstrip\n(\n)\n\u00b6\nReturn a copy of the string with leading and trailing whitespace removed.\nIf chars is given and not None, remove characters in chars instead.\nswapcase\n(\n)\n\u00b6\nConvert uppercase characters to lowercase and lowercase characters to uppercase.\ntitle\n(\n)\n\u00b6\nReturn a version of the string where each word is titlecased.\nMore specifically, words start with uppercased characters and all remaining\ncased characters have lower case.\ntranslate\n(\n)\n\u00b6\nReplace each character in the string using the given translation table.\ntable\nTranslation table, which must be a mapping of Unicode ordinals to\nUnicode ordinals, strings, or None.\nThe table must implement lookup\/indexing via\ngetitem\n, for instance a\ndictionary or list. If this operation raises LookupError, the character is\nleft untouched. Characters mapped to None are deleted.\nupper\n(\n)\n\u00b6\nReturn a copy of the string converted to uppercase.\nzfill\n(\n)\n\u00b6\nPad a numeric string with zeros on the left, to fill a field of the given width.\nThe string is never truncated.\nclass\nalgopy.op.\nScratch\n\u00b6\nLoad or store scratch values\nNative TEAL ops:\nloads\n,\nstores\nstatic\nload_bytes\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nAth scratch space value. All scratch spaces are 0 at program start.\nNative TEAL opcode:\nloads\nstatic\nload_uint64\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nAth scratch space value. All scratch spaces are 0 at program start.\nNative TEAL opcode:\nloads\nstatic\nstore\n(\na\n:\nalgopy.UInt64\n|\nint\n,\nb\n:\nalgopy.Bytes\n|\nalgopy.UInt64\n|\nbytes\n|\nint\n,\n\/\n,\n)\n\u2192\nNone\n\u00b6\nstore B to the Ath scratch space\nNative TEAL opcode:\nstores\nclass\nalgopy.op.\nTxn\n\u00b6\nGet values for the current executing transaction\nNative TEAL ops:\ntxn\n,\ntxnas\nstatic\naccounts\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Account\n\u00b6\nAccounts listed in the ApplicationCall transaction\nNative TEAL opcode:\ntxna\n,\ntxnas\namount\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nmicroalgos\nstatic\napplication_args\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nArguments passed to the application in the ApplicationCall transaction\nNative TEAL opcode:\ntxna\n,\ntxnas\napplication_id\n:\nFinal\n[\nalgopy.Application\n]\n\u00b6\nEllipsis\nApplicationID from ApplicationCall transaction\nstatic\napplications\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Application\n\u00b6\nForeign Apps listed in the ApplicationCall transaction\nNative TEAL opcode:\ntxna\n,\ntxnas\napproval_program\n:\nFinal\n[\nalgopy.Bytes\n]\n\u00b6\nEllipsis\nApproval program\nstatic\napproval_program_pages\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nApproval Program as an array of pages\nNative TEAL opcode:\ntxna\n,\ntxnas\nasset_amount\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nvalue in Asset\u2019s units\nasset_close_to\n:\nFinal\n[\nalgopy.Account\n]\n\u00b6\nEllipsis\n32 byte address\nasset_receiver\n:\nFinal\n[\nalgopy.Account\n]\n\u00b6\nEllipsis\n32 byte address\nasset_sender\n:\nFinal\n[\nalgopy.Account\n]\n\u00b6\nEllipsis\n32 byte address. Source of assets if Sender is the Asset\u2019s Clawback address.\nstatic\nassets\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Asset\n\u00b6\nForeign Assets listed in the ApplicationCall transaction\nNative TEAL opcode:\ntxna\n,\ntxnas\nclear_state_program\n:\nFinal\n[\nalgopy.Bytes\n]\n\u00b6\nEllipsis\nClear state program\nstatic\nclear_state_program_pages\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nClearState Program as an array of pages\nNative TEAL opcode:\ntxna\n,\ntxnas\nclose_remainder_to\n:\nFinal\n[\nalgopy.Account\n]\n\u00b6\nEllipsis\n32 byte address\nconfig_asset\n:\nFinal\n[\nalgopy.Asset\n]\n\u00b6\nEllipsis\nAsset ID in asset config transaction\nconfig_asset_clawback\n:\nFinal\n[\nalgopy.Account\n]\n\u00b6\nEllipsis\n32 byte address\nconfig_asset_decimals\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nNumber of digits to display after the decimal place when displaying the asset\nconfig_asset_default_frozen\n:\nFinal\n[\nbool\n]\n\u00b6\nEllipsis\nWhether the asset\u2019s slots are frozen by default or not, 0 or 1\nconfig_asset_freeze\n:\nFinal\n[\nalgopy.Account\n]\n\u00b6\nEllipsis\n32 byte address\nconfig_asset_manager\n:\nFinal\n[\nalgopy.Account\n]\n\u00b6\nEllipsis\n32 byte address\nconfig_asset_metadata_hash\n:\nFinal\n[\nalgopy.Bytes\n]\n\u00b6\nEllipsis\n32 byte commitment to unspecified asset metadata\nconfig_asset_name\n:\nFinal\n[\nalgopy.Bytes\n]\n\u00b6\nEllipsis\nThe asset name\nconfig_asset_reserve\n:\nFinal\n[\nalgopy.Account\n]\n\u00b6\nEllipsis\n32 byte address\nconfig_asset_total\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nTotal number of units of this asset created\nconfig_asset_unit_name\n:\nFinal\n[\nalgopy.Bytes\n]\n\u00b6\nEllipsis\nUnit name of the asset\nconfig_asset_url\n:\nFinal\n[\nalgopy.Bytes\n]\n\u00b6\nEllipsis\nURL\ncreated_application_id\n:\nFinal\n[\nalgopy.Application\n]\n\u00b6\nEllipsis\nApplicationID allocated by the creation of an application (only with\nitxn\nin v5). Application mode only\ncreated_asset_id\n:\nFinal\n[\nalgopy.Asset\n]\n\u00b6\nEllipsis\nAsset ID allocated by the creation of an ASA (only with\nitxn\nin v5). Application mode only\nextra_program_pages\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nNumber of additional pages for each of the application\u2019s approval and clear state programs. An ExtraProgramPages of 1 means 2048 more total bytes, or 1024 for each program.\nfee\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nmicroalgos\nfirst_valid\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nround number\nfirst_valid_time\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nUNIX timestamp of block before txn.FirstValid. Fails if negative\nfreeze_asset\n:\nFinal\n[\nalgopy.Asset\n]\n\u00b6\nEllipsis\nAsset ID being frozen or un-frozen\nfreeze_asset_account\n:\nFinal\n[\nalgopy.Account\n]\n\u00b6\nEllipsis\n32 byte address of the account whose asset slot is being frozen or un-frozen\nfreeze_asset_frozen\n:\nFinal\n[\nbool\n]\n\u00b6\nEllipsis\nThe new frozen value, 0 or 1\nglobal_num_byte_slice\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nNumber of global state byteslices in ApplicationCall\nglobal_num_uint\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nNumber of global state integers in ApplicationCall\ngroup_index\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nPosition of this transaction within an atomic transaction group. A stand-alone transaction is implicitly element 0 in a group of 1\nlast_log\n:\nFinal\n[\nalgopy.Bytes\n]\n\u00b6\nEllipsis\nThe last message emitted. Empty bytes if none were emitted. Application mode only\nlast_valid\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nround number\nlease\n:\nFinal\n[\nalgopy.Bytes\n]\n\u00b6\nEllipsis\n32 byte lease value\nlocal_num_byte_slice\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nNumber of local state byteslices in ApplicationCall\nlocal_num_uint\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nNumber of local state integers in ApplicationCall\nstatic\nlogs\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nLog messages emitted by an application call (only with\nitxn\nin v5). Application mode only\nNative TEAL opcode:\ntxna\n,\ntxnas\nnonparticipation\n:\nFinal\n[\nbool\n]\n\u00b6\nEllipsis\nMarks an account nonparticipating for rewards\nnote\n:\nFinal\n[\nalgopy.Bytes\n]\n\u00b6\nEllipsis\nAny data up to 1024 bytes\nnum_accounts\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nNumber of Accounts\nnum_app_args\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nNumber of ApplicationArgs\nnum_applications\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nNumber of Applications\nnum_approval_program_pages\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nNumber of Approval Program pages\nnum_assets\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nNumber of Assets\nnum_clear_state_program_pages\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nNumber of ClearState Program pages\nnum_logs\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nNumber of Logs (only with\nitxn\nin v5). Application mode only\non_completion\n:\nFinal\n[\nalgopy.OnCompleteAction\n]\n\u00b6\nEllipsis\nApplicationCall transaction on completion action\nreceiver\n:\nFinal\n[\nalgopy.Account\n]\n\u00b6\nEllipsis\n32 byte address\nrekey_to\n:\nFinal\n[\nalgopy.Account\n]\n\u00b6\nEllipsis\n32 byte Sender\u2019s new AuthAddr\nselection_pk\n:\nFinal\n[\nalgopy.Bytes\n]\n\u00b6\nEllipsis\n32 byte address\nsender\n:\nFinal\n[\nalgopy.Account\n]\n\u00b6\nEllipsis\n32 byte address\nstate_proof_pk\n:\nFinal\n[\nalgopy.Bytes\n]\n\u00b6\nEllipsis\n64 byte state proof public key\ntx_id\n:\nFinal\n[\nalgopy.Bytes\n]\n\u00b6\nEllipsis\nThe computed ID for this transaction. 32 bytes.\ntype\n:\nFinal\n[\nalgopy.Bytes\n]\n\u00b6\nEllipsis\nTransaction type as bytes\ntype_enum\n:\nFinal\n[\nalgopy.TransactionType\n]\n\u00b6\nEllipsis\nTransaction type as integer\nvote_first\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nThe first round that the participation key is valid.\nvote_key_dilution\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nDilution for the 2-level participation key\nvote_last\n:\nFinal\n[\nalgopy.UInt64\n]\n\u00b6\nEllipsis\nThe last round that the participation key is valid.\nvote_pk\n:\nFinal\n[\nalgopy.Bytes\n]\n\u00b6\nEllipsis\n32 byte address\nxfer_asset\n:\nFinal\n[\nalgopy.Asset\n]\n\u00b6\nEllipsis\nAsset ID\nclass\nalgopy.op.\nVoterParamsGet\n\u00b6\nX is field F from online account A as of the balance round: 320 rounds before the current round. Y is 1 if A had positive algos online in the agreement round, else Y is 0 and X is a type specific zero-value\nNative TEAL op:\nvoter_params_get\nstatic\nvoter_balance\n(\na\n:\nalgopy.Account\n|\nalgopy.UInt64\n|\nint\n,\n\/\n,\n)\n\u2192\ntuple\n[\nalgopy.UInt64\n,\nbool\n]\n\u00b6\nMin AVM version: 11\nReturns tuple[UInt64, bool]\n:\nOnline stake in microalgos\nNative TEAL opcode:\nvoter_params_get\nstatic\nvoter_incentive_eligible\n(\na\n:\nalgopy.Account\n|\nalgopy.UInt64\n|\nint\n,\n\/\n,\n)\n\u2192\ntuple\n[\nbool\n,\nbool\n]\n\u00b6\nMin AVM version: 11\nReturns tuple[bool, bool]\n:\nHad this account opted into block payouts\nNative TEAL opcode:\nvoter_params_get\nclass\nalgopy.op.\nVrfVerify\n\u00b6\nAvailable values for the\nvrf_verify\nenum\nInitialization\nInitialize self. See help(type(self)) for accurate signature.\n__add__\n(\n)\n\u00b6\nReturn self+value.\n__contains__\n(\n)\n\u00b6\nReturn bool(key in self).\n__delattr__\n(\n)\n\u00b6\nImplement delattr(self, name).\n__dir__\n(\n)\n\u00b6\nDefault dir() implementation.\n__eq__\n(\n)\n\u00b6\nReturn self==value.\n__format__\n(\n)\n\u00b6\nReturn a formatted version of the string as described by format_spec.\n__ge__\n(\n)\n\u00b6\nReturn self>=value.\n__getattribute__\n(\n)\n\u00b6\nReturn getattr(self, name).\n__getitem__\n(\n)\n\u00b6\nReturn self[key].\n__getstate__\n(\n)\n\u00b6\nHelper for pickle.\n__gt__\n(\n)\n\u00b6\nReturn self>value.\n__hash__\n(\n)\n\u00b6\nReturn hash(self).\n__iter__\n(\n)\n\u00b6\nImplement iter(self).\n__le__\n(\n)\n\u00b6\nReturn self<=value.\n__len__\n(\n)\n\u00b6\nReturn len(self).\n__lt__\n(\n)\n\u00b6\nReturn self int\nReturn the number of non-overlapping occurrences of substring sub in\nstring S[start:end]. Optional arguments start and end are\ninterpreted as in slice notation.\nencode\n(\n)\n\u00b6\nEncode the string using the codec registered for encoding.\nencoding\nThe encoding in which to encode the string.\nerrors\nThe error handling scheme to use for encoding errors.\nThe default is \u2018strict\u2019 meaning that encoding errors raise a\nUnicodeEncodeError. Other possible values are \u2018ignore\u2019, \u2018replace\u2019 and\n\u2018xmlcharrefreplace\u2019 as well as any other name registered with\ncodecs.register_error that can handle UnicodeEncodeErrors.\nendswith\n(\n)\n\u00b6\nS.endswith(suffix[, start[, end]]) -> bool\nReturn True if S ends with the specified suffix, False otherwise.\nWith optional start, test S beginning at that position.\nWith optional end, stop comparing S at that position.\nsuffix can also be a tuple of strings to try.\nexpandtabs\n(\n)\n\u00b6\nReturn a copy where all tab characters are expanded using spaces.\nIf tabsize is not given, a tab size of 8 characters is assumed.\nfind\n(\n)\n\u00b6\nS.find(sub[, start[, end]]) -> int\nReturn the lowest index in S where substring sub is found,\nsuch that sub is contained within S[start:end]. Optional\narguments start and end are interpreted as in slice notation.\nReturn -1 on failure.\nformat\n(\n)\n\u00b6\nS.format(*args, **kwargs) -> str\nReturn a formatted version of S, using substitutions from args and kwargs.\nThe substitutions are identified by braces (\u2018{\u2019 and \u2018}\u2019).\nformat_map\n(\n)\n\u00b6\nS.format_map(mapping) -> str\nReturn a formatted version of S, using substitutions from mapping.\nThe substitutions are identified by braces (\u2018{\u2019 and \u2018}\u2019).\nindex\n(\n)\n\u00b6\nS.index(sub[, start[, end]]) -> int\nReturn the lowest index in S where substring sub is found,\nsuch that sub is contained within S[start:end]. Optional\narguments start and end are interpreted as in slice notation.\nRaises ValueError when the substring is not found.\nisalnum\n(\n)\n\u00b6\nReturn True if the string is an alpha-numeric string, False otherwise.\nA string is alpha-numeric if all characters in the string are alpha-numeric and\nthere is at least one character in the string.\nisalpha\n(\n)\n\u00b6\nReturn True if the string is an alphabetic string, False otherwise.\nA string is alphabetic if all characters in the string are alphabetic and there\nis at least one character in the string.\nisascii\n(\n)\n\u00b6\nReturn True if all characters in the string are ASCII, False otherwise.\nASCII characters have code points in the range U+0000-U+007F.\nEmpty string is ASCII too.\nisdecimal\n(\n)\n\u00b6\nReturn True if the string is a decimal string, False otherwise.\nA string is a decimal string if all characters in the string are decimal and\nthere is at least one character in the string.\nisdigit\n(\n)\n\u00b6\nReturn True if the string is a digit string, False otherwise.\nA string is a digit string if all characters in the string are digits and there\nis at least one character in the string.\nisidentifier\n(\n)\n\u00b6\nReturn True if the string is a valid Python identifier, False otherwise.\nCall keyword.iskeyword(s) to test whether string s is a reserved identifier,\nsuch as \u201cdef\u201d or \u201cclass\u201d.\nislower\n(\n)\n\u00b6\nReturn True if the string is a lowercase string, False otherwise.\nA string is lowercase if all cased characters in the string are lowercase and\nthere is at least one cased character in the string.\nisnumeric\n(\n)\n\u00b6\nReturn True if the string is a numeric string, False otherwise.\nA string is numeric if all characters in the string are numeric and there is at\nleast one character in the string.\nisprintable\n(\n)\n\u00b6\nReturn True if the string is printable, False otherwise.\nA string is printable if all of its characters are considered printable in\nrepr() or if it is empty.\nisspace\n(\n)\n\u00b6\nReturn True if the string is a whitespace string, False otherwise.\nA string is whitespace if all characters in the string are whitespace and there\nis at least one character in the string.\nistitle\n(\n)\n\u00b6\nReturn True if the string is a title-cased string, False otherwise.\nIn a title-cased string, upper- and title-case characters may only\nfollow uncased characters and lowercase characters only cased ones.\nisupper\n(\n)\n\u00b6\nReturn True if the string is an uppercase string, False otherwise.\nA string is uppercase if all cased characters in the string are uppercase and\nthere is at least one cased character in the string.\njoin\n(\n)\n\u00b6\nConcatenate any number of strings.\nThe string whose method is called is inserted in between each given string.\nThe result is returned as a new string.\nExample: \u2018.\u2019.join([\u2018ab\u2019, \u2018pq\u2019, \u2018rs\u2019]) -> \u2018ab.pq.rs\u2019\nljust\n(\n)\n\u00b6\nReturn a left-justified string of length width.\nPadding is done using the specified fill character (default is a space).\nlower\n(\n)\n\u00b6\nReturn a copy of the string converted to lowercase.\nlstrip\n(\n)\n\u00b6\nReturn a copy of the string with leading whitespace removed.\nIf chars is given and not None, remove characters in chars instead.\npartition\n(\n)\n\u00b6\nPartition the string into three parts using the given separator.\nThis will search for the separator in the string. If the separator is found,\nreturns a 3-tuple containing the part before the separator, the separator\nitself, and the part after it.\nIf the separator is not found, returns a 3-tuple containing the original string\nand two empty strings.\nremoveprefix\n(\n)\n\u00b6\nReturn a str with the given prefix string removed if present.\nIf the string starts with the prefix string, return string[len(prefix):].\nOtherwise, return a copy of the original string.\nremovesuffix\n(\n)\n\u00b6\nReturn a str with the given suffix string removed if present.\nIf the string ends with the suffix string and that suffix is not empty,\nreturn string[:-len(suffix)]. Otherwise, return a copy of the original\nstring.\nreplace\n(\n)\n\u00b6\nReturn a copy with all occurrences of substring old replaced by new.\ncount\nMaximum number of occurrences to replace.\n-1 (the default value) means replace all occurrences.\nIf the optional argument count is given, only the first count occurrences are\nreplaced.\nrfind\n(\n)\n\u00b6\nS.rfind(sub[, start[, end]]) -> int\nReturn the highest index in S where substring sub is found,\nsuch that sub is contained within S[start:end]. Optional\narguments start and end are interpreted as in slice notation.\nReturn -1 on failure.\nrindex\n(\n)\n\u00b6\nS.rindex(sub[, start[, end]]) -> int\nReturn the highest index in S where substring sub is found,\nsuch that sub is contained within S[start:end]. Optional\narguments start and end are interpreted as in slice notation.\nRaises ValueError when the substring is not found.\nrjust\n(\n)\n\u00b6\nReturn a right-justified string of length width.\nPadding is done using the specified fill character (default is a space).\nrpartition\n(\n)\n\u00b6\nPartition the string into three parts using the given separator.\nThis will search for the separator in the string, starting at the end. If\nthe separator is found, returns a 3-tuple containing the part before the\nseparator, the separator itself, and the part after it.\nIf the separator is not found, returns a 3-tuple containing two empty strings\nand the original string.\nrsplit\n(\n)\n\u00b6\nReturn a list of the substrings in the string, using sep as the separator string.\nsep\nThe separator used to split the string.\nWhen set to None (the default value), will split on any whitespace\ncharacter (including \\n \\r \\t \\f and spaces) and will discard\nempty strings from the result.\nmaxsplit\nMaximum number of splits.\n-1 (the default value) means no limit.\nSplitting starts at the end of the string and works to the front.\nrstrip\n(\n)\n\u00b6\nReturn a copy of the string with trailing whitespace removed.\nIf chars is given and not None, remove characters in chars instead.\nsplit\n(\n)\n\u00b6\nReturn a list of the substrings in the string, using sep as the separator string.\nsep\nThe separator used to split the string.\nWhen set to None (the default value), will split on any whitespace\ncharacter (including \\n \\r \\t \\f and spaces) and will discard\nempty strings from the result.\nmaxsplit\nMaximum number of splits.\n-1 (the default value) means no limit.\nSplitting starts at the front of the string and works to the end.\nNote, str.split() is mainly useful for data that has been intentionally\ndelimited. With natural text that includes punctuation, consider using\nthe regular expression module.\nsplitlines\n(\n)\n\u00b6\nReturn a list of the lines in the string, breaking at line boundaries.\nLine breaks are not included in the resulting list unless keepends is given and\ntrue.\nstartswith\n(\n)\n\u00b6\nS.startswith(prefix[, start[, end]]) -> bool\nReturn True if S starts with the specified prefix, False otherwise.\nWith optional start, test S beginning at that position.\nWith optional end, stop comparing S at that position.\nprefix can also be a tuple of strings to try.\nstrip\n(\n)\n\u00b6\nReturn a copy of the string with leading and trailing whitespace removed.\nIf chars is given and not None, remove characters in chars instead.\nswapcase\n(\n)\n\u00b6\nConvert uppercase characters to lowercase and lowercase characters to uppercase.\ntitle\n(\n)\n\u00b6\nReturn a version of the string where each word is titlecased.\nMore specifically, words start with uppercased characters and all remaining\ncased characters have lower case.\ntranslate\n(\n)\n\u00b6\nReplace each character in the string using the given translation table.\ntable\nTranslation table, which must be a mapping of Unicode ordinals to\nUnicode ordinals, strings, or None.\nThe table must implement lookup\/indexing via\ngetitem\n, for instance a\ndictionary or list. If this operation raises LookupError, the character is\nleft untouched. Characters mapped to None are deleted.\nupper\n(\n)\n\u00b6\nReturn a copy of the string converted to uppercase.\nzfill\n(\n)\n\u00b6\nPad a numeric string with zeros on the left, to fill a field of the given width.\nThe string is never truncated.\nalgopy.op.\naddw\n(\na\n:\nalgopy.UInt64\n|\nint\n,\nb\n:\nalgopy.UInt64\n|\nint\n,\n\/\n,\n)\n\u2192\ntuple\n[\nalgopy.UInt64\n,\nalgopy.UInt64\n]\n\u00b6\nA plus B as a 128-bit result. X is the carry-bit, Y is the low-order 64 bits.\nNative TEAL opcode:\naddw\nalgopy.op.\napp_opted_in\n(\na\n:\nalgopy.Account\n|\nalgopy.UInt64\n|\nint\n,\nb\n:\nalgopy.Application\n|\nalgopy.UInt64\n|\nint\n,\n\/\n,\n)\n\u2192\nbool\n\u00b6\n1 if account A is opted in to application B, else 0\nparams: Txn.Accounts offset (or, since v4, an\navailable\naccount address),\navailable\napplication id (or, since v4, a Txn.ForeignApps offset). Return: 1 if opted in and 0 otherwise.\nNative TEAL opcode:\napp_opted_in\nalgopy.op.\narg\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nAth LogicSig argument\nNative TEAL opcode:\narg\n,\nargs\nalgopy.op.\nbalance\n(\na\n:\nalgopy.Account\n|\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nbalance for account A, in microalgos. The balance is observed after the effects of previous transactions in the group, and after the fee for the current transaction is deducted. Changes caused by inner transactions are observable immediately following\nitxn_submit\nparams: Txn.Accounts offset (or, since v4, an\navailable\naccount address),\navailable\napplication id (or, since v4, a Txn.ForeignApps offset). Return: value.\nNative TEAL opcode:\nbalance\nalgopy.op.\nbase64_decode\n(\ne\n:\nalgopy.op.Base64\n,\na\n:\nalgopy.Bytes\n|\nbytes\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\ndecode A which was base64-encoded using\nencoding\nE. Fail if A is not base64 encoded with encoding E\nWarning\n: Usage should be restricted to very rare use cases. In almost all cases, smart contracts should directly handle non-encoded byte-strings. This opcode should only be used in cases where base64 is the only available option, e.g. interoperability with a third-party that only signs base64 strings.\nDecodes A using the base64 encoding E. Specify the encoding with an immediate arg either as URL and Filename Safe (\nURLEncoding\n) or Standard (\nStdEncoding\n). See\nRFC 4648 sections 4 and 5\n. It is assumed that the encoding ends with the exact number of\n=\npadding characters as required by the RFC. When padding occurs, any unused pad bits in the encoding must be set to zero or the decoding will fail. The special cases of\n\\n\nand\n\\r\nare allowed but completely ignored. An error will result when attempting to decode a string with a character that is not in the encoding alphabet or not one of\n=\n,\n\\r\n, or\n\\n\n.\nParameters\n:\ne\n(\nBase64\n) \u2013 encoding index\nNative TEAL opcode:\nbase64_decode\nalgopy.op.\nbitlen\n(\na\n:\nalgopy.Bytes\n|\nalgopy.UInt64\n|\nbytes\n|\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nThe highest set bit in A. If A is a byte-array, it is interpreted as a big-endian unsigned integer. bitlen of 0 is 0, bitlen of 8 is 4\nbitlen interprets arrays as big-endian integers, unlike setbit\/getbit\nNative TEAL opcode:\nbitlen\nalgopy.op.\nbsqrt\n(\na\n:\nalgopy.BigUInt\n|\nint\n,\n\/\n)\n\u2192\nalgopy.BigUInt\n\u00b6\nThe largest integer I such that I^2 <= A. A and I are interpreted as big-endian unsigned integers\nNative TEAL opcode:\nbsqrt\nalgopy.op.\nbtoi\n(\na\n:\nalgopy.Bytes\n|\nbytes\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nconverts big-endian byte array A to uint64. Fails if len(A) > 8. Padded by leading 0s if len(A) < 8.\nbtoi\nfails if the input is longer than 8 bytes.\nNative TEAL opcode:\nbtoi\nalgopy.op.\nbzero\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nzero filled byte-array of length A\nNative TEAL opcode:\nbzero\nalgopy.op.\nconcat\n(\na\n:\nalgopy.Bytes\n|\nbytes\n,\nb\n:\nalgopy.Bytes\n|\nbytes\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\njoin A and B\nconcat\nfails if the result would be greater than 4096 bytes.\nNative TEAL opcode:\nconcat\nalgopy.op.\ndivmodw\n(\na\n:\nalgopy.UInt64\n|\nint\n,\nb\n:\nalgopy.UInt64\n|\nint\n,\nc\n:\nalgopy.UInt64\n|\nint\n,\nd\n:\nalgopy.UInt64\n|\nint\n,\n\/\n,\n)\n\u2192\ntuple\n[\nalgopy.UInt64\n,\nalgopy.UInt64\n,\nalgopy.UInt64\n,\nalgopy.UInt64\n]\n\u00b6\nW,X = (A,B \/ C,D); Y,Z = (A,B modulo C,D)\nThe notation J,K indicates that two uint64 values J and K are interpreted as a uint128 value, with J as the high uint64 and K the low.\nNative TEAL opcode:\ndivmodw\nalgopy.op.\ndivw\n(\na\n:\nalgopy.UInt64\n|\nint\n,\nb\n:\nalgopy.UInt64\n|\nint\n,\nc\n:\nalgopy.UInt64\n|\nint\n,\n\/\n,\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA,B \/ C. Fail if C == 0 or if result overflows.\nThe notation A,B indicates that A and B are interpreted as a uint128 value, with A as the high uint64 and B the low.\nNative TEAL opcode:\ndivw\nalgopy.op.\necdsa_pk_decompress\n(\nv\n:\nalgopy.op.ECDSA\n,\na\n:\nalgopy.Bytes\n|\nbytes\n,\n\/\n,\n)\n\u2192\ntuple\n[\nalgopy.Bytes\n,\nalgopy.Bytes\n]\n\u00b6\ndecompress pubkey A into components X, Y\nThe 33 byte public key in a compressed form to be decompressed into X and Y (top) components. All values are big-endian encoded.\nParameters\n:\nv\n(\nECDSA\n) \u2013 curve index\nNative TEAL opcode:\necdsa_pk_decompress\nalgopy.op.\necdsa_pk_recover\n(\nv\n:\nalgopy.op.ECDSA\n,\na\n:\nalgopy.Bytes\n|\nbytes\n,\nb\n:\nalgopy.UInt64\n|\nint\n,\nc\n:\nalgopy.Bytes\n|\nbytes\n,\nd\n:\nalgopy.Bytes\n|\nbytes\n,\n\/\n,\n)\n\u2192\ntuple\n[\nalgopy.Bytes\n,\nalgopy.Bytes\n]\n\u00b6\nfor (data A, recovery id B, signature C, D) recover a public key\nS (top) and R elements of a signature, recovery id and data (bottom) are expected on the stack and used to deriver a public key. All values are big-endian encoded. The signed data must be 32 bytes long.\nParameters\n:\nv\n(\nECDSA\n) \u2013 curve index\nNative TEAL opcode:\necdsa_pk_recover\nalgopy.op.\necdsa_verify\n(\nv\n:\nalgopy.op.ECDSA\n,\na\n:\nalgopy.Bytes\n|\nbytes\n,\nb\n:\nalgopy.Bytes\n|\nbytes\n,\nc\n:\nalgopy.Bytes\n|\nbytes\n,\nd\n:\nalgopy.Bytes\n|\nbytes\n,\ne\n:\nalgopy.Bytes\n|\nbytes\n,\n\/\n,\n)\n\u2192\nbool\n\u00b6\nfor (data A, signature B, C and pubkey D, E) verify the signature of the data against the pubkey => {0 or 1}\nThe 32 byte Y-component of a public key is the last element on the stack, preceded by X-component of a pubkey, preceded by S and R components of a signature, preceded by the data that is fifth element on the stack. All values are big-endian encoded. The signed data must be 32 bytes long, and signatures in lower-S form are only accepted.\nParameters\n:\nv\n(\nECDSA\n) \u2013 curve index\nNative TEAL opcode:\necdsa_verify\nalgopy.op.\ned25519verify\n(\na\n:\nalgopy.Bytes\n|\nbytes\n,\nb\n:\nalgopy.Bytes\n|\nbytes\n,\nc\n:\nalgopy.Bytes\n|\nbytes\n,\n\/\n,\n)\n\u2192\nbool\n\u00b6\nfor (data A, signature B, pubkey C) verify the signature of (\u201cProgData\u201d || program_hash || data) against the pubkey => {0 or 1}\nThe 32 byte public key is the last element on the stack, preceded by the 64 byte signature at the second-to-last element on the stack, preceded by the data which was signed at the third-to-last element on the stack.\nNative TEAL opcode:\ned25519verify\nalgopy.op.\ned25519verify_bare\n(\na\n:\nalgopy.Bytes\n|\nbytes\n,\nb\n:\nalgopy.Bytes\n|\nbytes\n,\nc\n:\nalgopy.Bytes\n|\nbytes\n,\n\/\n,\n)\n\u2192\nbool\n\u00b6\nfor (data A, signature B, pubkey C) verify the signature of the data against the pubkey => {0 or 1}\nNative TEAL opcode:\ned25519verify_bare\nalgopy.op.\nerr\n(\n)\n\u2192\nNever\n\u00b6\nFail immediately.\nReturns typing.Never\n:\nHalts program\nNative TEAL opcode:\nerr\nalgopy.op.\nexit\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nNever\n\u00b6\nuse A as success value; end\nReturns typing.Never\n:\nHalts program\nNative TEAL opcode:\nreturn\nalgopy.op.\nexp\n(\na\n:\nalgopy.UInt64\n|\nint\n,\nb\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA raised to the Bth power. Fail if A == B == 0 and on overflow\nNative TEAL opcode:\nexp\nalgopy.op.\nexpw\n(\na\n:\nalgopy.UInt64\n|\nint\n,\nb\n:\nalgopy.UInt64\n|\nint\n,\n\/\n,\n)\n\u2192\ntuple\n[\nalgopy.UInt64\n,\nalgopy.UInt64\n]\n\u00b6\nA raised to the Bth power as a 128-bit result in two uint64s. X is the high 64 bits, Y is the low. Fail if A == B == 0 or if the results exceeds 2^128-1\nNative TEAL opcode:\nexpw\nalgopy.op.\nextract\n(\na\n:\nalgopy.Bytes\n|\nbytes\n,\nb\n:\nalgopy.UInt64\n|\nint\n,\nc\n:\nalgopy.UInt64\n|\nint\n,\n\/\n,\n)\n\u2192\nalgopy.Bytes\n\u00b6\nA range of bytes from A starting at B up to but not including B+C. If B+C is larger than the array length, the program fails\nextract3\ncan be called using\nextract\nwith no immediates.\nNative TEAL opcode:\nextract\n,\nextract3\nalgopy.op.\nextract_uint16\n(\na\n:\nalgopy.Bytes\n|\nbytes\n,\nb\n:\nalgopy.UInt64\n|\nint\n,\n\/\n,\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA uint16 formed from a range of big-endian bytes from A starting at B up to but not including B+2. If B+2 is larger than the array length, the program fails\nNative TEAL opcode:\nextract_uint16\nalgopy.op.\nextract_uint32\n(\na\n:\nalgopy.Bytes\n|\nbytes\n,\nb\n:\nalgopy.UInt64\n|\nint\n,\n\/\n,\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA uint32 formed from a range of big-endian bytes from A starting at B up to but not including B+4. If B+4 is larger than the array length, the program fails\nNative TEAL opcode:\nextract_uint32\nalgopy.op.\nextract_uint64\n(\na\n:\nalgopy.Bytes\n|\nbytes\n,\nb\n:\nalgopy.UInt64\n|\nint\n,\n\/\n,\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA uint64 formed from a range of big-endian bytes from A starting at B up to but not including B+8. If B+8 is larger than the array length, the program fails\nNative TEAL opcode:\nextract_uint64\nalgopy.op.\nfalcon_verify\n(\na\n:\nalgopy.Bytes\n|\nbytes\n,\nb\n:\nalgopy.Bytes\n|\nbytes\n,\nc\n:\nalgopy.Bytes\n|\nbytes\n,\n\/\n,\n)\n\u2192\nbool\n\u00b6\nfor (data A, compressed-format signature B, pubkey C) verify the signature of data against the pubkey\nMin AVM version: 12\nNative TEAL opcode:\nfalcon_verify\nalgopy.op.\ngaid\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nID of the asset or application created in the Ath transaction of the current group\ngaids\nfails unless the requested transaction created an asset or application and A < GroupIndex.\nNative TEAL opcode:\ngaid\n,\ngaids\nalgopy.op.\ngetbit\n(\na\n:\nalgopy.Bytes\n|\nalgopy.UInt64\n|\nbytes\n|\nint\n,\nb\n:\nalgopy.UInt64\n|\nint\n,\n\/\n,\n)\n\u2192\nalgopy.UInt64\n\u00b6\nBth bit of (byte-array or integer) A. If B is greater than or equal to the bit length of the value (8*byte length), the program fails\nsee explanation of bit ordering in setbit\nNative TEAL opcode:\ngetbit\nalgopy.op.\ngetbyte\n(\na\n:\nalgopy.Bytes\n|\nbytes\n,\nb\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nBth byte of A, as an integer. If B is greater than or equal to the array length, the program fails\nNative TEAL opcode:\ngetbyte\nalgopy.op.\ngload_bytes\n(\na\n:\nalgopy.UInt64\n|\nint\n,\nb\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nBth scratch space value of the Ath transaction in the current group\nNative TEAL opcode:\ngload\n,\ngloads\n,\ngloadss\nalgopy.op.\ngload_uint64\n(\na\n:\nalgopy.UInt64\n|\nint\n,\nb\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nBth scratch space value of the Ath transaction in the current group\nNative TEAL opcode:\ngload\n,\ngloads\n,\ngloadss\nalgopy.op.\nitob\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nconverts uint64 A to big-endian byte array, always of length 8\nNative TEAL opcode:\nitob\nalgopy.op.\nkeccak256\n(\na\n:\nalgopy.Bytes\n|\nbytes\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nKeccak256 hash of value A, yields [32]byte\nNative TEAL opcode:\nkeccak256\nalgopy.op.\nmimc\n(\nc\n:\nalgopy.op.MiMCConfigurations\n,\na\n:\nalgopy.Bytes\n|\nbytes\n,\n\/\n,\n)\n\u2192\nalgopy.Bytes\n\u00b6\nMiMC hash of scalars A, using curve and parameters specified by configuration C\nA is a list of concatenated 32 byte big-endian unsigned integer scalars. Fail if A\u2019s length is not a multiple of 32 or any element exceeds the curve modulus.\nThe MiMC hash function has known collisions since any input which is a multiple of the elliptic curve modulus will hash to the same value. MiMC is thus not a general purpose hash function, but meant to be used in zero knowledge applications to match a zk-circuit implementation.\nMin AVM version: 11\nParameters\n:\nc\n(\nMiMCConfigurations\n) \u2013 configuration index\nNative TEAL opcode:\nmimc\nalgopy.op.\nmin_balance\n(\na\n:\nalgopy.Account\n|\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nminimum required balance for account A, in microalgos. Required balance is affected by ASA, App, and Box usage. When creating or opting into an app, the minimum balance grows before the app code runs, therefore the increase is visible there. When deleting or closing out, the minimum balance decreases after the app executes. Changes caused by inner transactions or box usage are observable immediately following the opcode effecting the change.\nparams: Txn.Accounts offset (or, since v4, an\navailable\naccount address),\navailable\napplication id (or, since v4, a Txn.ForeignApps offset). Return: value.\nNative TEAL opcode:\nmin_balance\nalgopy.op.\nmulw\n(\na\n:\nalgopy.UInt64\n|\nint\n,\nb\n:\nalgopy.UInt64\n|\nint\n,\n\/\n,\n)\n\u2192\ntuple\n[\nalgopy.UInt64\n,\nalgopy.UInt64\n]\n\u00b6\nA times B as a 128-bit result in two uint64s. X is the high 64 bits, Y is the low\nNative TEAL opcode:\nmulw\nalgopy.op.\nonline_stake\n(\n)\n\u2192\nalgopy.UInt64\n\u00b6\nthe total online stake in the agreement round\nMin AVM version: 11\nNative TEAL opcode:\nonline_stake\nalgopy.op.\nreplace\n(\na\n:\nalgopy.Bytes\n|\nbytes\n,\nb\n:\nalgopy.UInt64\n|\nint\n,\nc\n:\nalgopy.Bytes\n|\nbytes\n,\n\/\n,\n)\n\u2192\nalgopy.Bytes\n\u00b6\nCopy of A with the bytes starting at B replaced by the bytes of C. Fails if B+len(C) exceeds len(A)\nreplace3\ncan be called using\nreplace\nwith no immediates.\nNative TEAL opcode:\nreplace2\n,\nreplace3\nalgopy.op.\nselect_bytes\n(\na\n:\nalgopy.Bytes\n|\nbytes\n,\nb\n:\nalgopy.Bytes\n|\nbytes\n,\nc\n:\nbool\n|\nalgopy.UInt64\n|\nint\n,\n\/\n,\n)\n\u2192\nalgopy.Bytes\n\u00b6\nselects one of two values based on top-of-stack: B if C != 0, else A\nNative TEAL opcode:\nselect\nalgopy.op.\nselect_uint64\n(\na\n:\nalgopy.UInt64\n|\nint\n,\nb\n:\nalgopy.UInt64\n|\nint\n,\nc\n:\nbool\n|\nalgopy.UInt64\n|\nint\n,\n\/\n,\n)\n\u2192\nalgopy.UInt64\n\u00b6\nselects one of two values based on top-of-stack: B if C != 0, else A\nNative TEAL opcode:\nselect\nalgopy.op.\nsetbit_bytes\n(\na\n:\nalgopy.Bytes\n|\nbytes\n,\nb\n:\nalgopy.UInt64\n|\nint\n,\nc\n:\nalgopy.UInt64\n|\nint\n,\n\/\n,\n)\n\u2192\nalgopy.Bytes\n\u00b6\nCopy of (byte-array or integer) A, with the Bth bit set to (0 or 1) C. If B is greater than or equal to the bit length of the value (8*byte length), the program fails\nWhen A is a uint64, index 0 is the least significant bit. Setting bit 3 to 1 on the integer 0 yields 8, or 2^3. When A is a byte array, index 0 is the leftmost bit of the leftmost byte. Setting bits 0 through 11 to 1 in a 4-byte-array of 0s yields the byte array 0xfff00000. Setting bit 3 to 1 on the 1-byte-array 0x00 yields the byte array 0x10.\nNative TEAL opcode:\nsetbit\nalgopy.op.\nsetbit_uint64\n(\na\n:\nalgopy.UInt64\n|\nint\n,\nb\n:\nalgopy.UInt64\n|\nint\n,\nc\n:\nalgopy.UInt64\n|\nint\n,\n\/\n,\n)\n\u2192\nalgopy.UInt64\n\u00b6\nCopy of (byte-array or integer) A, with the Bth bit set to (0 or 1) C. If B is greater than or equal to the bit length of the value (8*byte length), the program fails\nWhen A is a uint64, index 0 is the least significant bit. Setting bit 3 to 1 on the integer 0 yields 8, or 2^3. When A is a byte array, index 0 is the leftmost bit of the leftmost byte. Setting bits 0 through 11 to 1 in a 4-byte-array of 0s yields the byte array 0xfff00000. Setting bit 3 to 1 on the 1-byte-array 0x00 yields the byte array 0x10.\nNative TEAL opcode:\nsetbit\nalgopy.op.\nsetbyte\n(\na\n:\nalgopy.Bytes\n|\nbytes\n,\nb\n:\nalgopy.UInt64\n|\nint\n,\nc\n:\nalgopy.UInt64\n|\nint\n,\n\/\n,\n)\n\u2192\nalgopy.Bytes\n\u00b6\nCopy of A with the Bth byte set to small integer (between 0..255) C. If B is greater than or equal to the array length, the program fails\nNative TEAL opcode:\nsetbyte\nalgopy.op.\nsha256\n(\na\n:\nalgopy.Bytes\n|\nbytes\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nSHA256 hash of value A, yields [32]byte\nNative TEAL opcode:\nsha256\nalgopy.op.\nsha3_256\n(\na\n:\nalgopy.Bytes\n|\nbytes\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nSHA3_256 hash of value A, yields [32]byte\nNative TEAL opcode:\nsha3_256\nalgopy.op.\nsha512_256\n(\na\n:\nalgopy.Bytes\n|\nbytes\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nSHA512_256 hash of value A, yields [32]byte\nNative TEAL opcode:\nsha512_256\nalgopy.op.\nshl\n(\na\n:\nalgopy.UInt64\n|\nint\n,\nb\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA times 2^B, modulo 2^64\nNative TEAL opcode:\nshl\nalgopy.op.\nshr\n(\na\n:\nalgopy.UInt64\n|\nint\n,\nb\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nA divided by 2^B\nNative TEAL opcode:\nshr\nalgopy.op.\nsqrt\n(\na\n:\nalgopy.UInt64\n|\nint\n,\n\/\n)\n\u2192\nalgopy.UInt64\n\u00b6\nThe largest integer I such that I^2 <= A\nNative TEAL opcode:\nsqrt\nalgopy.op.\nsubstring\n(\na\n:\nalgopy.Bytes\n|\nbytes\n,\nb\n:\nalgopy.UInt64\n|\nint\n,\nc\n:\nalgopy.UInt64\n|\nint\n,\n\/\n,\n)\n\u2192\nalgopy.Bytes\n\u00b6\nA range of bytes from A starting at B up to but not including C. If C < B, or either is larger than the array length, the program fails\nNative TEAL opcode:\nsubstring\n,\nsubstring3\nalgopy.op.\nsumhash512\n(\na\n:\nalgopy.Bytes\n|\nbytes\n,\n\/\n)\n\u2192\nalgopy.Bytes\n\u00b6\nsumhash512 of value A, yields [64]byte\nMin AVM version: 12\nNative TEAL opcode:\nsumhash512\nalgopy.op.\nvrf_verify\n(\ns\n:\nalgopy.op.VrfVerify\n,\na\n:\nalgopy.Bytes\n|\nbytes\n,\nb\n:\nalgopy.Bytes\n|\nbytes\n,\nc\n:\nalgopy.Bytes\n|\nbytes\n,\n\/\n,\n)\n\u2192\ntuple\n[\nalgopy.Bytes\n,\nbool\n]\n\u00b6\nVerify the proof B of message A against pubkey C. Returns vrf output and verification flag.\nVrfAlgorand\nis the VRF used in Algorand. It is ECVRF-ED25519-SHA512-Elligator2, specified in the IETF internet draft\ndraft-irtf-cfrg-vrf-03\n.\nParameters\n:\ns\n(\nVrfVerify\n) \u2013 parameters index\nNative TEAL opcode:\nvrf_verify\nNext\nPuyaPy compiler\nPrevious\nalgopy.itxn\nCopyright \u00a9 2024, Algorand Foundation\nMade with\nSphinx\nand\n@pradyunsg\n's\nFuro"} {"question":"","answer":"Back to top\nView this page\nToggle Light \/ Dark \/ Auto color theme\nToggle table of contents sidebar\nPuyaPy compiler\n\u00b6\nThe PuyaPy compiler is a multi-stage, optimising compiler that takes Algorand Python and prepares it for execution on the AVM. PuyaPy ensures the resulting AVM bytecode execution semantics that match the given Python code. PuyaPy produces output that is directly compatible with\nAlgoKit typed clients\nto make deployment and calling easy (among other formats).\nThe PuyaPy compiler is based on the\nPuya compiler architecture\n, which allows for multiple frontend languages to leverage the majority of the compiler logic so adding new frontend languages for execution on Algorand is relatively easy.\nCompiler installation\n\u00b6\nThe minimum supported Python version for running the PuyaPy compiler is 3.12.\nThere are three ways of installing the PuyaPy compiler.\nYou can install\nAlgoKit CLI\nand you can then use the\nalgokit\ncompile\npy\ncommand.\nYou can install the PuyaPy compiler into your project and thus lock the compiler version for that project:\npip\ninstall\npuyapy\n# OR\npoetry\nadd\npuyapy\n--group\n=\ndev\nNote: if you do this then when you use\nalgokit\ncompile\npy\nwithin that project directory it will invoke the installed compiler rather than a global one.\nYou can install the compiler globally using\npipx\n:\npipx\ninstall\npuya\nAlternatively, it can be installed per project. For example, if you\u2019re using\npoetry\n,\nyou can install it as a dev-dependency like so:\nIf you just want to play with some examples, you can clone the repo and have a poke around:\ngit\nclone\nhttps:\/\/github.com\/algorandfoundation\/puya.git\ncd\npuya\npoetry\ninstall\npoetry\nshell\n# compile the \"Hello World\" example\npuyapy\nexamples\/hello_world\nUsing the compiler\n\u00b6\nTo check that you can run the compiler successfully after installation, you can run the\nhelp command:\npuyapy\n-\nh\n# OR\nalgokit\ncompile\npy\n-\nh\nTo compile a contract or contracts, just supply the path(s) - either to the .py files themselves,\nor the containing directories. In the case of containing directories, any (non-abstract) contracts\ndiscovered therein will be compiled, allowing you to compile multiple contracts at once. You can\nalso supply more than one path at a time to the compiler.\ne.g. either\npuyapy\nmy_project\/\nor\npuyapy\nmy_project\/contract.py\nwill work to compile a single contract.\nCompiler architecture\n\u00b6\nThe PuyaPy compiler is based on the Puya compiler architecture, which allows for multiple frontend languages to leverage the majority of the compiler logic so adding new frontend languages for execution on Algorand is relatively easy.\nThe PuyaPy compiler takes Algorand Python through a series of transformations with each transformation serving a specific purpose:\nPython code\n -> Python Abstract Syntax Tree (AST)\n -> MyPy AST\n -> Puya AST (AWST)\n -> Intermediate Representation (IR) in SSA form\n -> Optimizations (multiple rounds)\n -> Destructured IR\n -> Optimizations (multiple rounds)\n -> Memory IR (MIR)\n -> Optimizations (multiple rounds)\n -> TealOps IR\n -> Optimizations (multiple rounds)\n -> TEAL code\n -> AVM bytecode\nWhile this may appear complex, splitting it in this manner allows for each step to be expressed in a simple form to do one thing (well) and allows us to make use of industry research into compiler algorithms and formats.\nType checking\n\u00b6\nThe first and second steps of the\ncompiler pipeline\nare significant to note, because it\u2019s where we perform type checking. We leverage\nMyPy\nto do this, so we recommend that you install and use the latest version of MyPy in your development environment to get the best typing information that aligns to what the PuyaPy compiler expects. This should work with standard Python tooling e.g. with Visual Studio Code, PyCharm, et. al.\nThe easiest way to get a productive development environment with Algorand Python is to instantiate a template with AlgoKit via\nalgokit\ninit\n-t\npython\n. This will give you a full development environment with intellisense, linting, automatic formatting, breakpoint debugging, deployment and CI\/CD.\nAlternatively, you can construct your own environment by configuring MyPy, Ruff, etc. with the same configuration files\nused by that template\n.\nThe MyPy config that PuyaPy uses is in\ncompile.py\nCompiler usage\n\u00b6\nThe options available for the compile can be seen by executing\npuyapy\n-h\nor\nalgokit\ncompile\npy\n-h\n:\npuyapy\n[\n-\nh\n]\n[\n--\nversion\n]\n[\n-\nO\n{\n0\n,\n1\n,\n2\n}]\n[\n--\noutput\n-\nteal\n|\n--\nno\n-\noutput\n-\nteal\n]\n[\n--\noutput\n-\narc32\n|\n--\nno\n-\noutput\n-\narc32\n]\n[\n--\noutput\n-\nclient\n|\n--\nno\n-\noutput\n-\nclient\n]\n[\n--\nout\n-\ndir\nOUT_DIR\n]\n[\n--\nlog\n-\nlevel\n{\nnotset\n,\ndebug\n,\ninfo\n,\nwarning\n,\nerror\n,\ncritical\n}]\n[\n-\ng\n{\n0\n,\n1\n,\n2\n}]\n[\n--\noutput\n-\nawst\n|\n--\nno\n-\noutput\n-\nawst\n]\n[\n--\noutput\n-\nssa\n-\nir\n|\n--\nno\n-\noutput\n-\nssa\n-\nir\n]\n[\n--\noutput\n-\noptimization\n-\nir\n|\n--\nno\n-\noutput\n-\noptimization\n-\nir\n]\n[\n--\noutput\n-\ndestructured\n-\nir\n|\n--\nno\n-\noutput\n-\ndestructured\n-\nir\n]\n[\n--\noutput\n-\nmemory\n-\nir\n|\n--\nno\n-\noutput\n-\nmemory\n-\nir\n]\n[\n--\ntarget\n-\navm\n-\nversion\n{\n10\n}]\n[\n--\nlocals\n-\ncoalescing\n-\nstrategy\n{\nroot_operand\n,\nroot_operand_excluding_args\n,\naggressive\n}]\nPATH\n[\nPATH\n...\n]\nOptions\n\u00b6\nOption\nDescription\nDefault\n-h\n,\n--help\nShow the help message and exit\nN\/A\n--version\nShow program\u2019s version number and exit\nN\/A\n-O\n{0,1,2}\n--optimization-level\n{0,1,2}\nSet optimization level of output TEAL \/ AVM bytecode\n1\n--output-teal\n,\n--no-output-teal\nOutput TEAL\nTrue\n--output-arc32\n,\n--no-output-arc32\nOutput {contract}.arc32.json ARC-32 app spec file if the contract is an ARC-4 contract\nTrue\n--output-arc56\n,\n--no-output-arc56\nOutput {contract}.arc56.json ARC-56 app spec file if the contract is an ARC-4 contract\nFalse\n--output-client\n,\n--no-output-client\nOutput Algorand Python contract client for typed ARC4 ABI calls\nFalse\n--output-bytecode\n,\n--no-output-bytecode\nOutput AVM bytecode\nFalse\n--out-dir\nOUT_DIR\nThe path for outputting artefacts\nSame folder as contract\n--log-level\n{notset,debug,info,warning,error,critical}\nMinimum level to log to console\ninfo\n-g\n{0,1,2}\n,\n--debug-level\n{0,1,2}\nOutput debug information level\n0\n= No debug annotations\n1\n= Output debug annotations\n2\n= Reserved for future use, currently the same as\n1\n1\n--template-var\nAllows specifying template values. Can be used multiple times, see below for examples\nN\/A\n--template-vars-prefix\nPrefix to use for template variables\n\u201cTMPL_\u201d\nDefining template values\n\u00b6\nTemplate Variables\n, can be replaced with literal values during compilation to bytecode using the\n--template-var\noption.\nAdditionally, Algorand Python functions that create AVM bytecode, such as\ncompile_contract\nand\ncompile_logicsig\n, can also provide the specified values.\nExamples of Variable Definitions\n\u00b6\nThe table below illustrates how different variables and values can be defined:\nVariable Type\nExample Algorand Python\nValue definition example\nUInt64\nalgopy.TemplateVar[UInt64](\"SOME_INT\")\nSOME_INT=1234\nBytes\nalgopy.TemplateVar[Bytes](\"SOME_BYTES\")\nSOME_BYTES=0x1A2B\nString\nalgopy.TemplateVar[String](\"SOME_STR\")\nSOME_STR=\"hello\"\nAll template values specified via the command line are prefixed with \u201cTMPL_\u201d by default.\nThe default prefix can be modified using the\n--template-vars-prefix\noption.\nAdvanced options\n\u00b6\nThere are additional compiler options that allow you to tweak the behaviour in more advanced ways or tweak the output to receive intermediate representations from the compiler pipeline. Most users won\u2019t need to use these options unless exploring the inner workings of the compiler or performing more advanced optimisations.\nOption\nDescription\nDefault\n--output-awst\n,\n--no-output-awst\nOutput parsed result of Puya Abstract Syntax Tree (AWST)\nFalse\n--output-ssa-ir\n,\n--no-output-ssa-ir\nOutput the Intermediate Representation (IR) in Single Static Assignment (SSA) form before optimisations form\nFalse\n--output-optimization-ir\n,\n--no-output-optimization-ir\nOutput the IR after each optimization step\nFalse\n--output-destructured-ir\n,\n--no-output-destructured-ir\nOutput the IR after SSA destructuring and before Memory IR (MIR)\nFalse\n--output-memory-ir\n,\n--no-output-memory-ir\nOutput Memory IR (MIR) before lowering to TealOps IR\n--target-avm-version\n{10}\nTarget AVM version for the output\n10\n--locals-coalescing-strategy\n{root_operand,root_operand_excluding_args,aggressive}\nStrategy choice for out-of-ssa local variable coalescing. The best choice for your app is best determined through experimentation\nroot_operand\nSample\npyproject.toml\n\u00b6\nA sample\npyproject.toml\nfile with known good configuration is:\n[tool.poetry]\nname\n=\n\"algorand_python_contract\"\nversion\n=\n\"0.1.0\"\ndescription\n=\n\"Algorand smart contracts\"\nauthors\n=\n[\"Name \"]\nreadme\n=\n\"README.md\"\n[tool.poetry.dependencies]\npython\n=\n\"^3.12\"\nalgokit-utils\n=\n\"^2.2.0\"\npython-dotenv\n=\n\"^1.0.0\"\nalgorand-python\n=\n\"^1.0.0\"\n[tool.poetry.group.dev.dependencies]\nblack = { extras = [\"d\"], version\n=\n\"*\"\n}\nruff\n=\n\"^0.1.6\"\nmypy\n=\n\"*\"\npytest\n=\n\"*\"\npytest-cov\n=\n\"*\"\npip-audit\n=\n\"*\"\npre-commit\n=\n\"*\"\npuyapy\n=\n\"^1.0\"\n[build-system]\nrequires\n=\n[\"poetry-core\"]\nbuild-backend\n=\n\"poetry.core.masonry.api\"\n[tool.ruff]\nline-length\n=\n120\nselect\n=\n[\n\"E\",\n\"F\",\n\"ANN\",\n\"UP\",\n\"N\",\n\"C4\",\n\"B\",\n\"A\",\n\"YTT\",\n\"W\",\n\"FBT\",\n\"Q\",\n\"RUF\",\n\"I\",\n]\nignore\n=\n[\n\"ANN101\", # no type for self\n\"ANN102\", # no type for cls\n]\nunfixable\n=\n[\"B\", \"RUF\"]\n[tool.ruff.flake8-annotations]\nallow-star-arg-any\n=\ntrue\nsuppress-none-returning\n=\ntrue\n[tool.pytest.ini_options]\npythonpath\n=\n[\"smart_contracts\", \"tests\"]\n[tool.mypy]\nfiles\n=\n\"smart_contracts\/\"\npython_version\n=\n\"3.12\"\ndisallow_any_generics\n=\ntrue\ndisallow_subclassing_any\n=\ntrue\ndisallow_untyped_calls\n=\ntrue\ndisallow_untyped_defs\n=\ntrue\ndisallow_incomplete_defs\n=\ntrue\ncheck_untyped_defs\n=\ntrue\ndisallow_untyped_decorators\n=\ntrue\nwarn_redundant_casts\n=\ntrue\nwarn_unused_ignores\n=\ntrue\nwarn_return_any\n=\ntrue\nstrict_equality\n=\ntrue\nstrict_concatenate\n=\ntrue\ndisallow_any_unimported\n=\ntrue\ndisallow_any_expr\n=\ntrue\ndisallow_any_decorated\n=\ntrue\ndisallow_any_explicit\n=\ntrue\nNext\nAlgorand Python Testing\nPrevious\nalgopy.op\nCopyright \u00a9 2024, Algorand Foundation\nMade with\nSphinx\nand\n@pradyunsg\n's\nFuro"} {"question":"","answer":"Back to top\nView this page\nToggle Light \/ Dark \/ Auto color theme\nToggle table of contents sidebar\nAlgorand Python Testing\n\u00b6\nalgorand-python-testing\nis a companion package to\nAlgorand Python\nthat enables efficient unit testing of Algorand Python smart contracts in an offline environment. This package emulates key AVM behaviors without requiring a network connection, offering fast and reliable testing capabilities with a familiar Pythonic interface.\nThe\nalgorand-python-testing\npackage provides:\nA simple interface for fast and reliable unit testing\nAn offline testing environment that simulates core AVM functionality\nA familiar Pythonic experience, compatible with testing frameworks like\npytest\n,\nunittest\n, and\nhypothesis\nQuick Start\n\u00b6\nTo get started refer to the\nofficial documentation\n.\nNext\nBreakpoint debugging\nPrevious\nPuyaPy compiler\nCopyright \u00a9 2024, Algorand Foundation\nMade with\nSphinx\nand\n@pradyunsg\n's\nFuro"} {"question":"","answer":"Back to top\nView this page\nToggle Light \/ Dark \/ Auto color theme\nToggle table of contents sidebar\nBreakpoint debugging\n\u00b6\nThe AlgoKit AVM VS Code Debugger extension enables line-by-line debugging of Algorand Python smart contracts that are executed on the AVM. It provides a seamless debugging experience by leveraging AVM simulate traces and source maps.\nQuick Start\n\u00b6\nFor detailed setup instructions, features, and advanced usage, please refer to the\nofficial repository\n.\nPrevious\nAlgorand Python Testing\nCopyright \u00a9 2024, Algorand Foundation\nMade with\nSphinx\nand\n@pradyunsg\n's\nFuro"}