RPC Websocket Event Service is a Node.js-based application that listens for and processes blockchain events emitted by smart contracts via RPC (Remote Procedure Calls) on EVM (Ethereum Virtual Machine) compatible blockchains. The service captures these events, processes them in real-time, and stores them in both a Redis cache and MongoDB database for easy access and long-term storage.
- Blockchain Event Capture: Listens for events from Ethereum, Binance Smart Chain, or any other EVM-compatible blockchain.
- Event Processing: Processes events in real-time with minimal latency to react to blockchain activity.
- Caching with Redis: Stores the latest blockchain events in Redis for quick access and fast retrieval.
- Event Persistence: Captures all blockchain events and stores them in MongoDB for long-term data retention.
- API Interface: Provides HTTP endpoints to interact with the service and fetch event data.
requests.
- Ethers.js: Libraries for interacting with EVM-compatible blockchains.
- Hardhat: Development environment for Ethereum software, used for testing and deploying smart contracts.
git clone https://github.com/ChokeGuy/rpc-websocket-event.git
cd rpc-websocket-event
npm install
PRIVATE_KEY=
BS_API_KEY=
SEPOLIA_API_KEY=
OWNER=
SEPOLIA_PROVIDER_URL=
SEPOLIA_CONTRACT_ADDRESS=
BS_CONTRACT_ADDRESS=
BS_PROVIDER_URLS=
DEFAULT_BLOCK_SCAN=
- Start the server
npx hardhat run scripts/deploy-send.ts