TEAL opcodes support and costs - runtimeverification/avm-semantics Wiki

The purpose of the page is to keep track which opcodes are supported by our TEAL interpreter.

Pseudo-ops

Opcode TEAL V Status Cost
int i ? ✔️ ?
byte b ? ✔️ ?
addr a ? ✔️ ?
method m ? ?

TEAL v7

Opcode TEAL V Status Cost
replace2 s 7 1
replace3 7 1
base64_decode e 7 1 + 1 per 16 bytes of A
json_ref r 7 25 + 2 per 7 bytes of A
ed25519verify_bare 7 1900
sha3_256 7 130
vrf_verify s 7 5700
block f 7 1

TEAL v6

Opcode TEAL V Status Cost
acct_params_get f 6 1
bsqrt 6 40
divw 6 1
itxn_next 6 1
gitxn t f 6 1
gitxna t f i 6 1
gloadss 6 ✔️ 1
itxnas f 6 1
gitxnas t f 6 1

TEAL v5

Opcode TEAL V Status Cost
ecdsa_verify 5 1700
ecdsa_pk_decompress 5 650
ecdsa_pk_recover 5 2000
loads 5 ✔️ 1
stores 5 ✔️ 1
cover 5 ✔️ 1
uncover 5 ✔️ 1
extract 5 ✔️ 1
extract3 5 ✔️ 1
extract_uint16 5 ✔️ 1
extract_uint32 5 ✔️ 1
extract_uint64 5 ✔️ 1
app_params_get 5 1
log 5 ✔️ 1
itxn_begin 5 1
itxn_field 5 1
itxn_submit 5 1
itxn 5 1
itxna 5 1
txnas 5 ✔️ 1
gtxnas 5 ✔️ 1
gtxnsas 5 ✔️ 1
args 5 ✔️ 1

TEAL v4

Opcode TEAL V Status Cost
divmodw 4 ✔️ 20
gload t i 4 ✔️ 1
gloads i 4 ✔️ 1
gaid t 4 ✔️ 1
gaids 4 ✔️ 1
callsub target 4 ✔️ 1
retsub 4 ✔️ 1
shl 4 ✔️ 1
shr 4 ✔️ 1
sqrt 4 ✔️ 4
bitlen 4 ✔️ 1
exp 4 ✔️ 1
expw 4 ✔️ 1
b+ 4 ✔️ 10
b- 4 ✔️ 10
b/ 4 ✔️ 20
b* 4 ✔️ 20
b< 4 ✔️ 1
b> 4 ✔️ 1
b<= 4 ✔️ 1
b>= 4 ✔️ 1
b== 4 ✔️ 1
b!= 4 ✔️ 1
b% 4 ✔️ 20
b| 4 ✔️ 6
b& 4 ✔️ 6
b^ 4 ✔️ 6
b~ 4 ✔️ 4
bzero 4 ✔️ 1

TEAL v3

Opcode TEAL V Status Cost
gtxns f 3 ✔️ 1
gtxnsa f i 3 ✔️ 1
assert 3 ✔️ 1
dig n 3 ✔️ 1
swap 3 ✔️ 1
select 3 ✔️ 1
getbit 3 ✔️ 1
setbit 3 ✔️ 1
getbyte 3 ✔️ 1
setbyte 3 ✔️ 1
min_balance 3 ✔️ 1
pushbytes bytes 3 ✔️ 1
pushint uint 3 ✔️ 1

TEAL v2

Opcode TEAL V Status Cost
addw 2 ✔️ 1
txna f i 2 ✔️ 1
gtxna t f i 2 ✔️ 1
concat 2 ✔️ 1
substring s e 2 ✔️ 1
substring3 2 ✔️ 1
dup2 2 ✔️ 1
balance 2 ✔️ 1
app_opted_in 2 ✔️ 1
app_local_get 2 ✔️ 1
app_local_get_ex 2 ✔️ 1
app_global_get 2 ✔️ 1
app_global_get_ex 2 ✔️ 1
app_local_put 2 ✔️ 1
app_global_put 2 ✔️ 1
app_local_del 2 ✔️ 1
app_global_del 2 ✔️ 1
asset_holding_get i 2 ✔️ 1
asset_params_get i 2 ✔️ 1
return 2 ✔️ 1
bnz target 2 (4) ✔️ 1
bz target 2 (4) ✔️ 1
b target 2 (4) ✔️ 1

TEAL v1

Opcode TEAL V Supported Cost
err 1 ✔️ 1
sha256 1 ✔️ 35
keccak256 1 ✔️ 130
sha512_256 1 ✔️ 45
ed25519verify 1 ✔️ 1900
+ 1 ✔️ 1
- 1 ✔️ 1
/ 1 ✔️ 1
* 1 ✔️ 1
< 1 ✔️ 1
> 1 ✔️ 1
<= 1 ✔️ 1
>= 1 ✔️ 1
&& 1 ✔️ 1
|| 1 ✔️ 1
== 1 ✔️ 1
!= 1 ✔️ 1
! 1 ✔️ 1
len 1 ✔️ 1
itob 1 ✔️ 1
btoi 1 ✔️ 1
% 1 ✔️ 1
| 1 ✔️ 1
& 1 ✔️ 1
^ 1 ✔️ 1
~ 1 ✔️ 1
mulw 1 ✔️ 1
intcblock 1 ✔️ 1
intc i 1 ✔️ 1
intc_0 i 1 ✔️ 1
intc_1 1 ✔️ 1
intc_2 1 ✔️ 1
intc_3 1 ✔️ 1
bytecblock 1 ✔️ 1
bytec i 1 ✔️ 1
bytec_0 1 ✔️ 1
bytec_1 1 ✔️ 1
bytec_2 1 ✔️ 1
bytec_3 1 ✔️ 1
arg n 1 ✔️ 1
arg_0 1 ✔️ 1
arg_1 1 ✔️ 1
arg_2 1 ✔️ 1
arg_3 1 ✔️ 1
txn f 1 ✔️ 1
global f 1 ✔️ 1
gtxn t f 1 ✔️ 1
load i 1 ✔️ 1
store i 1 ✔️ 1
pop 1 ✔️ 1
dup 1 ✔️ 1
⚠️ **GitHub.com Fallback** ⚠️