Skip to content
Open
Show file tree
Hide file tree
Changes from 35 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
a1440b8
feat: Initial refactoring
zeljkoX Oct 8, 2025
5d80e85
chore: Improvements
zeljkoX Oct 8, 2025
7502f44
chore: Improvements
zeljkoX Oct 8, 2025
44c1cf3
chore: Improvements
zeljkoX Oct 8, 2025
167a559
chore: Improvements
zeljkoX Oct 8, 2025
6bedf20
chore: Improvements
zeljkoX Oct 8, 2025
0b58e59
chore: Stellar improvements
zeljkoX Oct 8, 2025
0f01f6b
chore: Improvements
zeljkoX Oct 8, 2025
f152628
chore: Improvements
zeljkoX Oct 8, 2025
e8ab6c5
chore: Improvements
zeljkoX Oct 9, 2025
30e70f0
chore: Imprvements
zeljkoX Oct 13, 2025
449251c
chore: Improvements
zeljkoX Oct 13, 2025
7a8cbfb
Merge branch 'main' into scalability-improvements
zeljkoX Oct 13, 2025
22aa0d2
chore: Improvements
zeljkoX Oct 13, 2025
017565e
chore: Improvements
zeljkoX Oct 13, 2025
d159f95
chore: Improvements
zeljkoX Oct 14, 2025
beccb6e
chore: Improvements
zeljkoX Oct 14, 2025
53fcbfd
chore: Improvements
zeljkoX Oct 14, 2025
45f0279
chore: PR fixes
zeljkoX Oct 14, 2025
23920fa
chore: Bump coverage
zeljkoX Oct 14, 2025
08278f1
chore: Initial suppor for Solana send tx endpoint
zeljkoX Oct 16, 2025
00e6466
chore: Solana status improvements
zeljkoX Oct 17, 2025
c07f9d8
chore: Improvements
zeljkoX Oct 17, 2025
7f40f8b
chore: Improvements
zeljkoX Oct 19, 2025
ca4f60e
chore: Enhance Solana fee payment strategy validation
zeljkoX Oct 20, 2025
b413889
chore: Update dependencies for Solana integration
zeljkoX Oct 20, 2025
8742125
chore: Solana status improvements
zeljkoX Oct 20, 2025
f971e63
chore: Solana tx validation improvements
zeljkoX Oct 20, 2025
e5f9044
chore: Refactor Solana policy schema logic
zeljkoX Oct 20, 2025
b994a8f
chore: Solana improvements
zeljkoX Oct 20, 2025
dbc923f
chore: Refactor Solana transaction signing
zeljkoX Oct 21, 2025
363d5b8
chore: Improvements
zeljkoX Oct 21, 2025
e537299
chore: Improvements
zeljkoX Oct 21, 2025
05116cb
chore: Improvements
zeljkoX Oct 21, 2025
de6d3e9
chore: Improvements
zeljkoX Oct 21, 2025
3a869e4
chore: Improvements
zeljkoX Oct 21, 2025
99a9269
chore: Improvements
zeljkoX Oct 22, 2025
b44a096
chore: Add unit tests
zeljkoX Oct 23, 2025
7e6c0d7
chore: Unit tests
zeljkoX Oct 24, 2025
e114bb6
chore: Improvements
zeljkoX Oct 24, 2025
897717b
Merge branch 'main' into solana-send-transaction
zeljkoX Oct 28, 2025
a3f6ed9
chore: fix tests
zeljkoX Oct 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .cursor/rules/rust_standards.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
description: General Rust coding standards for the Relayer project
globs:
- "**/*.rs"
alwaysApply: true
---

# Code Style and Formatting
- Follow official Rust style guidelines using rustfmt (edition = 2021, max_width = 100).
- Follow Rust naming conventions: snake_case for functions/variables, PascalCase for types, SCREAMING_SNAKE_CASE for constants and statics.
- Order imports alphabetically and group by: std, external crates, local crates.
- Include relevant doc comments (///) on public functions, structs, and modules. Use comments for "why", not "what". Avoid redundant doc comments.
- Document lifetime parameters when they're not obvious.

# Safety and Error Handling
- Avoid unsafe code unless absolutely necessary; justify its use in comments.
- Write idiomatic Rust: Prefer Result over panic, use ? operator for error propagation.
- Avoid unwrap; handle errors explicitly with Result and custom Error types for all async operations.
- Prefer header imports over function-level imports of dependencies.

# Performance and Memory
- Prefer borrowing over cloning when possible.
- Use &str instead of &String for function parameters.
- Use &[T] instead of &Vec<T> for function parameters.
- Avoid unnecessary .clone() calls.
- Use Vec::with_capacity() when size is known in advance.
- Use explicit lifetimes only when necessary; infer where possible.

# Async and Concurrency
- Always use Tokio runtime for async code. Await futures eagerly; avoid blocking calls in async contexts.
- Streams: Use futures::StreamExt for processing streams efficiently.

# Serialization and Data
- Always use serde for JSON serialization/deserialization with #[derive(Serialize, Deserialize)].
- Use type aliases for complex types to improve readability.
- Implement common traits (Debug, Clone, PartialEq) where appropriate, using derive macros when possible.
- Implement Display for user-facing types.

# Testing
- Prefer defining traits when implementing services to make mocking and testing easier.
- For tests, prefer existing utils for creating mocks instead of duplicating code.
- Use assert_eq! and assert! macros appropriately.
- Keep tests minimal, deterministic, and fast.

# Logging and Observability
- Use tracing for structured logging, e.g., tracing::info! for request and error logs.

# Code Organization and Clarity
- When optimizing, prefer clarity first, then performance.
- Modularize code to keep functions concise and focused.
- Use derive macros to reduce boilerplate where possible.
3 changes: 3 additions & 0 deletions .cursorignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
target/
Cargo.lock
.git/
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ CONFIG_DIR=./config
CONFIG_FILE_NAME=config.json
WEBHOOK_SIGNING_KEY=<webhook_signing_key>
API_KEY=<api_key>
RATE_LIMIT_RPS=100
RATE_LIMIT_REQUESTS_PER_SECOND=100
RATE_LIMIT_BURST_SIZE=300
METRICS_ENABLED=false
REDIS_URL=redis://localhost:6379
Expand Down
Loading