### Docker Installation and Setup Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/docs/index.mdx Clones the repository, sets up the environment by copying the example .env file, and starts the service using Docker Compose. ```bash git clone https://github.com/openzeppelin/openzeppelin-monitor cd openzeppelin-monitor cp .env.example .env # Edit .env file with your configuration cargo make docker-compose-up ``` -------------------------------- ### Initial Project Setup Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/docs/1.3.x/contribution.mdx Clones the repository, navigates into the directory, builds the project, and sets up environment variables by copying the example .env file. ```bash git clone https://github.com/openzeppelin/openzeppelin-monitor cd openzeppelin-monitor cargo build cp .env.example .env ``` -------------------------------- ### Initial Project Setup Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/README.md Clones the repository, builds the project using Cargo, and sets up environment variables by copying the example .env file. ```bash # Clone the repository git clone https://github.com/openzeppelin/openzeppelin-monitor cd openzeppelin-monitor # Build the project cargo build # Set up environment variables cp .env.example .env ``` -------------------------------- ### Setup Environment for Docker Installation Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/docs/1.3.x/index.mdx Copies the example environment file and prompts to edit it with custom configurations for Docker deployment. ```bash cp .env.example .env # Edit .env file with your configuration ``` -------------------------------- ### Copy Example Monitor and Network Configuration Files Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/docs/1.3.x/index.mdx Copy example configuration files for EVM, Stellar, and Solana monitors and networks. These files define specific monitor setups and network details. ```bash # EVM Configuration cp examples/config/monitors/evm_transfer_usdc.json config/monitors/evm_transfer_usdc.json cp examples/config/networks/ethereum_mainnet.json config/networks/ethereum_mainnet.json # Stellar Configuration cp examples/config/monitors/stellar_swap_dex.json config/monitors/stellar_swap_dex.json cp examples/config/networks/stellar_mainnet.json config/networks/stellar_mainnet.json # Solana Configuration cp examples/config/monitors/solana_kamino_deposit.json config/monitors/solana_kamino_deposit.json cp examples/config/networks/solana_mainnet.json config/networks/solana_mainnet.json ``` -------------------------------- ### Clone and Run Automated Setup Script Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/docs/1.3.x/quickstart.mdx Clones the OpenZeppelin Monitor repository and makes the automated setup script executable. This script handles building the application, copying configurations, and validating setup. ```bash git clone https://github.com/openzeppelin/openzeppelin-monitor cd openzeppelin-monitor chmod +x setup_and_run.sh ./setup_and_run.sh ``` -------------------------------- ### Copy EVM and Stellar Configuration Files Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/docs/index.mdx Copies example configuration files for EVM and Stellar monitors and networks. These files define specific network parameters and monitor setups. ```bash # EVM Configuration cp examples/config/monitors/evm_transfer_usdc.json config/monitors/evm_transfer_usdc.json cp examples/config/networks/ethereum_mainnet.json config/networks/ethereum_mainnet.json # Stellar Configuration cp examples/config/monitors/stellar_swap_dex.json config/monitors/stellar_swap_dex.json cp examples/config/networks/stellar_mainnet.json config/networks/stellar_mainnet.json ``` -------------------------------- ### Start OpenZeppelin Monitor with Metrics Enabled Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/docs/1.3.x/index.mdx Starts the monitor with the metrics server enabled on port 8081. Use this for performance monitoring. ```bash ./openzeppelin-monitor --metrics ``` -------------------------------- ### Copy Solana Mainnet Network Configuration Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/docs/1.3.x/quickstart.mdx Copies the example Solana mainnet configuration file. This is necessary if you haven't used the automated setup script. ```bash # Only necessary if you haven't already run the automated setup script (Option 1: Automated Setup) cp examples/config/networks/solana_mainnet.json config/networks/solana_mainnet.json ``` -------------------------------- ### Move Binary and Verify Installation Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/docs/1.3.x/index.mdx Moves the compiled binary to the project root and verifies the installation by running the help command. ```bash mv ./target/release/openzeppelin-monitor . ./openzeppelin-monitor --help ``` -------------------------------- ### Verify Installation and View Options Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/docs/index.mdx Verifies the OpenZeppelin Monitor installation by displaying the help message. Shows available command-line options. ```bash ./openzeppelin-monitor --help ``` -------------------------------- ### Copy Example Configuration Files Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/docs/1.3.x/local-evm-testing.mdx Copies the example configuration files for networks, monitors, and triggers into the appropriate directories within the project's config folder. ```bash cp examples/config/networks/anvil_local.json config/networks/ cp examples/config/monitors/evm_transfer_local.json config/monitors/ cp examples/config/triggers/script_notifications.json config/triggers/ mkdir -p config/triggers/scripts cp examples/config/triggers/scripts/custom_notification.sh config/triggers/scripts/ ``` -------------------------------- ### Copy Solana Kamino Deposit Monitor Configuration Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/docs/1.3.x/quickstart.mdx Copies the example configuration file for monitoring Kamino deposits on Solana. This is necessary if you haven't run the automated setup script. ```bash cp examples/config/monitors/solana_kamino_deposit.json config/monitors/solana_kamino_deposit.json ``` -------------------------------- ### Copy Example Notification Configuration Files Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/docs/1.3.x/index.mdx Copy example configuration files for Slack and email notifications. These files define how alerts and notifications are sent. ```bash # Notification Configuration cp examples/config/triggers/slack_notifications.json config/triggers/slack_notifications.json cp examples/config/triggers/email_notifications.json config/triggers/email_notifications.json ``` -------------------------------- ### Start OpenZeppelin Monitor with File Logging Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/docs/1.3.x/index.mdx Starts the monitor and directs logs to a file instead of standard output. Useful for persistent log storage. ```bash ./openzeppelin-monitor --log-file ``` -------------------------------- ### Install Rust Toolchain Components Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/README.md Installs the 'rustfmt' component for code formatting via the Rustup toolchain manager. ```bash rustup component add rustfmt ``` -------------------------------- ### Enable Logging and Metrics Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/docs/index.mdx Demonstrates how to enable logging to a file and start the metrics server for OpenZeppelin Monitor. ```bash # Enable logging to file ./openzeppelin-monitor --log-file # Enable metrics server ./openzeppelin-monitor --metrics ``` -------------------------------- ### Start OpenZeppelin Monitor with Docker Compose Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/docs/1.3.x/index.mdx Starts the OpenZeppelin Monitor service using Docker Compose. Includes commands for both default and metrics-enabled profiles. ```bash cargo make docker-compose-up # without metrics profile ( METRICS_ENABLED=false by default ) docker compose up -d # With metrics enabled docker compose --profile metrics up -d ``` -------------------------------- ### Copy Example Filter Configuration Files Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/docs/1.3.x/index.mdx Copy example filter configuration files for EVM and Stellar. These scripts define custom filtering logic for monitor data. ```bash # Filter Configuration cp examples/config/filters/evm_filter_block_number.sh config/filters/evm_filter_block_number.sh cp examples/config/filters/stellar_filter_block_number.sh config/filters/stellar_filter_block_number.sh ``` -------------------------------- ### Install Coverage Tool Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/docs/1.3.x/testing.mdx Installs the necessary components and the cargo-llvm-cov tool for generating code coverage reports. ```bash rustup component add llvm-tools-preview cargo install cargo-llvm-cov ``` -------------------------------- ### Install Forge Standard Library Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/examples/contracts/README.md Install the Forge standard library if it's not already present in your project. This is a prerequisite for using Foundry. ```bash forge install foundry-rs/forge-std ``` -------------------------------- ### Set Up Environment Variables Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/CONTRIBUTING.md Copies the example environment file to a new file for local configuration. This is a necessary step before running the application. ```sh cp .env.example .env ``` -------------------------------- ### Run OpenZeppelin Monitor Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/docs/1.3.x/local-evm-testing.mdx Starts the OpenZeppelin Monitor service. Assumes the project has been built and the binary is accessible. ```bash cargo run ``` -------------------------------- ### Start Local Anvil Node Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/docs/1.3.x/local-evm-testing.mdx Starts a local Ethereum node using Anvil. It will output the default endpoint and a list of prefunded accounts. ```bash anvil ``` -------------------------------- ### Service Initialization Flow Diagram Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/docs/1.3.x/architecture.mdx Illustrates the sequence of service initialization and dependencies starting from the main entry point. ```mermaid %%{init: { 'theme': 'base', 'themeVariables': { 'background': '#ffffff', 'mainBkg': '#ffffff', 'primaryBorderColor': '#cccccc' } }}%% graph TD subgraph Entry Point MAIN[main.rs] end subgraph Bootstrap BOOTSTRAP[Bootstrap::initialize_service] end subgraph Block Processing BT[BlockTracker] BS[BlockStorage] BWS[BlockWatcherService] BH[create_block_handler] end subgraph Core Services MS[MonitorService] NS[NetworkService] TS[TriggerService] FS[FilterService] TES[TriggerExecutionService] NOTS[NotificationService] end subgraph Client Layer CP[ClientPool] EVMC[EVMClient] SC[StellarClient] SOC[SolanaClient] MC[MidnightClient] end %% Initialization Flow MAIN --> BOOTSTRAP BOOTSTRAP --> CP BOOTSTRAP --> NS BOOTSTRAP --> MS BOOTSTRAP --> TS BOOTSTRAP --> FS BOOTSTRAP --> TES BOOTSTRAP --> NOTS %% Block Processing Setup BOOTSTRAP --> BT BOOTSTRAP --> BS BOOTSTRAP --> BWS BOOTSTRAP --> BH %% Client Dependencies CP --> EVMC CP --> SC CP --> SOC CP --> MC BWS --> CP %% Service Dependencies BWS --> BS BWS --> BT MS --> NS MS --> TS FS --> TES TES --> NOTS %% Block Handler Connection BH --> FS BWS --> BH style MAIN fill:#e1f5fe,stroke:#01579b style BOOTSTRAP fill:#fff3e0,stroke:#ef6c00 classDef blockProcessing fill:#e8f5e9,stroke:#2e7d32 classDef coreServices fill:#f3e5f5,stroke:#7b1fa2 classDef clients fill:#fce4ec,stroke:#c2185b class BT,BS,BWS,BH blockProcessing class MS,NS,TS,FS,TES,NOTS coreServices class CP,EVMC,SC,SOC,MC clients ``` -------------------------------- ### Install Foundry Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/docs/1.3.x/local-evm-testing.mdx Installs Foundry (Anvil, Forge, Cast) using a provided script. Ensure you have curl and bash available. ```bash curl -L https://foundry.paradigm.xyz | bash foundryup ``` -------------------------------- ### Start Docker Compose Services Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/docs/1.3.x/quickstart.mdx Starts the OpenZeppelin Monitor services using Docker Compose. For production environments, set the DOCKERFILE environment variable to Dockerfile.production. ```bash docker compose up ``` -------------------------------- ### Verify Foundry Installation Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/docs/1.3.x/local-evm-testing.mdx Checks if Anvil, Forge, and Cast have been installed correctly by displaying their version numbers. ```bash anvil --version forge --version cast --version ``` -------------------------------- ### Install System Dependencies with Script Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/docs/1.3.x/index.mdx Executes a script to install system packages and ensure a compatible Python version for development. Use for runtime-only dependencies if preferred. ```bash chmod +x ./scripts/linux/sys_pkgs_dev.sh # Installs required packages and ensures compatible Python version ./scripts/linux/sys_pkgs_dev.sh # For Python/dev dependencies (includes runtime deps) # Or, for runtime-only (no Python/dev tools): ./scripts/linux/sys_pkgs_core.sh ``` -------------------------------- ### Install and Configure Pre-commit Hooks Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/docs/1.3.x/contribution.mdx Installs the pre-commit tool and configures the Git hooks for commit-msg, pre-commit, and pre-push to enforce code quality checks. ```bash pip install pre-commit pre-commit install --install-hooks -t commit-msg -t pre-commit -t pre-push ``` -------------------------------- ### Install Forge Standard Library Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/docs/1.3.x/local-evm-testing.mdx Installs the Foundry Forge standard library within a Foundry project. Navigate to the contracts directory first. ```bash cd examples/contracts forge install foundry-rs/forge-std ``` -------------------------------- ### Run OpenZeppelin Monitor with Docker Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/docs/1.3.x/quickstart.mdx Starts the OpenZeppelin Monitor service using Docker Compose. This is the recommended method for deployment. ```bash cargo make docker-compose-up ``` -------------------------------- ### Install Rustfmt and Format Code Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/CONTRIBUTING.md Installs the rustfmt component and formats the code using cargo fmt. This ensures consistent code style across the project. ```sh rustup component add rustfmt cargo fmt ``` -------------------------------- ### Copy Stellar Swap Monitor Configuration Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/docs/1.3.x/quickstart.mdx Copies the example configuration file for monitoring Stellar DEX swaps to the active configuration directory. ```bash cp examples/config/monitors/stellar_swap_dex.json config/monitors/stellar_swap_dex.json ``` -------------------------------- ### Copy Slack Notification Configuration Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/docs/1.3.x/quickstart.mdx Copies the example configuration file for setting up Slack notifications to the triggers directory. ```bash cp examples/config/triggers/slack_notifications.json config/triggers/slack_notifications.json ``` -------------------------------- ### Example Trigger Configurations Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/docs/1.3.x/index.mdx Defines two example triggers: one for EVM USDC transfers and another for Stellar USDC transfers, both configured to send Slack notifications. ```json { "evm_large_transfer_usdc_slack": { "name": "Large Transfer Slack Notification", "trigger_type": "slack", "config": { "slack_url": { "type": "plain", "value": "https://hooks.slack.com/services/A/B/C" }, "message": { "title": "${monitor.name} triggered", "body": "Large transfer of ${events.0.args.value} USDC from ${events.0.args.from} to ${events.0.args.to} | https://etherscan.io/tx/${transaction.hash}#eventlog" } } }, "stellar_large_transfer_usdc_slack": { "name": "Large Transfer Slack Notification", "trigger_type": "slack", "config": { "slack_url": { "type": "environment", "value": "SLACK_WEBHOOK_URL" }, "message": { "title": "large_transfer_usdc_slack triggered", "body": "${monitor.name} triggered because of a large transfer of ${functions.0.args.amount} USDC to ${functions.0.args.to} | https://stellar.expert/explorer/testnet/tx/${transaction.hash}" } } } } ``` -------------------------------- ### Start Docker Compose with Metrics Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/docs/1.3.x/index.mdx Starts the monitor services with metrics enabled (Prometheus + Grafana) by setting METRICS_ENABLED=true in the .env file. Use this for integrated monitoring and metrics collection. ```bash # Set METRICS_ENABLED=true in .env file, then: docker compose --profile metrics up -d ``` -------------------------------- ### Build Project Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/CONTRIBUTING.md Compiles the project using Cargo. This command should be run after installing system dependencies. ```sh cargo build ``` -------------------------------- ### Install System Dependencies on Ubuntu/Debian Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/docs/1.3.x/contribution.mdx Installs necessary system packages for development on Ubuntu 22.04+ or Debian-based systems. This includes build tools, libraries, and Python. ```bash sudo apt update sudo apt install -y \ build-essential \ curl \ git \ pkg-config \ libssl-dev \ libffi-dev \ libyaml-dev \ python3 \ python3-venv \ python3-pip ``` -------------------------------- ### View OpenZeppelin Monitor Options Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/docs/1.3.x/index.mdx Displays available command-line options for the OpenZeppelin Monitor binary. Includes examples for enabling logging and metrics. ```bash ./openzeppelin-monitor --help # Enable logging to file ./openzeppelin-monitor --log-file # Enable metrics server ./openzeppelin-monitor --metrics # Validate configuration files without starting the service ./openzeppelin-monitor --check ``` -------------------------------- ### Copy Solana Configuration Files Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/docs/index.mdx Copies example configuration files for Solana monitors and networks. These files are used to set up monitoring for Solana-based applications. ```bash # Solana Configuration cp examples/config/monitors/solana_kamino_deposit.json config/monitors/solana_kamino_deposit.json cp examples/config/networks/solana_mainnet.json config/networks/solana_mainnet.json ``` -------------------------------- ### Copy Bulletin Post Monitor Configuration Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/docs/1.3.x/quickstart.mdx Copies the example configuration for monitoring 'post' transactions to a bulletin board contract on the Midnight testnet. ```bash cp examples/config/monitors/midnight_testnet_bulletin_post.json config/monitors/midnight_testnet_bulletin_post.json ``` -------------------------------- ### Configure Ethereum Mainnet Network Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/docs/1.3.x/quickstart.mdx Copies the Ethereum mainnet network configuration file. This is necessary if the automated setup script was not used. ```bash # Only necessary if you haven't already run the automated setup script (Option 1: Automated Setup) cp examples/config/networks/ethereum_mainnet.json config/networks/ethereum_mainnet.json ``` -------------------------------- ### Example Monitor Configuration Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/docs/1.3.x/index.mdx Define a monitor to track large USDC transfers on Ethereum mainnet, specifying contract addresses, match conditions, and triggers. ```json { "name": "Large USDC Transfers", "networks": ["ethereum_mainnet"], "paused": false, "addresses": [ { "address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", "contract_spec": [ ... ] } ], "match_conditions": { "functions": [ { "signature": "transfer(address,uint256)", "expression": "value > 1000000" } ], "events": [ { "signature": "Transfer(address,address,uint256)", "expression": "value > 1000000" } ], "transactions": [ { "status": "Success", "expression": "value > 1500000000000000000" } ] }, "trigger_conditions": [ { "script_path": "./config/filters/evm_filter_block_number.sh", "language": "bash", "arguments": "--verbose", "timeout_ms": 1000 } ], "triggers": ["evm_large_transfer_usdc_slack", "evm_large_transfer_usdc_email"] } ``` -------------------------------- ### Configure Slack Notifications Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/docs/1.3.x/quickstart.mdx Copies the Slack notification configuration file. This is needed if the automated setup script was not used. ```bash # Only necessary if you haven't already run the automated setup script (Option 1: Automated Setup) cp examples/config/triggers/slack_notifications.json config/triggers/slack_notifications.json ``` -------------------------------- ### Docker Compose with Metrics Enabled Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/docs/index.mdx Starts services using Docker Compose, with the metrics profile enabled. Assumes METRICS_ENABLED=true is set in the .env file. ```bash docker compose --profile metrics up -d ``` -------------------------------- ### Check OpenZeppelin Monitor Configuration Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/docs/1.3.x/local-evm-testing.mdx Validates the monitor's configuration files without starting the service. Use this to ensure settings are correct before running. ```bash cargo run -- --check ``` -------------------------------- ### Example Configuration References Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/docs/1.3.x/index.mdx Illustrates how network, trigger, and monitor configurations reference each other using slugs and keys. Ensure all referenced names exist in their respective files to prevent monitor startup failures. ```json // networks/ethereum_mainnet.json { "slug": "ethereum_mainnet", ... } // triggers/slack_notifications.json { "large_transfer_slack": { ... } } // monitors/usdc_transfer_monitor.json { "networks": ["ethereum_mainnet"], "triggers": ["large_transfer_slack"], ... } ``` -------------------------------- ### Clone and Set Up Repository Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/docs/1.3.x/contribution.mdx Clone your fork of the repository and add the upstream remote for tracking changes. ```bash mkdir -p $working_dir cd $working_dir git clone https://github.com/$user/openzeppelin-monitor.git cd openzeppelin-monitor git remote add upstream https://github.com/openzeppelin/openzeppelin-monitor.git git remote set-url --push upstream no_push ``` -------------------------------- ### Fork and Clone Repository Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/docs/1.3.x/contribution.mdx Sets up the local development environment by defining a working directory and cloning the user's fork of the repository. ```bash export working_dir="${HOME}/repos" export user= ``` -------------------------------- ### Run OpenZeppelin Monitor (Direct Binary) Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/docs/1.3.x/local-evm-testing.mdx Executes the OpenZeppelin Monitor directly using its binary file. Useful if the binary has been moved to the project root. ```bash ./openzeppelin-monitor ``` -------------------------------- ### Run System Package Scripts Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/CONTRIBUTING.md Executes scripts to install system packages and ensure compatible Python versions. The dev script also installs Python/dev dependencies. ```sh chmod +x ./scripts/linux/sys_pkgs_core.sh chmod +x ./scripts/linux/sys_pkgs_dev.sh ./scripts/linux/sys_pkgs_core.sh # For runtime dependencies only ./scripts/linux/sys_pkgs_dev.sh # For Python/dev dependencies (calls core script) ``` -------------------------------- ### Install Python 3.11 with pyenv Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/docs/1.3.x/contribution.mdx Use pyenv to install and set the local Python version to 3.11 for the repository. This ensures a consistent Python environment for development and pre-commit hooks. ```bash pyenv install 3.11 pyenv local 3.11 python --version ``` -------------------------------- ### Midnight Transfer Function Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/docs/1.3.x/index.mdx Example of a transfer function signature for Midnight. ```plaintext transfer() ``` -------------------------------- ### Stellar Deposit Function Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/docs/1.3.x/index.mdx Example of a deposit function signature for Stellar. ```plaintext deposit(Address,I128) ``` -------------------------------- ### Solana Withdrawal Event Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/docs/1.3.x/index.mdx Example of a withdrawal event name for Anchor-based Solana programs. ```plaintext Withdraw ``` -------------------------------- ### Build OpenZeppelin Monitor from Source Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/docs/1.3.x/quickstart.mdx Clones the OpenZeppelin Monitor repository and compiles the release build of the application using Cargo. The binary is then moved to the project root. ```bash git clone https://github.com/openzeppelin/openzeppelin-monitor cd openzeppelin-monitor cargo build --release mv ./target/release/openzeppelin-monitor . ``` -------------------------------- ### Stellar Token Transfer Function Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/docs/1.3.x/index.mdx Example of a token transfer function signature for Stellar. ```plaintext transfer(Address,Address,I128) ``` -------------------------------- ### Stellar DEX Swap Function Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/docs/1.3.x/index.mdx Example of a DEX swap function signature for Stellar. ```plaintext swap(Address,U32,U32,U128,U128) ``` -------------------------------- ### Solana Simple Event Name Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/docs/1.3.x/index.mdx Example of a simple event name for Anchor-based Solana programs. ```plaintext Deposit ``` -------------------------------- ### EVM String Operations Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/docs/1.3.x/index.mdx Check if strings start with, end with, or contain specific substrings. Operations are case-insensitive. ```EVM "transaction.input starts_with '0xa9059cbb'" ``` ```EVM "event.message ends_with 'failed'" ``` ```EVM "event.details contains 'critical alert'" ``` -------------------------------- ### Move Binary to Project Root Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/docs/index.mdx Moves the compiled OpenZeppelin Monitor binary from the target directory to the project's root directory. ```bash mv ./target/release/openzeppelin-monitor . ``` -------------------------------- ### Midnight Bulletin Board Post Function Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/docs/1.3.x/index.mdx Example of a bulletin board post function signature for Midnight. ```plaintext post() ``` -------------------------------- ### Clone Repository and Build Application Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/docs/1.3.x/index.mdx Clones the OpenZeppelin Monitor repository and builds the release version of the application using Cargo. ```bash git clone https://github.com/openzeppelin/openzeppelin-monitor cd openzeppelin-monitor cargo build --release ``` -------------------------------- ### Run Fuzz Tests for expression_parser Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/fuzz/README.md Execute fuzz tests for the 'expression_parser' target. Ensure you have the nightly toolchain installed. ```bash cargo +nightly fuzz run expression_parser ``` -------------------------------- ### Configure Plain Text Secret Source Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/docs/1.3.x/index.mdx Example JSON configuration for a plain text secret source. Secrets should be wrapped in `SecretString` for secure memory handling. ```json { "type": "Plain", "value": "my-secret-value" } ``` -------------------------------- ### Discord Notification Configuration Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/docs/1.3.x/index.mdx Example JSON configuration for sending notifications to Discord. Includes URL and message formatting. ```json { "discord_url": { "type": "plain", "value": "https://discord.com/api/webhooks/123-456-789" }, "message": { "title": "Alert Title", "body": "Alert message for ${transaction.hash}" } } ``` -------------------------------- ### Copy Midnight Testnet Network Configuration Source: https://github.com/openzeppelin/openzeppelin-monitor/blob/main/docs/1.3.x/quickstart.mdx Copies the example Midnight testnet configuration file to the active configuration directory. Ensure to update the RPC URL. ```bash cp examples/config/networks/examples/midnight_testnet.json config/networks/midnight_testnet.json ```