Nexus

TEAL compile error: "box_get opcode was introduced in v8"

Short answer: You used an opcode that did not exist yet in the program's declared TEAL version. Raise the #pragma version.

The exact message

3: box_get opcode was introduced in v8
5: pop expects 1 stack arguments but stack height is 0

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

Why it happens

Captured with #pragma version 5 and box_get. The message states the version that introduced the opcode (v8). A second line (pop expects 1 stack arguments but stack height is 0) appears because the compiler did not count the unavailable opcode's results.

How to fix it

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