hone-labs / teal-interpreter

An interpreter for TEAL assembly code that simulates the Algorand virtual machine.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Moar opcodes

barnjamin opened this issue · comments

Hi! This looks awesome!

I did try it on a teal program I've got locally but I'm using some ops that aren't yet defined.

Plans to update with teal5/6 opcodes?

Yep, planning to be up to date soon. Which specific opcodes did you come across?

I think it was ExtractUint64 on one an Method on the other though method is a pseudo-op.

I might take a crack at defining some of these if thats ok?

Yeah absolutely, any and all contributions welcome

For reference.

I just did a string compare against https://github.com/algorand/go-algorand/blob/feature/contract-to-contract/data/transactions/logic/opcodes.go#L151 and keys in opcodeDefs.

ecdsa_pk_decompress
ecdsa_pk_recover
divmodw
cover
uncover
extract
extract3
extract_uint16
extract_uint32
extract_uint64
base64_decode
acct_params_get
bitlen
bsqrt
divw
b+
b-
b/
b*
b<
b>
b<=
b>=
b==
b!=
b%
b|
b&
b^
b~
bzero
log
itxn_next
gitxn
gitxna
gloadss
itxnas
gitxnas

I'm planning to complete the set of opcodes in the coming weeks.

@barnjamin I've implemented all opcodes up to and including TEAL 5.

TEAL 6 is coming soon.