Monaco Protocol SDK v0.4.1
Indexer Improvements & Bug Fixes
This patch release focuses on backend infrastructure improvements, primarily migrating the indexer from the deprecated ethers.rs library to alloy, along with critical bug fixes for withdrawal event handling.What’s New
SDK Improvements- TypeScript 5.9+: Full type safety and IntelliSense support with latest TypeScript
- viem 2.31+: Updated to latest viem for improved blockchain interactions
- Better Type Inference: Improved TypeScript configuration for optimal developer experience
- Alloy Migration: Replaced deprecated ethers.rs with modern alloy library for blockchain interactions
- WebSocket Event Listening: Native WebSocket support for vault event monitoring (no longer requires special RPC provider filters)
- Broader RPC Compatibility: Works with any standard EVM provider, including free tiers like Rhino
- Repository Pattern: Cleaner data access layer with dedicated repositories for applications, blockchain events, and processed blocks
- Enhanced Gap Detection: Improved logic for detecting and backfilling missed blockchain events
- Withdrawal Events: Fixed withdrawal event signature causing withdrawal events not to be indexed correctly
- Whitelist App: Resolved critical bug in the whitelist application
- Configuration: Improved environment variable naming consistency across indexer services
Technical Details
SDK Dependencies This release updates core SDK dependencies for better performance and type safety:- TypeScript 5.9+: Full type safety and IntelliSense support
- viem 2.31+: Modern Ethereum library for blockchain interactions
TypeScript Configuration
For optimal type inference and IntelliSense support, use the following TypeScript configuration:- Detects gaps in processed blocks
- Automatically backfills missing events
- Better logging for monitoring indexer health
- Improved error handling and retry logic
Migration Guide
For Indexer Operators If you’re running your own indexer, update your environment configuration:- Review the updated
.env.examplefile in theindexer/directory - Update environment variable names to match new conventions
- Restart the indexer service
- Monitor logs for successful WebSocket connection
tsconfig.json for better type inference:
- Better type safety with TypeScript 5.9+
- Enhanced blockchain interactions with viem 2.31+
- Improved IntelliSense and autocomplete
- No breaking changes to existing code
Packages Updated
This release primarily affects backend services:- Indexer Service: v0.4.1 with alloy migration
- Data Layer: Enhanced with new repositories
- Infrastructure: Updated Docker and configuration files
@0xmonaco/[email protected]@0xmonaco/[email protected]@0xmonaco/[email protected]@0xmonaco/[email protected]
Installation
Benefits
For SDK Users- Enhanced type safety with TypeScript 5.9+ (better IntelliSense and autocomplete)
- Improved blockchain interactions with viem 2.31+
- Better developer experience with optimized TypeScript configuration
- More reliable event indexing
- Broader RPC provider compatibility
- Better error messages and logging
- Cleaner codebase following repository pattern
- Reduced RPC provider requirements (no special filters needed)
- More cost-effective infrastructure (free tier providers work)
- Improved monitoring with better gap detection
- Enhanced reliability with automatic backfilling
Related Changes
This release includes infrastructure improvements merged from multiple PRs:- Indexer refactored to use alloy with repository pattern
- Enhanced vault event handling with WebSocket support
- Docker and environment configuration updates
- Comprehensive test coverage additions
Testing & Coverage
Enhanced test suite with new integration and unit tests:- Vault listener integration tests
- Repository unit tests
- Event handling edge cases
- Gap detection and backfilling tests
Commit References
3a0d893d- Refactor indexer to use alloyd352c7d5- Fix Withdrawal Event Signature7ac2afd4- Fixed critical bug in whitelist app764d87ed- Move alloy to workspace, cleanup dependencies
Note: This is a patch release focused on backend infrastructure. No breaking changes for SDK users. Indexer operators should review and update their environment configuration.

