Function isPayload

Check if the opcode contains a payload

bool isPayload (
  in const(OP) opcode
) pure nothrow @nogc @safe;

Parameters

NameDescription
opcode opcode to check

Returns

true if the opcode contains a payload

Example

assert(OP.PUSH_BYTES_1.isPayload);
assert(OP.PUSH_BYTES_75.isPayload);
assert(OP.PUSH_DATA_1.isPayload);
assert(OP.PUSH_DATA_2.isPayload);
assert(!OP.IF.isPayload);
assert(!OP.NOT_IF.isPayload);
assert(!OP.TRUE.isPayload);