Example application using the Monad Execution Events SDK
Warning
This repository contains example code to demonstrate Monad features and concepts. The examples illustrate how to use the features, in their simplest form.
These implementations are educational examples, and have not been tested or audited. They are likely to have significant errors and security vulnerabilities. They should not be relied on for any purpose. Do not use the code in this example in a production environment without completing your own audits and application of best practices.
Navigate to the backend directory and run the server on the full node:
cd backend
cargo run --bin backend -- --server-addr 0.0.0.0:<SERVER_PORT>Replace <SERVER_PORT> with your desired port number (e.g., 8080).
NOTE: By default, the backend runs in restricted mode, which requires clients to subscribe to the events specified in
backend/restricted_filters.json. To disable this behavior, set theALLOW_UNRESTRICTED_FILTERSenvironment variable to a non-empty value before spawning the backend process.
Edit the .env file in the frontend directory to set the WebSocket URL:
NEXT_PUBLIC_EVENTS_WS_URL="ws://<SERVER_ADDR>:<SERVER_PORT>"
Replace <SERVER_ADDR> with your server address and <SERVER_PORT> with the port you used in step 1.
Navigate to the frontend directory and start the development server:
cd frontend
pnpm dev