Skip to content

File: src/Scale/Bytes/Bytes2.sol

Bytes2

Kind: library

ABI Surface

Errors

  • error InvalidBytes2Length()

Function Surface

  • function encode(bytes2 value) internal pure returns (bytes)
    • Encodes an bytes2 into SCALE format.
  • function encodedSizeAt(bytes data, uint256 offset) internal pure returns (uint256)
    • Returns the number of bytes that a bytes2 would occupy when SCALE-encoded.
  • function decode(bytes data) internal pure returns (bytes2)
    • Decodes SCALE-encoded bytes into an bytes2.
  • function decodeAt(bytes data, uint256 offset) internal pure returns (bytes2)
    • Decodes an bytes2 from SCALE format at the specified offset.

Created with solidity-doc-generator