referrerpolicy=no-referrer-when-downgrade

Module utils

Source
Expand description

Helper utilities around pre-compiles.

This file contains a number of functions for Solidity type encoding and decoding. Notably these implementations don’t require an allocator, which is why they are here in the first place (e.g. alloy-core requires an allocator for the Solidity bytes type).

Functions§

decode_bytes
Simple decoder for a Solidity bytes type.
encode_bool
Encodes a bool to big-endian [u8; 32] with padded zeros.
encode_bytes
Encodes the bytes argument for the Solidity ABI. The result is written to out.
encode_u32
Encodes a u32 to big-endian [u8; 32] with padded zeros.
solidity_selector
Returns the Solidity selector for fn_sig.