Nexus

TEAL compile error: "+ arg 0 wanted type uint64 got [1]byte"

Short answer: An arithmetic opcode got a byte string where it needs an integer. The compiler type-checks the stack.

The exact message

1 error: 4: + arg 0 wanted type uint64 got [1]byte

Source: POST /v2/teal/compile, HTTP 400, captured against a public TestNet node on 2026-12-03.

Why it happens

Captured with byte "a", int 1, +. The message reports + arg 0 wanted type uint64 got [1]byte: argument 0 is the deeper stack item, which is the byte string. Strings must be converted (for example btoi) before arithmetic.

How to fix it

Wording can change between node versions. All API errors · errors.json · transaction errors · SDK errors · costs