Skip to content

Supported AVM Features

Supported AVM Features

ARCS

ARCNameDescription
4Application Binary Interface (ABI)ABI method routing is automatically down for public methods. All ABI types are natively supported. Compiler outputs ARC4 JSON
22Add read-only annotation to ABI methodsDecorating a method with @abi.readonly will mark it as readonly
28Algorand Event Log SpecUse EventLogger to log ARC28 events
32Application SpecificationCompiler generates an arc32 JSON file

ABI Types

ABI TypeTEALScript
addressAddress
uintNuint64, uint32, uint16, uint8, uint128, uint256, or uint<N>
boolboolean
ufixedNxMufixed<N, M>
T[]T[]
T[N]StaticArray<T, N>, bytes32, or bytes64
[T1, T2, ..., TN][T1, T2, ..., TN] or {keyone: T1, keytwo: T2, ..., keyN: TN}
stringstring
applicationApplicationReference
assetAssetReference
accountAccountReference
txnTxn
payPayTxn
keyregKeyRegTxn
acfgAssetConfigTxn
axferAssetTransferTxn
afrzAssetFreezeTxn

Opcodes

Flow Control

OpcodeTEALScript
errthrow Error()
bnzUsed automatically in loops and conditionals
bzUsed automatically in loops and conditionals
bUsed automatically in loops and conditionals
returnUsed when the top-level function returns
assertassert
buryStack manipulation is not officially supported
popnStack manipulation is not officially supported
dupnStack manipulation is not officially supported
popStack manipulation is not officially supported
dupStack manipulation is not officially supported
dup2Stack manipulation is not officially supported
digStack manipulation is not officially supported
swapStack manipulation is not officially supported
selectNot officially supported yet, but could be used to optimize conditionals in the future
coverStack manipulation is not officially supported
uncoverStack manipulation is not officially supported
callsubUsed when calling a function
retsubreturn
protoUsed automatically in functions
frame_digUsed automatically in functions
frame_buryUsed automatically in functions
switchNot officially supported yet, but could be used to optimize conditionals in the future
matchNot officially supported yet, but could be used to optimize conditionals in the future

Cryptography

OpcodeTEALScript
sha256sha256
keccak256keccak256
sha512_256sha512_256
ed25519verifyed25519Verify
ecdsa_verifyecdsaVerify
ecdsa_pk_decompressecdsaPkDecompress
ecdsa_pk_recoverecdsaPkRecover
ed25519verify_bareed25519VerifyBare
sha3_256sha3_256
vrf_verifyvrfVerify
ec_addecAdd
ec_scalar_mulecScalarMul
ec_pairing_checkecPairingCheck
ec_multi_scalar_mulecMultiScalarMul
ec_subgroup_checkecSubgroupCheck
ec_map_toecMapTo

Arithmetic

OpcodeTEALScript
+Natively supported
-Natively supported
/Natively supported
*Natively supported
<Natively supported
>Natively supported
<=Natively supported
>=Natively supported
&&Natively supported
||Natively supported
==Natively supported
!=Natively supported
!Natively supported
itobNatively supported
btoiNatively supported
%Natively supported
|Natively supported
&Natively supported
^Natively supported
~Natively supported
mulwmulw
addwaddw
divmodwdivmodw
shl<<
shr>>
sqrtNatively supported
bitlenbitlen
exp**
expwexpw
divwdivw

Byte Array Manipulation

OpcodeTEALScript
len.length on bytes
concatconcat or +
substringString.substring or substring
substring3String.substring or substring
getbitgetbit
setbitsetbit
getbytegetbyte
setbytesetbyte
extractextract3
extract3extract3
extract_uint16extractUint16
extract_uint32extractUint32
extract_uint64extractUint64
replace2replace3
replace3replace3
base64_decodebase64Decode
json_refjsonRef

Loading Values

OpcodeTEALScript
intcblockConstant block not officially supported
intcConstant block not officially supported
intc_0Constant block not officially supported
intc_1Constant block not officially supported
intc_2Constant block not officially supported
intc_3Constant block not officially supported
bytecblockConstant block not officially supported
bytecConstant block not officially supported
bytec_0Constant block not officially supported
bytec_1Constant block not officially supported
bytec_2Constant block not officially supported
bytec_3Constant block not officially supported
argLogicSig.logic arguments
arg_0LogicSig.logic arguments
arg_1LogicSig.logic arguments
arg_2LogicSig.logic arguments
arg_3LogicSig.logic arguments
txnthis.txn
globalglobals
gtxnthis.txnGroup or transaction argument
loadScratchSlot
storeScratchSlot
txnathis.txn
gtxnathis.txnGroup or transaction argument
gtxnsthis.txnGroup or transaction argument
gtxnsathis.txnGroup or transaction argument
gloadTxn.load
gloadsTxn.load
gaidthis.txnGroup or transaction argument
gaidsthis.txnGroup or transaction argument
loadsScratchSlot
storesScratchSlot
pushbytesUsed by TemplateVar
pushintUsed by TemplateVar
pushbytessNot used yet, but could be used for optimizations in future
pushintsNot used yet, but could be used for optimizations in future
bzerobzero
txnasthis.txn
gtxnasthis.txnGroup or transaction argument
gtxnsasthis.txnGroup or transaction argument
argsLogicSig.logic arguments
gloadssTxn.load

State Access

OpcodeTEALScript
balanceAddress.balance and Address.hasBalance
app_opted_inAddress.isOptedInToApp()
app_local_getMethod call on LocalStateKey on LocalStateMap
app_local_get_exAppID.local()
app_global_getMethod call on GlobalStateKey on GlobalStateMap
app_global_get_exAppID.global()
app_local_putMethod call on LocalStateKey on LocalStateMap
app_global_putMethod call on GlobalStateKey on GlobalStateMap
app_local_delMethod call on LocalStateKey on LocalStateMap
app_global_delMethod call on GlobalStateKey on GlobalStateMap
asset_holding_getAddress.assetBalance and Address.isOptedInToAsset
asset_params_getMethod calls on AssetID
app_params_getMethod calls on AppID
acct_params_getMethod calls on Address
min_balanceAddress.minBalance
loglog or EventEmitter
blockblocks

Byte Array Arithmetic

OpcodeTEALScript
bsqrtNatively supported
b+Natively supported
b-Natively supported
b/Natively supported
b*Natively supported
b<Natively supported
b>Natively supported
b<=Natively supported
b>=Natively supported
b==Natively supported
b!=Natively supported
b%Natively supported

Byte Array Logic

OpcodeTEALScript
b|Natively supported
b&Natively supported
b^Natively supported
b~Natively supported

Inner Transactions

OpcodeTEALScript
itxn_beginthis.pendingGroup.add... or send...
itxn_fieldthis.pendingGroup.add... or send...
itxn_submitthis.pendingGroup.execute or send...
itxnthis.itxn
itxnathis.itxn
itxn_nextthis.pendingGroup.add...
gitxnthis.lastInnerGroup
gitxnathis.lastInnerGroup
itxnasthis.itxn
gitxnasthis.lastInnerGroup

Box Access

OpcodeTEALScript
box_createMethod call on BoxKey or BoxMap
box_extractMethod call on BoxKey or BoxMap
box_replaceMethod call on BoxKey or BoxMap
box_delMethod call on BoxKey or BoxMap
box_lenMethod call on BoxKey or BoxMap
box_getMethod call on BoxKey or BoxMap
box_putMethod call on BoxKey or BoxMap
box_spliceMethod call on BoxKey or BoxMap
box_resizeMethod call on BoxKey or BoxMap