Readonly
stackThis function executes TEAL code after parsing
: execution mode of TEAL code (Stateless or Stateful)
: runtime object
Optional
debugStack: numberThis function executes TEAL code after parsing and returns the result of the program.
The final result on the stack or undefined if nothing was on the stack. NOTE: program should fail if there is no result (stack is empty after the execution) or the result is zero.
: runtime object
Optional
debugStack: numberQueries account by accountIndex or ctx.tx.snd
(if accountIndex==0
).
If account address is passed, then queries account by address.
When create
flag is true we will throws exception if account is not found.
When create
flag is false we will create new account and add it to context.
index of account to fetch from account list
line number
create flag, default is true
allow to access foreign application account or not(false), default is true NOTE: index 0 represents txn sender account
Queries app (SSCAttributesM) from state. Throws TEAL.APP_NOT_FOUND if app is not found.
Application Index
Queries appIndex by app reference (offset to foreignApps array OR index directly)
an offset to foreign app array OR appID
for older teal versions(<= 3), foreign bool represent if ref is treated as an offset/appIndex
Queries assetIndex by asset reference (offset to foreignAssets array OR index directly)
an offset to foreign assets array OR assetID
for older teal versions(<= 3), foreign bool represent if ref is treated as an offset/assetIndex
Generated using TypeDoc
Interpreter parses and executes a TEAL code. Each transaction is using a new instance of interpreter and doesn't share the interpreter state. When executing the transaction we create a Context (
ctx
) and pass it to the interpreter. It encapsulates runtime state and the transaction group state (eg shared scratch space). Interpreter must not modify theruntime
- the latter will be updated during the context commit phase once all transactions in the groups succeed.