Skip to content

Named constants

Noah Watson edited this page Aug 30, 2022 · 10 revisions

Named constants

These constants are usable, each group with specific opcodes, in Teal syntax, to specify various options, e.g. which transaction field to look up.

ecdsa_verify

Name TEAL V Status
Secp256k1 7
Secp256r1 7

txn

Name TEAL V Status
Sender 1 ✔️
Fee 1
FirstValid 1 ✔️
FirstValidTime 1 ✔️
LastValid 1 ✔️
Note 1
Lease 1
Receiver 1 ✔️
Amount 1 ✔️
CloseRemainderTo 1
VotePK 1
SelectionPK 1
VoteFirst 1
VoteLast 1
VoteKeyDilution 1
Type 1 ✔️ (as TxType)
TypeEnum 1 ✔️
XferAsset 1 ✔️
AssetAmount 1 ✔️
AssetSender 1 ❌ (Named AssetASender)
AssetReceiver 1 ✔️
AssetCloseTo 1 ✔️
GroupIndex 1 ✔️ (Group index corresponds with transaction ID)
TxID 1 Unsure
ApplicationID 2 ✔️
OnCompletion 2 ✔️
ApplicationArgs 2 ✔️ (I think ApplicationArgs need to always be Bytes when accessed from within the program)
NumAppArgs 2 ✔️
Accounts 2 ✔️
NumAccounts 2 ✔️
ApprovalProgram 2 ❌ (Needs access to compiled Teal)
ClearStateProgram 2 ❌ (Needs access to compiled Teal)
RekeyTo 2
ConfigAsset 2 ✔️
ConfigAssetTotal 2 ✔️
ConfigAssetDecimals 2 ✔️
ConfigAssetDefaultFrozen 2 ✔️
ConfigAssetUnitName 2 ✔️
ConfigAssetName 2 ✔️
ConfigAssetURL 2 ✔️
ConfigAssetMetadataHash 2
ConfigAssetManager 2 ❌ (Needs integration with other asset manager actions)
ConfigAssetReserve 2
ConfigAssetFreeze 2
ConfigAssetClawback 2
FreezeAsset 2 ❌ (Asset freezing not implemented)
FreezeAssetAccount 2
FreezeAssetFrozen 2
Assets 3 ✔️
NumAssets 3 ✔️
Applications 3 ✔️
NumApplications 3 ✔️
GlobalNumUint 3
GlobalNumByteSlice 3
LocalNumUint 3
LocalNumByteSlice 3
ExtraProgramPages 4 ❌ (Needs accessor, and eventually check if compiled program fits?)
Nonparticipation 5
Logs 5
NumLogs 5
CreatedAssetID 5
CreatedApplicationID 5
LastLog 6
StateProofPK 6

global

Name TEAL V Status
MinTxnFee 1 ✔️
MinBalance 1 ✔️
MaxTxnLife 1 ✔️
ZeroAddress 1 ✔️
GroupSize 1 ✔️
LogicSigVersion 2
Round 2
LatestTimestamp 2
CurrentApplicationID 2 ✔️
CreatorAddress 3
CurrentApplicationAddress 5
GroupID 5
OpcodeBudget 6
CallerApplicationID 6
CallerApplicationAddress 6

base64_decode

Name TEAL V Status
URLEncoding 7
StdEncoding 7

json_ref

Name TEAL V Status
JSONString 7
JSONUint64 7
JSONObject 7

asset_holding_get

Name TEAL V Status
AssetBalance 2
AssetFrozen 2

asset_params_get

Name TEAL V Status
AssetTotal 2
AssetDecimals 2
AssetDefaultFrozen 2
AssetUnitName 2
AssetName 2
AssetURL 2
AssetMetadataHash 2
AssetManager 2
AssetReserve 2
AssetFreeze 2
AssetClawback 2
AssetCreator 5

app_params_get

Name TEAL V Status
AppApprovalProgram 5
AppClearStateProgram 5
AppGlobalNumUint 5
AppGlobalNumByteSlice 5
AppLocalNumUint 5
AppLocalNumByteSlice 5
AppExtraProgramPages 5
AppCreator 5
AppAddress 5

acct_params_get

Name TEAL V Status
AcctBalance 6
AcctMinBalance 6
AcctAuthAddr 6

ecdsa_verify

Name TEAL V Status
Secp256k1 7
Secp256r1 7

itxn_field

Name TEAL V Status
unknown
pay
keyreg
acfg
axfer
afrz
appl