Internal Libraries
Libraries hold the single source of truth for shared storage and reusable helpers, so every facet speaks the same language.
AccessControlLib: Packs role flags into a struct at
ACCESS_CONTROL_STORAGE_POSITION
and exposes modifiers (onlyOwner
,onlyGuardian
, etc.) that all facets import, guaranteeing consistent checks.MoreVaultsLib: Central repository for vault-wide parameters: asset list, fee config, totalAssets cache, and the immutable
wrappedNative
address. By reading/writing through this lib, facets avoid storage-collision and keep gas costs down.
These two libs are call-only—they cannot hold ETH or ERC-20s—which keeps the attack surface limited to the facets and diamond itself.
Last updated