Project Structure
This document provides detailed information about each directory in the OpenZeppelin Monitor project.
Source Code Organization:
src/
Directory:
The main source code directory contains the core implementation files organized into several modules:
-
bootstrap/
: Application initialization and setup formain.rs
-
Handles service initialization and dependency injection
-
-
models/
: Core data structures and types-
blockchain/
: Platform-specific implementations-
evm/
: Ethereum Virtual Machine specific types -
stellar/
: Stellar blockchain specific types
-
-
config/
: Configuration loading and validation -
core/
: Core domain models
-
-
repositories/
: Configuration storage-
Handles loading and validating configuration files
-
Provides storage interfaces for monitors, networks, and triggers
-
Implements validation of configuration references
-
-
services/
: Core business logic-
blockchain/
: Blockchain client interfaces-
transports/
: Transport clients-
evm/
: Ethereum Virtual Machine transport client -
stellar/
: Stellar transport client
-
-
clients/
: Client implementations-
evm/
: Ethereum Virtual Machine client -
stellar/
: Stellar client
-
-
-
blockwatcher/
: Block monitoring and processing -
filter/
: Transaction and event filtering-
filters/
: Filter implementations-
evm/
: Ethereum Virtual Machine filter -
stellar/
: Stellar filter
-
-
-
notification/
: Alert handling -
trigger/
: Trigger evaluation and execution
-
-
utils/
: Helper functions-
cron_utils
: Cron schedule utilities -
expression
: Expression evaluation -
logging/
: Logging utilities -
metrics/
: Metrics utilities -
script/
: Script execution utilities
-
Configuration and Data:
config/
Directory:
Contains JSON configuration files for:
-
Network configurations (
networks/
)-
Connection details for blockchain networks
-
RPC endpoints and network parameters
-
-
Monitor configurations (
monitors/
)-
Monitoring rules and conditions
-
Network and trigger references
-
-
Trigger configurations (
triggers/
)-
Notification settings
-
Script definitions
-
-
Filter configurations (
filters/
)-
Match filter scripts
-
Testing and Documentation:
Docker Support:
The project includes Docker configurations for different environments:
-
Dockerfile.development
: Development container setup. -
Dockerfile.production
: Production-ready container. -
Before running the docker compose set your env variables in
.env
according to your needs.
For detailed information about running the monitor in containers, see the Docker deployment section in the main documentation. |