TEAL opcodes support and costs - runtimeverification/avm-semantics GitHub 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 ? implemented, not tested ?
byte b ? implemented, not tested ?
addr a ? implemented, not tested ?
method m ? not implemented ?

TEAL v7

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

TEAL v6

Opcode TEAL V Status Cost
acct_params_get f 6 not implemented 1
bsqrt 6 not implemented 40
divw 6 not implemented 1
itxn_next 6 implemented, not tested 1
gitxn t f 6 implemented, not tested 1
gitxna t f i 6 implemented, not tested 1
gloadss 6 implemented, not tested 1
itxnas f 6 not implemented 1
gitxnas t f 6 not implemented 1

TEAL v5

Opcode TEAL V Status Cost
ecdsa_verify 5 not implemented 1700
ecdsa_pk_decompress 5 not implemented 650
ecdsa_pk_recover 5 not implemented 2000
loads 5 tested (unit) 1
stores 5 tested (unit) 1
cover 5 tested (unit) 1
uncover 5 tested (unit) 1
extract 5 tested (unit) 1
extract3 5 tested (unit) 1
extract_uint16 5 tested (unit) 1
extract_uint32 5 tested (unit) 1
extract_uint64 5 tested (unit) 1
app_params_get 5 tested (unit) 1
log 5 tested (unit) 1
itxn_begin 5 tested (unit) 1
itxn_field 5 tested (unit) 1
itxn_submit 5 tested (unit) 1
itxn 5 tested (unit) 1
itxna 5 tested (unit) 1
txnas 5 tested (unit) 1
gtxnas 5 tested (unit) 1
gtxnsas 5 tested (unit) 1
args 5 not implemented (logic sig specific) 1

TEAL v4

Opcode TEAL V Status Cost
divmodw 4 implemented, not tested 20
gload t i 4 tested (unit) 1
gloads i 4 tested (unit) 1
gaid t 4 tested (unit) 1
gaids 4 tested (unit) 1
callsub target 4 tested (unit) 1
retsub 4 tested (unit) 1
shl 4 tested (unit) 1
shr 4 tested (unit) 1
sqrt 4 implemented, but is currently too slow on symbolic execution 4
bitlen 4 tested (unit) 1
exp 4 tested (unit) 1
expw 4 tested (unit) 1
b+ 4 tested (unit) 10
b- 4 tested (unit) 10
b/ 4 tested (unit) 20
b* 4 tested (unit) 20
b< 4 tested (unit) 1
b> 4 tested (unit) 1
b<= 4 tested (unit) 1
b>= 4 tested (unit) 1
b== 4 tested (unit) 1
b!= 4 tested (unit) 1
b% 4 tested (unit) 20
b| 4 tested (unit) 6
b& 4 tested (unit) 6
b^ 4 tested (unit) 6
b~ 4 tested (unit) 4
bzero 4 tested (unit) 1

TEAL v3

Opcode TEAL V Status Cost
gtxns f 3 tested (unit), but not for all fields 1
gtxnsa f i 3 tested (unit), but not for all fields 1
assert 3 tested (unit) 1
dig n 3 tested (unit) 1
swap 3 tested (unit) 1
select 3 tested (unit) 1
getbit 3 tested (unit) 1
setbit 3 tested (unit) 1
getbyte 3 tested (unit) 1
setbyte 3 tested (unit) 1
min_balance 3 tested (unit) 1
pushbytes bytes 3 tested (unit) 1
pushint uint 3 tested (unit) 1

TEAL v2

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

TEAL v1

Opcode TEAL V Supported Cost
err 1 tested (unit) 1
sha256 1 implemented, not tested 35
keccak256 1 implemented, not tested 130
sha512_256 1 implemented, not tested 45
ed25519verify 1 not implemented 1900
+ 1 tested (unit) 1
- 1 tested (unit) 1
/ 1 tested (unit) 1
* 1 tested (unit) 1
< 1 tested (unit) 1
> 1 tested (unit) 1
<= 1 tested (unit) 1
>= 1 tested (unit) 1
&& 1 tested (unit) 1
|| 1 tested (unit) 1
== 1 tested (unit) 1
!= 1 tested (unit) 1
! 1 tested (unit) 1
len 1 tested (unit) 1
itob 1 tested (unit) 1
btoi 1 tested (unit) 1
% 1 tested (unit) 1
| 1 tested (unit) 1
& 1 tested (unit) 1
^ 1 tested (unit) 1
~ 1 implemented, but might be incorrectly handling signedness (check all bit arithmetic operators too) 1
mulw 1 tested (unit) 1
intcblock 1 tested (unit) 1
intc i 1 tested (unit) 1
intc_0 i 1 tested (unit) 1
intc_1 1 tested (unit) 1
intc_2 1 tested (unit) 1
intc_3 1 tested (unit) 1
bytecblock 1 tested (unit) 1
bytec i 1 tested (unit) 1
bytec_0 1 tested (unit) 1
bytec_1 1 tested (unit) 1
bytec_2 1 tested (unit) 1
bytec_3 1 tested (unit) 1
arg n 1 not implemented (logic sig specific) 1
arg_0 1 not implemented (logic sig specific) 1
arg_1 1 not implemented (logic sig specific) 1
arg_2 1 not implemented (logic sig specific) 1
arg_3 1 not implemented (logic sig specific) 1
txn f 1 tested (unit), but not for all fields 1
global f 1 tested (unit), but not for all fields 1
gtxn t f 1 tested (unit), but not for all fields 1
load i 1 tested (unit) 1
store i 1 tested (unit) 1
pop 1 tested (unit) 1
dup 1 tested (unit) 1
⚠️ **GitHub.com Fallback** ⚠️