This repository was archived by the owner on Feb 22, 2026. It is now read-only.
GET/deployed-contracts-endpoint#542
Closed
palit-pratyush wants to merge 8 commits into
Closed
Conversation
- Add ContractDB SQLAlchemy model - Implement GET /deployed_contracts endpoint with filtering and sorting - Add POST /contracts endpoint for creating new contracts - Add database integration - Support pagination with limit and skip parameters
- Add input validation for contract addresses - Add rate limiting (60/min for GET, 10/min for POST) - Improve error handling for invalid sort fields - Add comprehensive API documentation - Add unit tests with 100% coverage - Add test configuration with in-memory SQLite
- Replace deprecated constr with Field validation - Update string constraints for user and contract models
- Add Request parameter to rate-limited endpoints - Fix rate limiter configuration for FastAPI
- Add proper rate limit exceeded error handler - Add missing imports for FastAPI responses
- Generate unique addresses for each POST request in rate limit test - Add early break when rate limit is hit - Fix test assertions
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Collaborator
|
@palit-pratyush run to fix lint issues |
- Fix Python linting issues - Apply black formatting - Sort imports with isort - Fix coding style issues - Fix Cairo contract implementation - Update to Cairo 2.8.0 syntax - Implement proper interfaces - Add complete test suite - Fix visibility modifiers - Add proper trait implementations
Contributor
|
@palit-pratyush kindly resolve the conflicts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🚀 Pull Request Description
Description
Implement GET /deployed_contracts Endpoint
Overview
This PR implements the
/deployed_contractsendpoint to fetch deployed contracts with metadata, along with a supporting POST endpoint for contract creation. The implementation includes robust filtering, sorting, pagination, and rate limiting capabilities.Key Features
GET /deployed_contracts
deployment_date:desc)limitandskipparametersPOST /contracts
Technical Implementation
Database
ContractDBSQLAlchemy model with:id: Auto-incrementing primary keyname: String, indexedaddress: String, unique, indexeddeployment_date: DateTimeAPI Models
Contract: Response modelContractCreate: Request validation modelDeployedContractsResponse: Paginated response modelValidation
Example Usage
🔗 Linked Issues
✅ What’s New
📚 Documentation
📦 Dependencies Added
slowapi– for rate limitinghttpx– for HTTP-based testingpytest-asyncio– for async test support🛠 Migration
⚡ Performance Considerations
🔐 Security
🔗 Related Issues
✅ Checklist