Functions§
- address_
from_ 256_ from_ reader - Reads a 32-byte padded address from a reader (last 20 bytes are the address).
- address_
from_ reader - Reads a 20-byte address from a reader.
- address_
to_ 256_ to_ writer - Writes a 32-byte padded address to a writer (left-padded with zeros).
- address_
to_ hash - Converts an address to a B256 hash (left-padded with zeros).
- address_
to_ writer - Writes a 20-byte address to a writer.
- bytestring_
from_ reader - Reads a length-prefixed byte string from a reader, rejecting lengths
above
max_bytes_to_read. Every caller must pass an explicit cap sized to the protocol context (typicallyMAX_L2_MESSAGE_SIZE) so an attacker-controlled length prefix can’t trigger a huge pre-allocation. - bytestring_
to_ writer - Writes a length-prefixed byte string to a writer.
- hash_
from_ reader - Reads a 32-byte hash from a reader.
- hash_
to_ writer - Writes a 32-byte hash to a writer.
- int_
to_ hash - Converts a signed integer to a B256 hash (big-endian).
- uint64_
from_ reader - Reads a uint64 from a reader (big-endian).
- uint64_
to_ writer - Writes a uint64 to a writer (big-endian).
- uint256_
from_ reader - Reads a U256 from a reader (big-endian).
- uint_
to_ hash - Converts an unsigned integer to a B256 hash (big-endian).