mirror of
https://github.com/chainstacklabs/pumpfun-bonkfun-bot.git
synced 2026-08-13 15:28:05 +00:00
wip(cursor): craft cursor rules
This commit is contained in:
+42
-6
@@ -1,8 +1,44 @@
|
||||
---
|
||||
description: Shared utilities and helper functions for common operations. Apply when working with project-wide utilities.
|
||||
globs: src/utils/*.py
|
||||
alwaysApply: true
|
||||
---
|
||||
|
||||
# Utility Functions Guide
|
||||
|
||||
- [logger.py](mdc:src/utils/logger.py) provides logging utilities for the project.
|
||||
- Utility modules in this directory are intended for shared, reusable helper functions and classes.
|
||||
description:
|
||||
globs:
|
||||
alwaysApply: false
|
||||
---
|
||||
## Overview
|
||||
|
||||
The utils module provides shared functionality and helper methods used throughout the pump-bot system. These utilities handle common concerns like logging.
|
||||
|
||||
## Core Utilities
|
||||
|
||||
### Logging
|
||||
|
||||
@src/utils/logger.py implements a centralized logging system:
|
||||
- Consistent log formatting across the application
|
||||
- Log level management
|
||||
- File and console output handling
|
||||
- Context-aware logging with component identification
|
||||
|
||||
```python
|
||||
# Example usage
|
||||
logger = get_logger(__name__)
|
||||
logger.info("Processing token %s", token_mint)
|
||||
```
|
||||
|
||||
## Common Patterns
|
||||
|
||||
| Operation | Utility |
|
||||
|-----------|---------|
|
||||
| Logging | `get_logger(__name__)` |
|
||||
|
||||
## Best Practices
|
||||
|
||||
1. **Reuse existing utilities** rather than implementing similar functionality
|
||||
2. **Keep utilities focused** on a single responsibility
|
||||
3. **Document usage examples** for each utility
|
||||
4. **Maintain backward compatibility** when enhancing utilities
|
||||
|
||||
## Related Files
|
||||
|
||||
- @src/utils/logger.py: Centralized logging system
|
||||
|
||||
Reference in New Issue
Block a user