Name     Availability  All    Group  All   Reset  
 
- 
Bytecode:  0x09Stack Input:  uint64,uint64Stack Output:  uint64Size:  1Availability:  v1Cost:  1Description:  A minus B. Fail if B > A.Groups:  Arithmetic ! 
Bytecode:  0x14Stack Input:  uint64Stack Output:  uint64Size:  1Availability:  v1Cost:  1Description:  A == 0 yields 1; else 0Groups:  Arithmetic 
Bytecode:  0x13Stack Input:  any,anyStack Output:  boolSize:  1Availability:  v1Cost:  1Description:  A is not equal to B => {0 or 1}Groups:  Arithmetic 
Bytecode:  0x0bStack Input:  uint64,uint64Stack Output:  uint64Size:  1Availability:  v1Cost:  1Description:  A times B. Fail on overflow.Groups:  Arithmetic Notes 
Overflow is an error condition which halts execution and fails the transaction. Full precision is available from mulw.
Bytecode:  0x0aStack Input:  uint64,uint64Stack Output:  uint64Size:  1Availability:  v1Cost:  1Description:  A divided by B (truncated division). Fail if B == 0.Groups:  Arithmetic Notes 
divmodw is available to divide the two-element values produced by mulw and addw.
Bytecode:  0x1aStack Input:  uint64,uint64Stack Output:  uint64Size:  1Availability:  v1Cost:  1Description:  A bitwise-and BGroups:  Arithmetic 
Bytecode:  0x10Stack Input:  uint64,uint64Stack Output:  boolSize:  1Availability:  v1Cost:  1Description:  A is not zero and B is not zero => {0 or 1}Groups:  Arithmetic 
Bytecode:  0x18Stack Input:  uint64,uint64Stack Output:  uint64Size:  1Availability:  v1Cost:  1Description:  A modulo B. Fail if B == 0.Groups:  Arithmetic 
Bytecode:  0x1bStack Input:  uint64,uint64Stack Output:  uint64Size:  1Availability:  v1Cost:  1Description:  A bitwise-xor BGroups:  Arithmetic 
Bytecode:  0x08Stack Input:  uint64,uint64Stack Output:  uint64Size:  1Availability:  v1Cost:  1Description:  A plus B. Fail on overflow.Groups:  Arithmetic Notes 
Overflow is an error condition which halts execution and fails the transaction. Full precision is available from addw.
Bytecode:  0x0cStack Input:  uint64,uint64Stack Output:  boolSize:  1Availability:  v1Cost:  1Description:  A less than B => {0 or 1}Groups:  Arithmetic 
Bytecode:  0x0eStack Input:  uint64,uint64Stack Output:  boolSize:  1Availability:  v1Cost:  1Description:  A less than or equal to B => {0 or 1}Groups:  Arithmetic 
Bytecode:  0x12Stack Input:  any,anyStack Output:  boolSize:  1Availability:  v1Cost:  1Description:  A is equal to B => {0 or 1}Groups:  Arithmetic 
Bytecode:  0x0dStack Input:  uint64,uint64Stack Output:  boolSize:  1Availability:  v1Cost:  1Description:  A greater than B => {0 or 1}Groups:  Arithmetic 
Bytecode:  0x0fStack Input:  uint64,uint64Stack Output:  boolSize:  1Availability:  v1Cost:  1Description:  A greater than or equal to B => {0 or 1}Groups:  Arithmetic 
Bytecode:  0x19Stack Input:  uint64,uint64Stack Output:  uint64Size:  1Availability:  v1Cost:  1Description:  A bitwise-or BGroups:  Arithmetic 
Bytecode:  0x11Stack Input:  uint64,uint64Stack Output:  boolSize:  1Availability:  v1Cost:  1Description:  A is not zero or B is not zero => {0 or 1}Groups:  Arithmetic 
Bytecode:  0x1cStack Input:  uint64Stack Output:  uint64Size:  1Availability:  v1Cost:  1Description:  bitwise invert value AGroups:  Arithmetic 
Bytecode:  0x73Stack Input:  anyStack Output:  any,boolSize:  2Availability:  v6Cost:  1Description:  X is field F from account A. Y is 1 if A owns positive algos, else 0Groups:  State Access Field Reference Index Name Type 0 AcctBalance uint64 1 AcctMinBalance uint64 2 AcctAuthAddr address 3 AcctTotalNumUint uint64 4 AcctTotalNumByteSlice uint64 5 AcctTotalExtraAppPages uint64 6 AcctTotalAppsCreated uint64 7 AcctTotalAppsOptedIn uint64 8 AcctTotalAssetsCreated uint64 9 AcctTotalAssets uint64 10 AcctTotalBoxes uint64 11 AcctTotalBoxBytes uint64 12 AcctIncentiveEligible bool 13 AcctLastProposed uint64 14 AcctLastHeartbeat uint64 
Immediate Parameters Name Encoding Description F uint8 account params field index 
Bytecode:  0x1eStack Input:  uint64,uint64Stack Output:  uint64,uint64Size:  1Availability:  v2Cost:  1Description:  A plus B as a 128-bit result. X is the carry-bit, Y is the low-order 64 bits.Groups:  Arithmetic 
Bytecode:  0x69Stack Input:  stateKeyStack Output:  -Size:  1Availability:  v2Cost:  1Description:  delete key A from the global state of the current applicationGroups:  State Access Notes 
params: state key.
Deleting a key which is already absent has no effect on the application global state. (In particular, it does not  cause the program to fail.)
Bytecode:  0x64Stack Input:  stateKeyStack Output:  anySize:  1Availability:  v2Cost:  1Description:  global state of the key A in the current applicationGroups:  State Access Notes 
params: state key. Return: value. The value is zero (of type uint64) if the key does not exist.
Bytecode:  0x65Stack Input:  uint64,stateKeyStack Output:  any,boolSize:  1Availability:  v2Cost:  1Description:  X is the global state of application A, key B. Y is 1 if key existed, else 0Groups:  State Access Notes 
params: Txn.ForeignApps offset (or, since v4, an available  application 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.
Bytecode:  0x67Stack Input:  stateKey,anyStack Output:  -Size:  1Availability:  v2Cost:  1Description:  write B to key A in the global state of the current applicationGroups:  State Access 
Bytecode:  0x68Stack Input:  any,stateKeyStack Output:  -Size:  1Availability:  v2Cost:  1Description:  delete key B from account A’s local state of the current applicationGroups:  State Access Notes 
params: Txn.Accounts offset (or, since v4, an available  account address), state key.
Deleting a key which is already absent has no effect on the application local state. (In particular, it does not  cause the program to fail.)
Bytecode:  0x62Stack Input:  any,stateKeyStack Output:  anySize:  1Availability:  v2Cost:  1Description:  local state of the key B in the current application in account AGroups:  State Access Notes 
params: Txn.Accounts offset (or, since v4, an available  account address), state key. Return: value. The value is zero (of type uint64) if the key does not exist.
Bytecode:  0x63Stack Input:  any,uint64,stateKeyStack Output:  any,boolSize:  1Availability:  v2Cost:  1Description:  X is the local state of application B, key C in account A. Y is 1 if key existed, else 0Groups:  State Access Notes 
params: Txn.Accounts offset (or, since v4, an available  account address), available  application 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.
Bytecode:  0x66Stack Input:  any,stateKey,anyStack Output:  -Size:  1Availability:  v2Cost:  1Description:  write C to key B in account A’s local state of the current applicationGroups:  State Access Notes 
params: Txn.Accounts offset (or, since v4, an available  account address), state key, value.
Bytecode:  0x61Stack Input:  any,uint64Stack Output:  boolSize:  1Availability:  v2Cost:  1Description:  1 if account A is opted in to application B, else 0Groups:  State Access Notes 
params: Txn.Accounts offset (or, since v4, an available  account address), available  application id (or, since v4, a Txn.ForeignApps offset). Return: 1 if opted in and 0 otherwise.
Bytecode:  0x72Stack Input:  uint64Stack Output:  any,boolSize:  2Availability:  v5Cost:  1Description:  X is field F from app A. Y is 1 if A exists, else 0Groups:  State Access Notes 
params: Txn.ForeignApps offset or an available  app id. Return: did_exist flag (1 if the application existed and 0 otherwise), value.
Field Reference Index Name Type 0 AppApprovalProgram []byte 1 AppClearStateProgram []byte 2 AppGlobalNumUint uint64 3 AppGlobalNumByteSlice uint64 4 AppLocalNumUint uint64 5 AppLocalNumByteSlice uint64 6 AppExtraProgramPages uint64 7 AppCreator address 8 AppAddress address 9 AppVersion uint64 
Immediate Parameters Name Encoding Description F uint8 app params field index 
Bytecode:  0x2cStack Input:  -Stack Output:  []byteSize:  2Availability:  v1Cost:  1Description:  Nth LogicSig argumentGroups:  Loading Values Immediate Parameters Name Encoding Description N uint8 an arg index 
Bytecode:  0x2dStack Input:  -Stack Output:  []byteSize:  1Availability:  v1Cost:  1Description:  LogicSig argument 0Groups:  Loading Values 
Bytecode:  0x2eStack Input:  -Stack Output:  []byteSize:  1Availability:  v1Cost:  1Description:  LogicSig argument 1Groups:  Loading Values 
Bytecode:  0x2fStack Input:  -Stack Output:  []byteSize:  1Availability:  v1Cost:  1Description:  LogicSig argument 2Groups:  Loading Values 
Bytecode:  0x30Stack Input:  -Stack Output:  []byteSize:  1Availability:  v1Cost:  1Description:  LogicSig argument 3Groups:  Loading Values 
Bytecode:  0xc3Stack Input:  uint64Stack Output:  []byteSize:  1Availability:  v5Cost:  1Description:  Ath LogicSig argumentGroups:  Loading Values 
Bytecode:  0x44Stack Input:  uint64Stack Output:  -Size:  1Availability:  v3Cost:  1Description:  immediately fail unless A is a non-zero numberGroups:  Flow Control 
Bytecode:  0x70Stack Input:  any,uint64Stack Output:  any,boolSize:  2Availability:  v2Cost:  1Description:  X is field F from account A’s holding of asset B. Y is 1 if A is opted into B, else 0Groups:  State Access Notes 
params: Txn.Accounts offset (or, since v4, an available  address), asset id (or, since v4, a Txn.ForeignAssets offset). Return: did_exist flag (1 if the asset existed and 0 otherwise), value.
Field Reference Index Name Type 0 AssetBalance uint64 1 AssetFrozen bool 
Immediate Parameters Name Encoding Description F uint8 asset holding field index 
Bytecode:  0x71Stack Input:  uint64Stack Output:  any,boolSize:  2Availability:  v2Cost:  1Description:  X is field F from asset A. Y is 1 if A exists, else 0Groups:  State Access Notes 
params: Txn.ForeignAssets offset (or, since v4, an available  asset id. Return: did_exist flag (1 if the asset existed and 0 otherwise), value.
Field Reference Index Name Type 0 AssetTotal uint64 1 AssetDecimals uint64 2 AssetDefaultFrozen bool 3 AssetUnitName []byte 4 AssetName []byte 5 AssetURL []byte 6 AssetMetadataHash [32]byte 7 AssetManager address 8 AssetReserve address 9 AssetFreeze address 10 AssetClawback address 11 AssetCreator address 
Immediate Parameters Name Encoding Description F uint8 asset params field index 
Bytecode:  0x42Stack Input:  -Stack Output:  -Size:  3Availability:  v2Cost:  1Description:  branch unconditionally to TARGETGroups:  Flow Control Notes 
See bnz for details on how branches work. b always jumps to the offset.
Immediate Parameters Name Encoding Description TARGET int16 (big-endian) branch offset 
Bytecode:  0xa1Stack Input:  bigint,bigintStack Output:  bigintSize:  1Availability:  v4Cost:  10Description:  A minus B. A and B are interpreted as big-endian unsigned integers. Fail on underflow.Groups:  Byte Array Arithmetic 
Bytecode:  0xa9Stack Input:  bigint,bigintStack Output:  boolSize:  1Availability:  v4Cost:  1Description:  0 if A is equal to B, else 1. A and B are interpreted as big-endian unsigned integersGroups:  Byte Array Arithmetic 
Bytecode:  0xa3Stack Input:  bigint,bigintStack Output:  []byteSize:  1Availability:  v4Cost:  20Description:  A times B. A and B are interpreted as big-endian unsigned integers.Groups:  Byte Array Arithmetic 
Bytecode:  0xa2Stack Input:  bigint,bigintStack Output:  bigintSize:  1Availability:  v4Cost:  20Description:  A divided by B (truncated division). A and B are interpreted as big-endian unsigned integers. Fail if B is zero.Groups:  Byte Array Arithmetic 
Bytecode:  0xacStack Input:  []byte,[]byteStack Output:  []byteSize:  1Availability:  v4Cost:  6Description:  A bitwise-and B. A and B are zero-left extended to the greater of their lengthsGroups:  Byte Array Logic 
Bytecode:  0xaaStack Input:  bigint,bigintStack Output:  bigintSize:  1Availability:  v4Cost:  20Description:  A modulo B. A and B are interpreted as big-endian unsigned integers. Fail if B is zero.Groups:  Byte Array Arithmetic 
Bytecode:  0xadStack Input:  []byte,[]byteStack Output:  []byteSize:  1Availability:  v4Cost:  6Description:  A bitwise-xor B. A and B are zero-left extended to the greater of their lengthsGroups:  Byte Array Logic 
Bytecode:  0xa0Stack Input:  bigint,bigintStack Output:  []byteSize:  1Availability:  v4Cost:  10Description:  A plus B. A and B are interpreted as big-endian unsigned integersGroups:  Byte Array Arithmetic 
Bytecode:  0xa4Stack Input:  bigint,bigintStack Output:  boolSize:  1Availability:  v4Cost:  1Description:  1 if A is less than B, else 0. A and B are interpreted as big-endian unsigned integersGroups:  Byte Array Arithmetic 
Bytecode:  0xa6Stack Input:  bigint,bigintStack Output:  boolSize:  1Availability:  v4Cost:  1Description:  1 if A is less than or equal to B, else 0. A and B are interpreted as big-endian unsigned integersGroups:  Byte Array Arithmetic 
Bytecode:  0xa8Stack Input:  bigint,bigintStack Output:  boolSize:  1Availability:  v4Cost:  1Description:  1 if A is equal to B, else 0. A and B are interpreted as big-endian unsigned integersGroups:  Byte Array Arithmetic 
Bytecode:  0xa5Stack Input:  bigint,bigintStack Output:  boolSize:  1Availability:  v4Cost:  1Description:  1 if A is greater than B, else 0. A and B are interpreted as big-endian unsigned integersGroups:  Byte Array Arithmetic 
Bytecode:  0xa7Stack Input:  bigint,bigintStack Output:  boolSize:  1Availability:  v4Cost:  1Description:  1 if A is greater than or equal to B, else 0. A and B are interpreted as big-endian unsigned integersGroups:  Byte Array Arithmetic 
Bytecode:  0xabStack Input:  []byte,[]byteStack Output:  []byteSize:  1Availability:  v4Cost:  6Description:  A bitwise-or B. A and B are zero-left extended to the greater of their lengthsGroups:  Byte Array Logic 
Bytecode:  0xaeStack Input:  []byteStack Output:  []byteSize:  1Availability:  v4Cost:  4Description:  A with all bits invertedGroups:  Byte Array Logic 
Bytecode:  0x60Stack Input:  anyStack Output:  uint64Size:  1Availability:  v2Cost:  1Description:  balance 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 itxn_submitGroups:  State Access Notes 
params: Txn.Accounts offset (or, since v4, an available  account address), available  application id (or, since v4, a Txn.ForeignApps offset). Return: value.
Bytecode:  0x5eStack Input:  []byteStack Output:  []byteSize:  2Availability:  v7Cost:  1 + 1 per 16 bytes of ADescription:  decode A which was base64-encoded using encoding  E. Fail if A is not base64 encoded with encoding EGroups:  Byte Array Manipulation Notes 
Warning : 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.
Decodes A using the base64 encoding E. Specify the encoding with an immediate arg either as URL and Filename Safe (URLEncoding) or Standard (StdEncoding). See RFC 4648 sections 4 and 5 . It is assumed that the encoding ends with the exact number of = padding 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 and \r are 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 =, \r, or \n.
Field Reference Index Name Type 0 URLEncoding any 1 StdEncoding any 
Immediate Parameters Name Encoding Description E uint8 encoding index 
Bytecode:  0x93Stack Input:  anyStack Output:  uint64Size:  1Availability:  v4Cost:  1Description:  The 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 4Groups:  Arithmetic Notes 
bitlen interprets arrays as big-endian integers, unlike setbit/getbit
Bytecode:  0xd1Stack Input:  uint64Stack Output:  anySize:  2Availability:  v7Cost:  1Description:  field F of block A. Fail unless A falls between txn.LastValid-1002 and txn.FirstValid (exclusive)Groups:  State Access Field Reference Index Name Type 0 BlkSeed [32]byte 1 BlkTimestamp uint64 2 BlkProposer address 3 BlkFeesCollected uint64 4 BlkBonus uint64 5 BlkBranch [32]byte 6 BlkFeeSink address 7 BlkProtocol []byte 8 BlkTxnCounter uint64 9 BlkProposerPayout uint64 
Immediate Parameters Name Encoding Description F uint8  block field index 
Bytecode:  0x40Stack Input:  uint64Stack Output:  -Size:  3Availability:  v1Cost:  1Description:  branch to TARGET if value A is not zeroGroups:  Flow Control Notes 
The bnz instruction opcode 0x40 is followed by two immediate data bytes which are a high byte first and low byte second which together form a 16 bit offset which the instruction may branch to. For a bnz instruction at pc, if the last element of the stack is not zero then branch to instruction at pc + 3 + N, else proceed to next instruction at pc + 3. Branch targets must be aligned instructions. (e.g. Branching to the second byte of a 2 byte op will be rejected.) Starting at v4, the offset is treated as a signed 16 bit integer allowing for backward branches and looping. In prior version (v1 to v3), branch offsets are limited to forward branches only, 0-0x7fff.
At v2 it became allowed to branch to the end of the program exactly after the last instruction: bnz to byte N (with 0-indexing) was illegal for a TEAL program with N bytes before v2, and is legal after it. This change eliminates the need for a last instruction of no-op as a branch target at the end. (Branching beyond the end—in other words, to a byte larger than N—is still illegal and will cause the program to fail.)
Immediate Parameters Name Encoding Description TARGET int16 (big-endian) branch offset 
Bytecode:  0xb9Stack Input:  boxName,uint64Stack Output:  boolSize:  1Availability:  v8Cost:  1Description:  create 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 1Groups:  Box Access Notes 
Newly created boxes are filled with 0 bytes. box_create will fail if the referenced box already exists with a different size. Otherwise, existing boxes are unchanged by box_create.
Bytecode:  0xbcStack Input:  boxNameStack Output:  boolSize:  1Availability:  v8Cost:  1Description:  delete box named A if it exists. Return 1 if A existed, 0 otherwiseGroups:  Box Access 
Bytecode:  0xbaStack Input:  boxName,uint64,uint64Stack Output:  []byteSize:  1Availability:  v8Cost:  1Description:  read C bytes from box A, starting at offset B. Fail if A does not exist, or the byte range is outside A’s size.Groups:  Box Access 
Bytecode:  0xbeStack Input:  boxNameStack Output:  []byte,boolSize:  1Availability:  v8Cost:  1Description:  X is the contents of box A if A exists, else ”. Y is 1 if A exists, else 0.Groups:  Box Access Notes 
For boxes that exceed 4,096 bytes, consider box_create, box_extract, and box_replace
Bytecode:  0xbdStack Input:  boxNameStack Output:  uint64,boolSize:  1Availability:  v8Cost:  1Description:  X is the length of box A if A exists, else 0. Y is 1 if A exists, else 0.Groups:  Box Access 
Bytecode:  0xbfStack Input:  boxName,[]byteStack Output:  -Size:  1Availability:  v8Cost:  1Description:  replaces 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 existGroups:  Box Access Notes 
For boxes that exceed 4,096 bytes, consider box_create, box_extract, and box_replace
Bytecode:  0xbbStack Input:  boxName,uint64,[]byteStack Output:  -Size:  1Availability:  v8Cost:  1Description:  write byte-array C into box A, starting at offset B. Fail if A does not exist, or the byte range is outside A’s size.Groups:  Box Access 
Bytecode:  0xd3Stack Input:  boxName,uint64Stack Output:  -Size:  1Availability:  v10Cost:  1Description:  change 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.Groups:  Box Access 
Bytecode:  0xd2Stack Input:  boxName,uint64,uint64,[]byteStack Output:  -Size:  1Availability:  v10Cost:  1Description:  set 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.Groups:  Box Access Notes 
Boxes 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.
Bytecode:  0x96Stack Input:  bigintStack Output:  bigintSize:  1Availability:  v6Cost:  40Description:  The largest integer I such that I^2 <= A. A and I are interpreted as big-endian unsigned integersGroups:  Byte Array Arithmetic 
Bytecode:  0x17Stack Input:  []byteStack Output:  uint64Size:  1Availability:  v1Cost:  1Description:  converts big-endian byte array A to uint64. Fails if len(A) > 8. Padded by leading 0s if len(A) < 8.Groups:  Arithmetic Notes 
btoi fails if the input is longer than 8 bytes.
Bytecode:  0x45Stack Input:  anyStack Output:  -Size:  2Availability:  v8Cost:  1Description:  replace the Nth value from the top of the stack with A. bury 0 fails.Groups:  Flow Control Immediate Parameters Name Encoding Description N uint8 depth 
Bytecode:  0x27Stack Input:  -Stack Output:  []byteSize:  2Availability:  v1Cost:  1Description:  Ith constant from bytecblockGroups:  Loading Values Immediate Parameters Name Encoding Description I uint8 an index in the bytecblock 
Bytecode:  0x28Stack Input:  -Stack Output:  []byteSize:  1Availability:  v1Cost:  1Description:  constant 0 from bytecblockGroups:  Loading Values 
Bytecode:  0x29Stack Input:  -Stack Output:  []byteSize:  1Availability:  v1Cost:  1Description:  constant 1 from bytecblockGroups:  Loading Values 
Bytecode:  0x2aStack Input:  -Stack Output:  []byteSize:  1Availability:  v1Cost:  1Description:  constant 2 from bytecblockGroups:  Loading Values 
Bytecode:  0x2bStack Input:  -Stack Output:  []byteSize:  1Availability:  v1Cost:  1Description:  constant 3 from bytecblockGroups:  Loading Values 
Bytecode:  0x26Stack Input:  -Stack Output:  -Size:  0Availability:  v1Cost:  1Description:  prepare block of byte-array constants for use by bytecGroups:  Loading Values Notes 
bytecblock loads the following program bytes into an array of byte-array constants in the evaluator. These constants can be referred to by bytec and bytec_* which will push the value onto the stack. Subsequent calls to bytecblock reset and replace the bytes constants available to the script.
Immediate Parameters Name Encoding Description BYTES … varuint count, [varuint length, bytes …] a block of byte constant values 
Bytecode:  0x41Stack Input:  uint64Stack Output:  -Size:  3Availability:  v2Cost:  1Description:  branch to TARGET if value A is zeroGroups:  Flow Control Notes 
See bnz for details on how branches work. bz inverts the behavior of bnz.
Immediate Parameters Name Encoding Description TARGET int16 (big-endian) branch offset 
Bytecode:  0xafStack Input:  uint64Stack Output:  []byteSize:  1Availability:  v4Cost:  1Description:  zero filled byte-array of length AGroups:  Loading Values 
Bytecode:  0x88Stack Input:  -Stack Output:  -Size:  3Availability:  v4Cost:  1Description:  branch unconditionally to TARGET, saving the next instruction on the call stackGroups:  Flow Control Notes 
The call stack is separate from the data stack. Only callsub, retsub, and proto manipulate it.
Immediate Parameters Name Encoding Description TARGET int16 (big-endian) branch offset 
Bytecode:  0x50Stack Input:  []byte,[]byteStack Output:  []byteSize:  1Availability:  v2Cost:  1Description:  join A and BGroups:  Byte Array Manipulation Notes 
concat fails if the result would be greater than 4096 bytes.
Bytecode:  0x4eStack Input:  anyStack Output:  anySize:  2Availability:  v5Cost:  1Description:  remove top of stack, and place it deeper in the stack such that N elements are above it. Fails if stack depth <= N.Groups:  Flow Control Immediate Parameters Name Encoding Description N uint8 depth 
Bytecode:  0x4bStack Input:  anyStack Output:  any,anySize:  2Availability:  v3Cost:  1Description:  Nth value from the top of the stack. dig 0 is equivalent to dupGroups:  Flow Control Immediate Parameters Name Encoding Description N uint8 depth 
Bytecode:  0x1fStack Input:  uint64,uint64,uint64,uint64Stack Output:  uint64,uint64,uint64,uint64Size:  1Availability:  v4Cost:  20Description:  W,X = (A,B / C,D); Y,Z = (A,B modulo C,D)Groups:  Arithmetic Notes 
The 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.
Bytecode:  0x97Stack Input:  uint64,uint64,uint64Stack Output:  uint64Size:  1Availability:  v6Cost:  1Description:  A,B / C. Fail if C == 0 or if result overflows.Groups:  Arithmetic Notes 
The notation A,B indicates that A and B are interpreted as a uint128 value, with A as the high uint64 and B the low.
Bytecode:  0x49Stack Input:  anyStack Output:  any,anySize:  1Availability:  v1Cost:  1Description:  duplicate AGroups:  Flow Control 
Bytecode:  0x4aStack Input:  any,anyStack Output:  any,any,any,anySize:  1Availability:  v2Cost:  1Description:  duplicate A and BGroups:  Flow Control 
Bytecode:  0x47Stack Input:  anyStack Output:  -Size:  2Availability:  v8Cost:  1Description:  duplicate A, N timesGroups:  Flow Control Immediate Parameters Name Encoding Description N uint8 copy count 
Bytecode:  0xe0Stack Input:  []byte,[]byteStack Output:  []byteSize:  2Availability:  v10Cost:  BN254g1=125; BN254g2=170; BLS12_381g1=205; BLS12_381g2=290Description:  for curve points A and B, return the curve point A + BGroups:  Cryptography Notes 
A and B are curve points in affine representation: field element X concatenated with field element Y. Field element Z is encoded as follows.Z is encoded as a big-endian number and must be lower than the field modulus.Z is encoded as the concatenation of the individual encoding of the coefficients. For an Fp2 element of the form Z = Z0 + Z1 i, where i is a formal quadratic non-residue, the encoding of Z is the concatenation of the encoding of Z0 and Z1 in this order. (Z0 and Z1 must be less than the field modulus).
The point at infinity is encoded as (X,Y) = (0,0).
Fails if A or B is not in G.not  check if A and B are in the main prime-order subgroup.
Immediate Parameters Name Encoding Description G uint8 curve index 
Bytecode:  0xe5Stack Input:  []byteStack Output:  []byteSize:  2Availability:  v10Cost:  BN254g1=630; BN254g2=3300; BLS12_381g1=1950; BLS12_381g2=8150Description:  maps field element A to group GGroups:  Cryptography Notes 
BN254 points are mapped by the SVDW map. BLS12-381 points are mapped by the SSWU map.ec_add. 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.
Immediate Parameters Name Encoding Description G uint8 curve index 
Bytecode:  0xe3Stack Input:  []byte,[]byteStack Output:  []byteSize:  2Availability:  v10Cost:  BN254g1=3600 + 90 per 32 bytes of B; BN254g2=7200 + 270 per 32 bytes of B; BLS12_381g1=6500 + 95 per 32 bytes of B; BLS12_381g2=14850 + 485 per 32 bytes of BDescription:  for curve points A and scalars B, return curve point B0A0 + B1A1 + B2A2 + … + BnAnGroups:  Cryptography Notes 
A is a list of concatenated points, encoded and checked as described in ec_add. B is a list of concatenated scalars which, unlike ec_scalar_mul, must all be exactly 32 bytes long.ec_multi_scalar_mul was chosen to reflect common usage, but a more consistent name would be ec_multi_scalar_mul. AVM values are limited to 4096 bytes, so ec_multi_scalar_mul is limited by the size of the points in the group being operated upon.
Immediate Parameters Name Encoding Description G uint8 curve index 
Bytecode:  0xe2Stack Input:  []byte,[]byteStack Output:  boolSize:  2Availability:  v10Cost:  BN254g1=8000 + 7400 per 64 bytes of B; BN254g2=8000 + 7400 per 128 bytes of B; BLS12_381g1=13000 + 10000 per 96 bytes of B; BLS12_381g2=13000 + 10000 per 192 bytes of BDescription:  1 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 0Groups:  Cryptography Notes 
A and B are concatenated points, encoded and checked as described in ec_add. 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 ec_pairing_check is limited by the size of the points in the groups being operated upon.
Immediate Parameters Name Encoding Description G uint8 curve index 
Bytecode:  0xe1Stack Input:  []byte,[]byteStack Output:  []byteSize:  2Availability:  v10Cost:  BN254g1=1810; BN254g2=3430; BLS12_381g1=2950; BLS12_381g2=6530Description:  for curve point A and scalar B, return the curve point BA, the point A multiplied by the scalar B.Groups:  Cryptography Notes 
A is a curve point encoded and checked as described in ec_add. Scalar B is interpreted as a big-endian unsigned integer. Fails if B exceeds 32 bytes.
Immediate Parameters Name Encoding Description G uint8 curve index 
Bytecode:  0xe4Stack Input:  []byteStack Output:  boolSize:  2Availability:  v10Cost:  BN254g1=20; BN254g2=3100; BLS12_381g1=1850; BLS12_381g2=2340Description:  1 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.Groups:  Cryptography Immediate Parameters Name Encoding Description G uint8 curve index 
Bytecode:  0x06Stack Input:  [33]byteStack Output:  [32]byte,[32]byteSize:  2Availability:  v5Cost:  Secp256k1=650; Secp256r1=2400Description:  decompress pubkey A into components X, YGroups:  Cryptography Notes 
The 33 byte public key in a compressed form to be decompressed into X and Y (top) components. All values are big-endian encoded.
Field Reference Index Name Type 0 Secp256k1 - 1 Secp256r1 - 
Immediate Parameters Name Encoding Description V uint8 curve index 
Bytecode:  0x07Stack Input:  [32]byte,uint64,[32]byte,[32]byteStack Output:  [32]byte,[32]byteSize:  2Availability:  v5Cost:  2000Description:  for (data A, recovery id B, signature C, D) recover a public keyGroups:  Cryptography Notes 
S (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.
Field Reference Index Name Type 0 Secp256k1 - 1 Secp256r1 - 
Immediate Parameters Name Encoding Description V uint8 curve index 
Bytecode:  0x05Stack Input:  [32]byte,[32]byte,[32]byte,[32]byte,[32]byteStack Output:  boolSize:  2Availability:  v5Cost:  Secp256k1=1700; Secp256r1=2500Description:  for (data A, signature B, C and pubkey D, E) verify the signature of the data against the pubkey => {0 or 1}Groups:  Cryptography Notes 
The 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.
Field Reference Index Name Type 0 Secp256k1 - 1 Secp256r1 - 
Immediate Parameters Name Encoding Description V uint8 curve index 
Bytecode:  0x04Stack Input:  []byte,[64]byte,[32]byteStack Output:  boolSize:  1Availability:  v1Cost:  1900Description:  for (data A, signature B, pubkey C) verify the signature of (“ProgData” || program_hash || data) against the pubkey => {0 or 1}Groups:  Cryptography Notes 
The 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.
Bytecode:  0x84Stack Input:  []byte,[64]byte,[32]byteStack Output:  boolSize:  1Availability:  v7Cost:  1900Description:  for (data A, signature B, pubkey C) verify the signature of the data against the pubkey => {0 or 1}Groups:  Cryptography 
Bytecode:  0x00Stack Input:  -Stack Output:  -Size:  1Availability:  v1Cost:  1Description:  Fail immediately.Groups:  Flow Control 
Bytecode:  0x94Stack Input:  uint64,uint64Stack Output:  uint64Size:  1Availability:  v4Cost:  1Description:  A raised to the Bth power. Fail if A == B == 0 and on overflowGroups:  Arithmetic 
Bytecode:  0x95Stack Input:  uint64,uint64Stack Output:  uint64,uint64Size:  1Availability:  v4Cost:  10Description:  A 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-1Groups:  Arithmetic 
Bytecode:  0x57Stack Input:  []byteStack Output:  []byteSize:  3Availability:  v5Cost:  1Description:  A range of bytes from A starting at S up to but not including S+L. If L is 0, then extract to the end of the string. If S or S+L is larger than the array length, the program failsGroups:  Byte Array Manipulation Immediate Parameters Name Encoding Description S uint8 start position L uint8 length 
Bytecode:  0x59Stack Input:  []byte,uint64Stack Output:  uint64Size:  1Availability:  v5Cost:  1Description:  A 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 failsGroups:  Byte Array Manipulation 
Bytecode:  0x5aStack Input:  []byte,uint64Stack Output:  uint64Size:  1Availability:  v5Cost:  1Description:  A 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 failsGroups:  Byte Array Manipulation 
Bytecode:  0x5bStack Input:  []byte,uint64Stack Output:  uint64Size:  1Availability:  v5Cost:  1Description:  A 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 failsGroups:  Byte Array Manipulation 
Bytecode:  0x58Stack Input:  []byte,uint64,uint64Stack Output:  []byteSize:  1Availability:  v5Cost:  1Description:  A 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 failsextract3 can be called using extract with no immediates.Groups:  Byte Array Manipulation 
Bytecode:  0x85Stack Input:  []byte,[1232]byte,[1793]byteStack Output:  boolSize:  1Availability:  v12Cost:  1700Description:  for (data A, compressed-format signature B, pubkey C) verify the signature of data against the pubkey => {0 or 1}Groups:  Cryptography 
Bytecode:  0x8cStack Input:  anyStack Output:  -Size:  2Availability:  v8Cost:  1Description:  replace the Nth (signed) value from the frame pointer in the stack with AGroups:  Flow Control Immediate Parameters Name Encoding Description I int8 frame slot 
Bytecode:  0x8bStack Input:  -Stack Output:  anySize:  2Availability:  v8Cost:  1Description:  Nth (signed) value from the frame pointer.Groups:  Flow Control Immediate Parameters Name Encoding Description I int8 frame slot 
Bytecode:  0x3cStack Input:  -Stack Output:  uint64Size:  2Availability:  v4Cost:  1Description:  ID of the asset or application created in the Tth transaction of the current groupGroups:  Loading Values Notes 
gaid fails unless the requested transaction created an asset or application and T < GroupIndex.
Immediate Parameters Name Encoding Description T uint8 transaction group index 
Bytecode:  0x3dStack Input:  uint64Stack Output:  uint64Size:  1Availability:  v4Cost:  1Description:  ID of the asset or application created in the Ath transaction of the current groupGroups:  Loading Values Notes 
gaids fails unless the requested transaction created an asset or application and A < GroupIndex.
Bytecode:  0x53Stack Input:  any,uint64Stack Output:  uint64Size:  1Availability:  v3Cost:  1Description:  Bth 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 failsGroups:  Byte Array Manipulation Notes 
see explanation of bit ordering in setbit
Bytecode:  0x55Stack Input:  []byte,uint64Stack Output:  uint64Size:  1Availability:  v3Cost:  1Description:  Bth byte of A, as an integer. If B is greater than or equal to the array length, the program failsGroups:  Byte Array Manipulation 
Bytecode:  0xb7Stack Input:  -Stack Output:  anySize:  3Availability:  v6Cost:  1Description:  field F of the Tth transaction in the last inner group submittedGroups:  Inner Transactions Field Reference Index Name Type 0 Sender address 1 Fee uint64 2 FirstValid uint64 3 FirstValidTime uint64 4 LastValid uint64 5 Note []byte 6 Lease [32]byte 7 Receiver address 8 Amount uint64 9 CloseRemainderTo address 10 VotePK [32]byte 11 SelectionPK [32]byte 12 VoteFirst uint64 13 VoteLast uint64 14 VoteKeyDilution uint64 15 Type []byte 16 TypeEnum uint64 17 XferAsset uint64 18 AssetAmount uint64 19 AssetSender address 20 AssetReceiver address 21 AssetCloseTo address 22 GroupIndex uint64 23 TxID [32]byte 24 ApplicationID uint64 25 OnCompletion uint64 26 ApplicationArgs []byte 27 NumAppArgs uint64 28 Accounts address 29 NumAccounts uint64 30 ApprovalProgram []byte 31 ClearStateProgram []byte 32 RekeyTo address 33 ConfigAsset uint64 34 ConfigAssetTotal uint64 35 ConfigAssetDecimals uint64 36 ConfigAssetDefaultFrozen bool 37 ConfigAssetUnitName []byte 38 ConfigAssetName []byte 39 ConfigAssetURL []byte 40 ConfigAssetMetadataHash [32]byte 41 ConfigAssetManager address 42 ConfigAssetReserve address 43 ConfigAssetFreeze address 44 ConfigAssetClawback address 45 FreezeAsset uint64 46 FreezeAssetAccount address 47 FreezeAssetFrozen bool 48 Assets uint64 49 NumAssets uint64 50 Applications uint64 51 NumApplications uint64 52 GlobalNumUint uint64 53 GlobalNumByteSlice uint64 54 LocalNumUint uint64 55 LocalNumByteSlice uint64 56 ExtraProgramPages uint64 57 Nonparticipation bool 58 Logs []byte 59 NumLogs uint64 60 CreatedAssetID uint64 61 CreatedApplicationID uint64 62 LastLog []byte 63 StateProofPK [64]byte 64 ApprovalProgramPages []byte 65 NumApprovalProgramPages uint64 66 ClearStateProgramPages []byte 67 NumClearStateProgramPages uint64 68 RejectVersion uint64 
Immediate Parameters Name Encoding Description T uint8 transaction group index F uint8 transaction field index 
Bytecode:  0xb8Stack Input:  -Stack Output:  anySize:  4Availability:  v6Cost:  1Description:  Ith value of the array field F from the Tth transaction in the last inner group submittedGroups:  Inner Transactions Field Reference Index Name Type 0 ApplicationArgs []byte 1 Accounts address 2 Assets uint64 3 Applications uint64 4 Logs []byte 5 ApprovalProgramPages []byte 6 ClearStateProgramPages []byte 
Immediate Parameters Name Encoding Description T uint8 transaction group index F uint8 transaction field index I uint8 transaction field array index 
Bytecode:  0xc6Stack Input:  uint64Stack Output:  anySize:  3Availability:  v6Cost:  1Description:  Ath value of the array field F from the Tth transaction in the last inner group submittedGroups:  Inner Transactions Immediate Parameters Name Encoding Description T uint8 transaction group index F uint8 transaction field index 
Bytecode:  0x3aStack Input:  -Stack Output:  anySize:  3Availability:  v4Cost:  1Description:  Ith scratch space value of the Tth transaction in the current groupGroups:  Loading Values Notes 
gload fails unless the requested transaction is an ApplicationCall and T < GroupIndex.
Immediate Parameters Name Encoding Description T uint8 transaction group index I uint8 position in scratch space to load from 
Bytecode:  0x3bStack Input:  uint64Stack Output:  anySize:  2Availability:  v4Cost:  1Description:  Ith scratch space value of the Ath transaction in the current groupGroups:  Loading Values Notes 
gloads fails unless the requested transaction is an ApplicationCall and A < GroupIndex.
Immediate Parameters Name Encoding Description I uint8 position in scratch space to load from 
Bytecode:  0xc4Stack Input:  uint64,uint64Stack Output:  anySize:  1Availability:  v6Cost:  1Description:  Bth scratch space value of the Ath transaction in the current groupGroups:  Loading Values 
Bytecode:  0x32Stack Input:  -Stack Output:  anySize:  2Availability:  v1Cost:  1Description:  global field FGroups:  Loading Values Field Reference Index Name Type 0 MinTxnFee uint64 1 MinBalance uint64 2 MaxTxnLife uint64 3 ZeroAddress address 4 GroupSize uint64 5 LogicSigVersion uint64 6 Round uint64 7 LatestTimestamp uint64 8 CurrentApplicationID uint64 9 CreatorAddress address 10 CurrentApplicationAddress address 11 GroupID [32]byte 12 OpcodeBudget uint64 13 CallerApplicationID uint64 14 CallerApplicationAddress address 15 AssetCreateMinBalance uint64 16 AssetOptInMinBalance uint64 17 GenesisHash [32]byte 18 PayoutsEnabled bool 19 PayoutsGoOnlineFee uint64 20 PayoutsPercent uint64 21 PayoutsMinBalance uint64 22 PayoutsMaxBalance uint64 
Immediate Parameters Name Encoding Description F uint8 a global field index 
Bytecode:  0x33Stack Input:  -Stack Output:  anySize:  3Availability:  v1Cost:  1Description:  field F of the Tth transaction in the current groupGroups:  Loading Values Notes 
for notes on transaction fields available, see txn. If this transaction is i  in the group, gtxn i field is equivalent to txn field.
Field Reference Index Name Type 0 Sender address 1 Fee uint64 2 FirstValid uint64 3 FirstValidTime uint64 4 LastValid uint64 5 Note []byte 6 Lease [32]byte 7 Receiver address 8 Amount uint64 9 CloseRemainderTo address 10 VotePK [32]byte 11 SelectionPK [32]byte 12 VoteFirst uint64 13 VoteLast uint64 14 VoteKeyDilution uint64 15 Type []byte 16 TypeEnum uint64 17 XferAsset uint64 18 AssetAmount uint64 19 AssetSender address 20 AssetReceiver address 21 AssetCloseTo address 22 GroupIndex uint64 23 TxID [32]byte 24 ApplicationID uint64 25 OnCompletion uint64 26 ApplicationArgs []byte 27 NumAppArgs uint64 28 Accounts address 29 NumAccounts uint64 30 ApprovalProgram []byte 31 ClearStateProgram []byte 32 RekeyTo address 33 ConfigAsset uint64 34 ConfigAssetTotal uint64 35 ConfigAssetDecimals uint64 36 ConfigAssetDefaultFrozen bool 37 ConfigAssetUnitName []byte 38 ConfigAssetName []byte 39 ConfigAssetURL []byte 40 ConfigAssetMetadataHash [32]byte 41 ConfigAssetManager address 42 ConfigAssetReserve address 43 ConfigAssetFreeze address 44 ConfigAssetClawback address 45 FreezeAsset uint64 46 FreezeAssetAccount address 47 FreezeAssetFrozen bool 48 Assets uint64 49 NumAssets uint64 50 Applications uint64 51 NumApplications uint64 52 GlobalNumUint uint64 53 GlobalNumByteSlice uint64 54 LocalNumUint uint64 55 LocalNumByteSlice uint64 56 ExtraProgramPages uint64 57 Nonparticipation bool 58 Logs []byte 59 NumLogs uint64 60 CreatedAssetID uint64 61 CreatedApplicationID uint64 62 LastLog []byte 63 StateProofPK [64]byte 64 ApprovalProgramPages []byte 65 NumApprovalProgramPages uint64 66 ClearStateProgramPages []byte 67 NumClearStateProgramPages uint64 68 RejectVersion uint64 
Immediate Parameters Name Encoding Description T uint8 transaction group index F uint8 transaction field index 
Bytecode:  0x37Stack Input:  -Stack Output:  anySize:  4Availability:  v2Cost:  1Description:  Ith value of the array field F from the Tth transaction in the current groupgtxna can be called using gtxn with 3 immediates.Groups:  Loading Values Field Reference Index Name Type 0 ApplicationArgs []byte 1 Accounts address 2 Assets uint64 3 Applications uint64 4 Logs []byte 5 ApprovalProgramPages []byte 6 ClearStateProgramPages []byte 
Immediate Parameters Name Encoding Description T uint8 transaction group index F uint8 transaction field index I uint8 transaction field array index 
Bytecode:  0xc1Stack Input:  uint64Stack Output:  anySize:  3Availability:  v5Cost:  1Description:  Ath value of the array field F from the Tth transaction in the current groupGroups:  Loading Values Field Reference Index Name Type 0 ApplicationArgs []byte 1 Accounts address 2 Assets uint64 3 Applications uint64 4 Logs []byte 5 ApprovalProgramPages []byte 6 ClearStateProgramPages []byte 
Immediate Parameters Name Encoding Description T uint8 transaction group index F uint8 transaction field index 
Bytecode:  0x38Stack Input:  uint64Stack Output:  anySize:  2Availability:  v3Cost:  1Description:  field F of the Ath transaction in the current groupGroups:  Loading Values Notes 
for notes on transaction fields available, see txn. If top of stack is i , gtxns field is equivalent to gtxn _i_ field. gtxns exists so that i  can be calculated, often based on the index of the current transaction.
Field Reference Index Name Type 0 Sender address 1 Fee uint64 2 FirstValid uint64 3 FirstValidTime uint64 4 LastValid uint64 5 Note []byte 6 Lease [32]byte 7 Receiver address 8 Amount uint64 9 CloseRemainderTo address 10 VotePK [32]byte 11 SelectionPK [32]byte 12 VoteFirst uint64 13 VoteLast uint64 14 VoteKeyDilution uint64 15 Type []byte 16 TypeEnum uint64 17 XferAsset uint64 18 AssetAmount uint64 19 AssetSender address 20 AssetReceiver address 21 AssetCloseTo address 22 GroupIndex uint64 23 TxID [32]byte 24 ApplicationID uint64 25 OnCompletion uint64 26 ApplicationArgs []byte 27 NumAppArgs uint64 28 Accounts address 29 NumAccounts uint64 30 ApprovalProgram []byte 31 ClearStateProgram []byte 32 RekeyTo address 33 ConfigAsset uint64 34 ConfigAssetTotal uint64 35 ConfigAssetDecimals uint64 36 ConfigAssetDefaultFrozen bool 37 ConfigAssetUnitName []byte 38 ConfigAssetName []byte 39 ConfigAssetURL []byte 40 ConfigAssetMetadataHash [32]byte 41 ConfigAssetManager address 42 ConfigAssetReserve address 43 ConfigAssetFreeze address 44 ConfigAssetClawback address 45 FreezeAsset uint64 46 FreezeAssetAccount address 47 FreezeAssetFrozen bool 48 Assets uint64 49 NumAssets uint64 50 Applications uint64 51 NumApplications uint64 52 GlobalNumUint uint64 53 GlobalNumByteSlice uint64 54 LocalNumUint uint64 55 LocalNumByteSlice uint64 56 ExtraProgramPages uint64 57 Nonparticipation bool 58 Logs []byte 59 NumLogs uint64 60 CreatedAssetID uint64 61 CreatedApplicationID uint64 62 LastLog []byte 63 StateProofPK [64]byte 64 ApprovalProgramPages []byte 65 NumApprovalProgramPages uint64 66 ClearStateProgramPages []byte 67 NumClearStateProgramPages uint64 68 RejectVersion uint64 
Immediate Parameters Name Encoding Description F uint8 transaction field index 
Bytecode:  0x39Stack Input:  uint64Stack Output:  anySize:  3Availability:  v3Cost:  1Description:  Ith value of the array field F from the Ath transaction in the current groupgtxnsa can be called using gtxns with 2 immediates.Groups:  Loading Values Field Reference Index Name Type 0 ApplicationArgs []byte 1 Accounts address 2 Assets uint64 3 Applications uint64 4 Logs []byte 5 ApprovalProgramPages []byte 6 ClearStateProgramPages []byte 
Immediate Parameters Name Encoding Description F uint8 transaction field index I uint8 transaction field array index 
Bytecode:  0xc2Stack Input:  uint64,uint64Stack Output:  anySize:  2Availability:  v5Cost:  1Description:  Bth value of the array field F from the Ath transaction in the current groupGroups:  Loading Values Field Reference Index Name Type 0 ApplicationArgs []byte 1 Accounts address 2 Assets uint64 3 Applications uint64 4 Logs []byte 5 ApprovalProgramPages []byte 6 ClearStateProgramPages []byte 
Immediate Parameters Name Encoding Description F uint8 transaction field index 
Bytecode:  0x21Stack Input:  -Stack Output:  uint64Size:  2Availability:  v1Cost:  1Description:  Ith constant from intcblockGroups:  Loading Values Immediate Parameters Name Encoding Description I uint8 an index in the intcblock 
Bytecode:  0x22Stack Input:  -Stack Output:  uint64Size:  1Availability:  v1Cost:  1Description:  constant 0 from intcblockGroups:  Loading Values 
Bytecode:  0x23Stack Input:  -Stack Output:  uint64Size:  1Availability:  v1Cost:  1Description:  constant 1 from intcblockGroups:  Loading Values 
Bytecode:  0x24Stack Input:  -Stack Output:  uint64Size:  1Availability:  v1Cost:  1Description:  constant 2 from intcblockGroups:  Loading Values 
Bytecode:  0x25Stack Input:  -Stack Output:  uint64Size:  1Availability:  v1Cost:  1Description:  constant 3 from intcblockGroups:  Loading Values 
Bytecode:  0x20Stack Input:  -Stack Output:  -Size:  0Availability:  v1Cost:  1Description:  prepare block of uint64 constants for use by intcGroups:  Loading Values Notes 
intcblock loads following program bytes into an array of integer constants in the evaluator. These integer constants can be referred to by intc and intc_* which will push the value onto the stack. Subsequent calls to intcblock reset and replace the integer constants available to the script.
Immediate Parameters Name Encoding Description UINT … varuint count, [varuint …] a block of int constant values 
Bytecode:  0x16Stack Input:  uint64Stack Output:  [8]byteSize:  1Availability:  v1Cost:  1Description:  converts uint64 A to big-endian byte array, always of length 8Groups:  Arithmetic 
Bytecode:  0xb4Stack Input:  -Stack Output:  anySize:  2Availability:  v5Cost:  1Description:  field F of the last inner transactionGroups:  Inner Transactions Field Reference Index Name Type 0 Sender address 1 Fee uint64 2 FirstValid uint64 3 FirstValidTime uint64 4 LastValid uint64 5 Note []byte 6 Lease [32]byte 7 Receiver address 8 Amount uint64 9 CloseRemainderTo address 10 VotePK [32]byte 11 SelectionPK [32]byte 12 VoteFirst uint64 13 VoteLast uint64 14 VoteKeyDilution uint64 15 Type []byte 16 TypeEnum uint64 17 XferAsset uint64 18 AssetAmount uint64 19 AssetSender address 20 AssetReceiver address 21 AssetCloseTo address 22 GroupIndex uint64 23 TxID [32]byte 24 ApplicationID uint64 25 OnCompletion uint64 26 ApplicationArgs []byte 27 NumAppArgs uint64 28 Accounts address 29 NumAccounts uint64 30 ApprovalProgram []byte 31 ClearStateProgram []byte 32 RekeyTo address 33 ConfigAsset uint64 34 ConfigAssetTotal uint64 35 ConfigAssetDecimals uint64 36 ConfigAssetDefaultFrozen bool 37 ConfigAssetUnitName []byte 38 ConfigAssetName []byte 39 ConfigAssetURL []byte 40 ConfigAssetMetadataHash [32]byte 41 ConfigAssetManager address 42 ConfigAssetReserve address 43 ConfigAssetFreeze address 44 ConfigAssetClawback address 45 FreezeAsset uint64 46 FreezeAssetAccount address 47 FreezeAssetFrozen bool 48 Assets uint64 49 NumAssets uint64 50 Applications uint64 51 NumApplications uint64 52 GlobalNumUint uint64 53 GlobalNumByteSlice uint64 54 LocalNumUint uint64 55 LocalNumByteSlice uint64 56 ExtraProgramPages uint64 57 Nonparticipation bool 58 Logs []byte 59 NumLogs uint64 60 CreatedAssetID uint64 61 CreatedApplicationID uint64 62 LastLog []byte 63 StateProofPK [64]byte 64 ApprovalProgramPages []byte 65 NumApprovalProgramPages uint64 66 ClearStateProgramPages []byte 67 NumClearStateProgramPages uint64 68 RejectVersion uint64 
Immediate Parameters Name Encoding Description F uint8 transaction field index 
Bytecode:  0xb1Stack Input:  -Stack Output:  -Size:  1Availability:  v5Cost:  1Description:  begin preparation of a new inner transaction in a new transaction groupGroups:  Inner Transactions Notes 
itxn_begin initializes 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.
Bytecode:  0xb2Stack Input:  anyStack Output:  -Size:  2Availability:  v5Cost:  1Description:  set field F of the current inner transaction to AGroups:  Inner Transactions Notes 
itxn_field fails if A is of the wrong type for F, including a byte array of the wrong size for use as an address when F is an address field. itxn_field also fails if A is an account, asset, or app that is not available , or an attempt is made extend an array field beyond the limit imposed by consensus parameters. (Addresses set into asset params of acfg transactions need not be available .)
Field Reference Index Name Type 0 Sender address 1 Fee uint64 2 Note []byte 3 Receiver address 4 Amount uint64 5 CloseRemainderTo address 6 VotePK [32]byte 7 SelectionPK [32]byte 8 VoteFirst uint64 9 VoteLast uint64 10 VoteKeyDilution uint64 11 Type []byte 12 TypeEnum uint64 13 XferAsset uint64 14 AssetAmount uint64 15 AssetSender address 16 AssetReceiver address 17 AssetCloseTo address 18 ApplicationID uint64 19 OnCompletion uint64 20 ApplicationArgs []byte 21 Accounts address 22 ApprovalProgram []byte 23 ClearStateProgram []byte 24 RekeyTo address 25 ConfigAsset uint64 26 ConfigAssetTotal uint64 27 ConfigAssetDecimals uint64 28 ConfigAssetDefaultFrozen bool 29 ConfigAssetUnitName []byte 30 ConfigAssetName []byte 31 ConfigAssetURL []byte 32 ConfigAssetMetadataHash [32]byte 33 ConfigAssetManager address 34 ConfigAssetReserve address 35 ConfigAssetFreeze address 36 ConfigAssetClawback address 37 FreezeAsset uint64 38 FreezeAssetAccount address 39 FreezeAssetFrozen bool 40 Assets uint64 41 Applications uint64 42 GlobalNumUint uint64 43 GlobalNumByteSlice uint64 44 LocalNumUint uint64 45 LocalNumByteSlice uint64 46 ExtraProgramPages uint64 47 Nonparticipation bool 48 StateProofPK [64]byte 49 ApprovalProgramPages []byte 50 ClearStateProgramPages []byte 51 RejectVersion uint64 
Immediate Parameters Name Encoding Description F uint8 transaction field index 
Bytecode:  0xb6Stack Input:  -Stack Output:  -Size:  1Availability:  v6Cost:  1Description:  begin preparation of a new inner transaction in the same transaction groupGroups:  Inner Transactions Notes 
itxn_next initializes the transaction exactly as itxn_begin does
Bytecode:  0xb3Stack Input:  -Stack Output:  -Size:  1Availability:  v5Cost:  1Description:  execute the current inner transaction group. Fail if executing this group would exceed the inner transaction limit, or if any transaction in the group fails.Groups:  Inner Transactions Notes 
itxn_submit resets the current transaction so that it can not be resubmitted. A new itxn_begin is required to prepare another inner transaction.
Bytecode:  0xb5Stack Input:  -Stack Output:  anySize:  3Availability:  v5Cost:  1Description:  Ith value of the array field F of the last inner transactionGroups:  Inner Transactions Field Reference Index Name Type 0 ApplicationArgs []byte 1 Accounts address 2 Assets uint64 3 Applications uint64 4 Logs []byte 5 ApprovalProgramPages []byte 6 ClearStateProgramPages []byte 
Immediate Parameters Name Encoding Description F uint8 transaction field index I uint8 a transaction field array index 
Bytecode:  0xc5Stack Input:  uint64Stack Output:  anySize:  2Availability:  v6Cost:  1Description:  Ath value of the array field F of the last inner transactionGroups:  Inner Transactions Immediate Parameters Name Encoding Description F uint8 transaction field index 
Bytecode:  0x5fStack Input:  []byte,[]byteStack Output:  anySize:  2Availability:  v7Cost:  25 + 2 per 7 bytes of ADescription:  key B’s value, of type R, from a valid  utf-8 encoded json object AGroups:  Byte Array Manipulation Notes 
Warning : 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 ABI . This opcode should only be used in cases where JSON is only available option, e.g. when a third-party only signs JSON.
Field Reference Index Name Type 0 JSONString []byte 1 JSONUint64 uint64 2 JSONObject []byte 
Immediate Parameters Name Encoding Description R uint8 return type index 
Bytecode:  0x02Stack Input:  []byteStack Output:  [32]byteSize:  1Availability:  v1Cost:  130Description:  Keccak256 hash of value A, yields [32]byteGroups:  Cryptography 
Bytecode:  0x15Stack Input:  []byteStack Output:  uint64Size:  1Availability:  v1Cost:  1Description:  yields length of byte value AGroups:  Byte Array Manipulation 
Bytecode:  0x34Stack Input:  -Stack Output:  anySize:  2Availability:  v1Cost:  1Description:  Ith scratch space value. All scratch spaces are 0 at program start.Groups:  Loading Values Immediate Parameters Name Encoding Description I uint8 position in scratch space to load from 
Bytecode:  0x3eStack Input:  uint64Stack Output:  anySize:  1Availability:  v5Cost:  1Description:  Ath scratch space value.  All scratch spaces are 0 at program start.Groups:  Loading Values 
Bytecode:  0xb0Stack Input:  []byteStack Output:  -Size:  1Availability:  v5Cost:  1Description:  write A to log state of the current applicationGroups:  State Access Notes 
log fails if called more than MaxLogCalls times in a program, or if the sum of logged bytes exceeds 1024 bytes.
Bytecode:  0x8eStack Input:  -Stack Output:  -Size:  0Availability:  v8Cost:  1Description:  given match cases from A[1] to A[N], branch to the Ith label where A[I] = B. Continue to the following instruction if no matches are found.Groups:  Flow Control Notes 
match consumes N+1 values from the stack. Let the top stack value be B. The following N values represent an ordered list of match cases/constants (A), where the first value (A[0]) is the deepest in the stack. The immediate arguments are an ordered list of N labels (T). match will branch to target T[I], where A[I] = B. If there are no matches then execution continues on to the next instruction.
Immediate Parameters Name Encoding Description TARGET … varuint count, [int16 (big-endian) …] list of labels 
Bytecode:  0xe6Stack Input:  []byteStack Output:  [32]byteSize:  2Availability:  v11Cost:  BN254Mp110=10 + 550 per 32 bytes of A; BLS12_381Mp111=10 + 550 per 32 bytes of ADescription:  MiMC hash of scalars A, using curve and parameters specified by configuration CGroups:  Cryptography Notes 
A is a list of concatenated 32 byte big-endian unsigned integer scalars.  Fail if A’s length is not a multiple of 32 or any element exceeds the curve modulus.
The 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.
Immediate Parameters Name Encoding Description C uint8 configuration index 
Bytecode:  0x78Stack Input:  anyStack Output:  uint64Size:  1Availability:  v3Cost:  1Description:  minimum 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.Groups:  State Access Notes 
params: Txn.Accounts offset (or, since v4, an available  account address), available  application id (or, since v4, a Txn.ForeignApps offset). Return: value.
Bytecode:  0x1dStack Input:  uint64,uint64Stack Output:  uint64,uint64Size:  1Availability:  v1Cost:  1Description:  A times B as a 128-bit result in two uint64s. X is the high 64 bits, Y is the lowGroups:  Arithmetic 
Bytecode:  0x75Stack Input:  -Stack Output:  uint64Size:  1Availability:  v11Cost:  1Description:  the total online stake in the agreement roundGroups:  State Access 
Bytecode:  0x48Stack Input:  anyStack Output:  -Size:  1Availability:  v1Cost:  1Description:  discard AGroups:  Flow Control 
Bytecode:  0x46Stack Input:  -Stack Output:  -Size:  2Availability:  v8Cost:  1Description:  remove N values from the top of the stackGroups:  Flow Control Immediate Parameters Name Encoding Description N uint8 stack depth 
Bytecode:  0x8aStack Input:  -Stack Output:  -Size:  3Availability:  v8Cost:  1Description:  Prepare top call frame for a retsub that will assume A args and R return values.Groups:  Flow Control Notes 
Fails unless the last instruction executed was a callsub.
Immediate Parameters Name Encoding Description A uint8 number of arguments R uint8 number of return values 
Bytecode:  0x80Stack Input:  -Stack Output:  []byteSize:  0Availability:  v3Cost:  1Description:  immediate BYTESGroups:  Loading Values Notes 
pushbytes args are not added to the bytecblock during assembly processes
Immediate Parameters Name Encoding Description BYTES varuint length, bytes a byte constant 
Bytecode:  0x82Stack Input:  -Stack Output:  -Size:  0Availability:  v8Cost:  1Description:  push sequences of immediate byte arrays to stack (first byte array being deepest)Groups:  Loading Values Notes 
pushbytess args are not added to the bytecblock during assembly processes
Immediate Parameters Name Encoding Description BYTES … varuint count, [varuint length, bytes …] a list of byte constants 
Bytecode:  0x81Stack Input:  -Stack Output:  uint64Size:  0Availability:  v3Cost:  1Description:  immediate UINTGroups:  Loading Values Notes 
pushint args are not added to the intcblock during assembly processes
Immediate Parameters Name Encoding Description UINT varuint an int constant 
Bytecode:  0x83Stack Input:  -Stack Output:  -Size:  0Availability:  v8Cost:  1Description:  push sequence of immediate uints to stack in the order they appear (first uint being deepest)Groups:  Loading Values Notes 
pushints args are not added to the intcblock during assembly processes
Immediate Parameters Name Encoding Description UINT … varuint count, [varuint …] a list of int constants 
Bytecode:  0x5cStack Input:  []byte,[]byteStack Output:  []byteSize:  2Availability:  v7Cost:  1Description:  Copy of A with the bytes starting at S replaced by the bytes of B. Fails if S+len(B) exceeds len(A)replace2 can be called using replace with 1 immediate.Groups:  Byte Array Manipulation Immediate Parameters Name Encoding Description S uint8 start position 
Bytecode:  0x5dStack Input:  []byte,uint64,[]byteStack Output:  []byteSize:  1Availability:  v7Cost:  1Description:  Copy of A with the bytes starting at B replaced by the bytes of C. Fails if B+len(C) exceeds len(A)replace3 can be called using replace with no immediates.Groups:  Byte Array Manipulation 
Bytecode:  0x89Stack Input:  -Stack Output:  -Size:  1Availability:  v4Cost:  1Description:  pop the top instruction from the call stack and branch to itGroups:  Flow Control Notes 
If the current frame was prepared by proto A R, retsub will remove the ‘A’ arguments from the stack, move the R return values down, and pop any stack locations above the relocated return values.
Bytecode:  0x43Stack Input:  uint64Stack Output:  -Size:  1Availability:  v2Cost:  1Description:  use A as success value; endGroups:  Flow Control 
Bytecode:  0x4dStack Input:  any,any,uint64Stack Output:  anySize:  1Availability:  v3Cost:  1Description:  selects one of two values based on top-of-stack: B if C != 0, else AGroups:  Flow Control 
Bytecode:  0x54Stack Input:  any,uint64,uint64Stack Output:  anySize:  1Availability:  v3Cost:  1Description:  Copy 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 failsGroups:  Byte Array Manipulation Notes 
When 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.
Bytecode:  0x56Stack Input:  []byte,uint64,uint64Stack Output:  []byteSize:  1Availability:  v3Cost:  1Description:  Copy 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 failsGroups:  Byte Array Manipulation 
Bytecode:  0x01Stack Input:  []byteStack Output:  [32]byteSize:  1Availability:  v1Cost:  35Description:  SHA256 hash of value A, yields [32]byteGroups:  Cryptography 
Bytecode:  0x98Stack Input:  []byteStack Output:  [32]byteSize:  1Availability:  v7Cost:  130Description:  SHA3_256 hash of value A, yields [32]byteGroups:  Cryptography 
Bytecode:  0x03Stack Input:  []byteStack Output:  [32]byteSize:  1Availability:  v1Cost:  45Description:  SHA512_256 hash of value A, yields [32]byteGroups:  Cryptography 
Bytecode:  0x90Stack Input:  uint64,uint64Stack Output:  uint64Size:  1Availability:  v4Cost:  1Description:  A times 2^B, modulo 2^64Groups:  Arithmetic 
Bytecode:  0x91Stack Input:  uint64,uint64Stack Output:  uint64Size:  1Availability:  v4Cost:  1Description:  A divided by 2^BGroups:  Arithmetic 
Bytecode:  0x92Stack Input:  uint64Stack Output:  uint64Size:  1Availability:  v4Cost:  4Description:  The largest integer I such that I^2 <= AGroups:  Arithmetic 
Bytecode:  0x35Stack Input:  anyStack Output:  -Size:  2Availability:  v1Cost:  1Description:  store A to the Ith scratch spaceGroups:  Loading Values Immediate Parameters Name Encoding Description I uint8 position in scratch space to store to 
Bytecode:  0x3fStack Input:  uint64,anyStack Output:  -Size:  1Availability:  v5Cost:  1Description:  store B to the Ath scratch spaceGroups:  Loading Values 
Bytecode:  0x51Stack Input:  []byteStack Output:  []byteSize:  3Availability:  v2Cost:  1Description:  A range of bytes from A starting at S up to but not including E. If E < S, or either is larger than the array length, the program failsGroups:  Byte Array Manipulation Immediate Parameters Name Encoding Description S uint8 start position E uint8 end position 
Bytecode:  0x52Stack Input:  []byte,uint64,uint64Stack Output:  []byteSize:  1Availability:  v2Cost:  1Description:  A 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 failsGroups:  Byte Array Manipulation 
Bytecode:  0x4cStack Input:  any,anyStack Output:  any,anySize:  1Availability:  v3Cost:  1Description:  swaps A and B on stackGroups:  Flow Control 
Bytecode:  0x8dStack Input:  uint64Stack Output:  -Size:  0Availability:  v8Cost:  1Description:  branch to the Ath label. Continue at following instruction if index A exceeds the number of labels.Groups:  Flow Control Immediate Parameters Name Encoding Description TARGET … varuint count, [int16 (big-endian) …] list of labels 
Bytecode:  0x31Stack Input:  -Stack Output:  anySize:  2Availability:  v1Cost:  1Description:  field F of current transactionGroups:  Loading Values Field Reference Index Name Type 0 Sender address 1 Fee uint64 2 FirstValid uint64 3 FirstValidTime uint64 4 LastValid uint64 5 Note []byte 6 Lease [32]byte 7 Receiver address 8 Amount uint64 9 CloseRemainderTo address 10 VotePK [32]byte 11 SelectionPK [32]byte 12 VoteFirst uint64 13 VoteLast uint64 14 VoteKeyDilution uint64 15 Type []byte 16 TypeEnum uint64 17 XferAsset uint64 18 AssetAmount uint64 19 AssetSender address 20 AssetReceiver address 21 AssetCloseTo address 22 GroupIndex uint64 23 TxID [32]byte 24 ApplicationID uint64 25 OnCompletion uint64 26 ApplicationArgs []byte 27 NumAppArgs uint64 28 Accounts address 29 NumAccounts uint64 30 ApprovalProgram []byte 31 ClearStateProgram []byte 32 RekeyTo address 33 ConfigAsset uint64 34 ConfigAssetTotal uint64 35 ConfigAssetDecimals uint64 36 ConfigAssetDefaultFrozen bool 37 ConfigAssetUnitName []byte 38 ConfigAssetName []byte 39 ConfigAssetURL []byte 40 ConfigAssetMetadataHash [32]byte 41 ConfigAssetManager address 42 ConfigAssetReserve address 43 ConfigAssetFreeze address 44 ConfigAssetClawback address 45 FreezeAsset uint64 46 FreezeAssetAccount address 47 FreezeAssetFrozen bool 48 Assets uint64 49 NumAssets uint64 50 Applications uint64 51 NumApplications uint64 52 GlobalNumUint uint64 53 GlobalNumByteSlice uint64 54 LocalNumUint uint64 55 LocalNumByteSlice uint64 56 ExtraProgramPages uint64 57 Nonparticipation bool 58 Logs []byte 59 NumLogs uint64 60 CreatedAssetID uint64 61 CreatedApplicationID uint64 62 LastLog []byte 63 StateProofPK [64]byte 64 ApprovalProgramPages []byte 65 NumApprovalProgramPages uint64 66 ClearStateProgramPages []byte 67 NumClearStateProgramPages uint64 68 RejectVersion uint64 
Immediate Parameters Name Encoding Description F uint8 transaction field index 
Bytecode:  0x36Stack Input:  -Stack Output:  anySize:  3Availability:  v2Cost:  1Description:  Ith value of the array field F of the current transactiontxna can be called using txn with 2 immediates.Groups:  Loading Values Field Reference Index Name Type 0 ApplicationArgs []byte 1 Accounts address 2 Assets uint64 3 Applications uint64 4 Logs []byte 5 ApprovalProgramPages []byte 6 ClearStateProgramPages []byte 
Immediate Parameters Name Encoding Description F uint8 transaction field index I uint8 transaction field array index 
Bytecode:  0xc0Stack Input:  uint64Stack Output:  anySize:  2Availability:  v5Cost:  1Description:  Ath value of the array field F of the current transactionGroups:  Loading Values Field Reference Index Name Type 0 ApplicationArgs []byte 1 Accounts address 2 Assets uint64 3 Applications uint64 4 Logs []byte 5 ApprovalProgramPages []byte 6 ClearStateProgramPages []byte 
Immediate Parameters Name Encoding Description F uint8 transaction field index 
Bytecode:  0x4fStack Input:  anyStack Output:  anySize:  2Availability:  v5Cost:  1Description:  remove the value at depth N in the stack and shift above items down so the Nth deep value is on top of the stack. Fails if stack depth <= N.Groups:  Flow Control Immediate Parameters Name Encoding Description N uint8 depth 
Bytecode:  0x74Stack Input:  anyStack Output:  any,boolSize:  2Availability:  v11Cost:  1Description:  X 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-valueGroups:  State Access Immediate Parameters Name Encoding Description F uint8 voter params field index 
Bytecode:  0xd0Stack Input:  []byte,[80]byte,[32]byteStack Output:  [64]byte,boolSize:  2Availability:  v7Cost:  5700Description:  Verify the proof B of message A against pubkey C. Returns vrf output and verification flag.Groups:  Cryptography Notes 
VrfAlgorand is the VRF used in Algorand. It is ECVRF-ED25519-SHA512-Elligator2, specified in the IETF internet draft draft-irtf-cfrg-vrf-03 .
Field Reference Index Name Type 0 VrfAlgorand - 
Immediate Parameters Name Encoding Description S uint8  parameters index