Try it Live
Run Bytecode examples in the interactive playground
BytecodeLike Type
BytecodeLike is a union type accepting any input that can be coerced to bytecode:
Accepted Types
Uint8Array - Raw byte arrays:0x prefix:
Usage in Function Signatures
UseBytecodeLike for flexible function parameters:
Performance
No conversion overhead forUint8Array, BrandedBytecode, and Bytecode (zero-copy).
Conversion required for strings (parses hex and allocates new Uint8Array).
For performance-critical code, prefer passing Uint8Array or BrandedBytecode directly.
See Also
- fromHex - Parse hex string directly
- fromUint8Array - Create from Uint8Array directly

