Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
EVM unsigned/signed comparison and zero-check opcode handlers (0x10-0x15).
Comparison
@tevm/voltaire/evm
6
0x10
0x15
toSigned256
3
1n
0n
top
a, b -> a < b ? 1 : 0
0x11
a, b -> a > b ? 1 : 0
0x12
a, b -> signed(a) < signed(b)
0x13
a, b -> signed(a) > signed(b)
0x14
a, b -> a == b ? 1 : 0
a -> a == 0 ? 1 : 0
import { Comparison, Frame } from '@tevm/voltaire/evm'; const frame = Frame({ gas: 1000n }); Frame.pushStack(frame, 10n); Frame.pushStack(frame, 5n); // top of stack = a = 5, second = b = 10 const err = Comparison.LT(frame); // 5 < 10 -> 1n console.log(err, Frame.popStack(frame).value); // null, 1n
Was this page helpful?