feat: Add Signet API endpoints for orders and fills#10
Merged
rymcol merged 4 commits intosignet-mainfrom Mar 13, 2026
Merged
Conversation
Implements REST API endpoints for querying Signet orders and fills: Block-based endpoints: - GET /api/v2/signet/blocks/:block_number/orders - GET /api/v2/signet/blocks/:block_number/fills - GET /api/v2/signet/blocks/:block_number/activity Transaction-based endpoints: - GET /api/v2/signet/transactions/:tx_hash/orders - GET /api/v2/signet/transactions/:tx_hash/fills - GET /api/v2/signet/transactions/:tx_hash/activity Features: - Pagination support for all list endpoints - JSON response format following Blockscout conventions - Order status calculation (pending/expired) - Combined activity view for orders and fills together New files: - apps/explorer/lib/explorer/chain/signet.ex - Query functions - apps/block_scout_web/lib/block_scout_web/controllers/api/v2/signet/signet_controller.ex - apps/block_scout_web/lib/block_scout_web/views/api/v2/signet_view.ex Modified files: - apps/block_scout_web/lib/block_scout_web/routers/api_router.ex - Added routes - apps/explorer/lib/explorer/chain.ex - Added pagination helpers Closes ENG-1896
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@init4samwise fix the failing checks here please |
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
rymcol
approved these changes
Mar 11, 2026
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Implements REST API endpoints for querying Signet orders and fills by block number or transaction hash.
Endpoints Added
Block-based endpoints
GET /api/v2/signet/blocks/:block_number/orders- Returns all orders initiated in a specific blockGET /api/v2/signet/blocks/:block_number/fills- Returns all fills executed in a specific blockGET /api/v2/signet/blocks/:block_number/activity- Combined view of orders and fillsTransaction-based endpoints
GET /api/v2/signet/transactions/:tx_hash/orders- Orders initiated by a specific transactionGET /api/v2/signet/transactions/:tx_hash/fills- Fills executed by a specific transactionGET /api/v2/signet/transactions/:tx_hash/activity- Combined view for a transactionFeatures
Response Formats
Orders endpoint
{ "items": [ { "order_hash": "0x...:3", "outputs_witness_hash": "0x...", "deadline": 1707000000, "transaction_hash": "0x...", "log_index": 3, "block_number": 12345, "inputs": [{ "token": "0x...", "amount": "1000000" }], "outputs": [{ "token": "0x...", "amount": "500000", "recipient": "0x...", "chain_id": 1 }], "status": "pending", "sweep": null } ], "next_page_params": null }Fills endpoint
{ "items": [ { "outputs_witness_hash": "0x...", "transaction_hash": "0x...", "log_index": 5, "block_number": 12345, "chain_type": "rollup", "outputs": [{ "token": "0x...", "amount": "500000", "recipient": "0x...", "chain_id": 1 }] } ], "next_page_params": null }Files Changed
New files
apps/explorer/lib/explorer/chain/signet.ex- Query functions for orders/fillsapps/block_scout_web/lib/block_scout_web/controllers/api/v2/signet/signet_controller.ex- API controllerapps/block_scout_web/lib/block_scout_web/views/api/v2/signet_view.ex- JSON viewModified files
apps/block_scout_web/lib/block_scout_web/routers/api_router.ex- Added Signet routesapps/explorer/lib/explorer/chain.ex- Added pagination helpers for SignetTesting
Manual testing recommended with existing Signet data. All endpoints follow established Blockscout patterns.
Closes ENG-1896