How layr-labs/eigenlayer-contracts works
Major Functional Areas
• Core Smart Contracts – These are in the “src/contracts” folder (under the “core” subdirectory) and include key contracts like DelegationManager, StrategyManager, AVSDirectory, Slasher, and RewardsCoordinator. They implement the main protocol logic.
• Pods and Operator Management – Under “src/contracts/pods” (and related dependencies in “docs” and “certora”) are contracts like EigenPod and EigenPodManager. These deal with operator services and help manage restaking for service providers.
• Token Components – Located in “src/contracts/token” and with corresponding Go bindings in “pkg/bindings”, contracts like Eigen and BackingEigen manage the native tokens.
• Permissions & Governance – The “permissions” subdirectory and multisig and timelock contracts (the multisig items in the README and also PermissionController related contracts) should be considered distinct components within the governance/control layer.
• Supporting Tools & Infrastructure – The file tree includes a host of deployment scripts (in “script”), Docker and devcontainer configurations, Foundry configuration (foundry.toml and Makefile), as well as automated testing and static analysis tools. Although these are not part of the on-chain runtime architecture, they are crucial for the development and deployment pipelines.
Architectural Patterns and Technologies
• Integration with external services: The protocol references interactions with the beacon chain (for Beacon Chain ETH) and Layer-2 or off-chain testing environments (as seen in the “script” folder and fork tests).
• That the build and testing setup is powered by Foundry (commands like “forge build” and “forge test”), and there are multiple configuration files (Dockerfile, Makefile, foundry.toml, etc.) that support project automation.
Additional Elements
• Each component (e.g., “DelegationManager”, “StrategyManager”, etc.) should have clear labels.
• Deployment and testing infrastructure (DevContainer, Docker, Foundry, CI workflows) as a side note to capture the overall development ecosystem.