-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactoring rfq-indexer API and adding swagger docs [SLT-228] #3167
Conversation
WalkthroughThe pull request introduces new controller functions within the Changes
Suggested labels
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
Tip Early access features: enabledWe are currently testing new code review model(s) that may lead to higher noise levels in the review comments. Please disable the early access features if the noise level causes any inconvenience. Note:
|
Deploying sanguine-fe with
|
Latest commit: |
c96da1c
|
Status: | ✅ Deploy successful! |
Preview URL: | https://cbda066a.sanguine-fe.pages.dev |
Branch Preview URL: | https://docs-rfq-indexer.sanguine-fe.pages.dev |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3167 +/- ##
=============================================
Coverage 37.95009% 37.95009%
=============================================
Files 418 418
Lines 24245 24245
Branches 82 82
=============================================
Hits 9201 9201
Misses 14306 14306
Partials 738 738
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 24
Outside diff range and nitpick comments (9)
packages/rfq-indexer/api/src/queries/refundsQueries.ts (2)
3-15
: Consider adding pagination or limiting the number of rows returned.The function is querying the
BridgeDepositRefundedEvents
table and selecting a large number of columns. If the table has a high number of rows, this could impact performance.Consider adding pagination or limiting the number of rows returned to improve performance and scalability.
3-3
: Rename the function for better readability.The function name
qRefunds
follows a naming convention, likely indicating that it is a query function. However, the name is not very descriptive.Consider renaming the function to
getAllRefunds
orlistRefunds
for better readability.packages/rfq-indexer/api/src/queries/claimsQueries.ts (1)
4-17
: LGTM! Consider removing the_claim
suffix from the aliases.The
qClaims
function is a simple and straightforward query builder that selects specific fields from theBridgeDepositClaimedEvents
table. The code is clean and easy to understand.However, consider removing the
_claim
suffix from the aliases if there are no naming conflicts with fields from other tables. This can make the code more concise and easier to read.packages/rfq-indexer/api/src/swagger.ts (1)
3-13
: Consider using environment variables for server URLs.The code correctly sets up server configurations for development and production environments. However, consider using environment variables for the server URLs instead of hardcoding them. This will make it easier to update the URLs if needed without modifying the code.
- url: 'http://localhost:3001/api', + url: process.env.DEV_SERVER_URL || 'http://localhost:3001/api', - url: 'https://triumphant-magic-production.up.railway.app/api', + url: process.env.PROD_SERVER_URL || 'https://triumphant-magic-production.up.railway.app/api',packages/rfq-indexer/api/package.json (2)
19-19
: Reminder: Add tests in a future PR.The change in the
test
script to an empty string aligns with the PR objective of omitting tests. Please ensure to add tests in a future PR as mentioned in the PR summary.Do you want me to open a GitHub issue to track the task of adding tests?
20-20
: Reminder: Add test coverage in a future PR.The change in the
test:coverage
script to echo "no tests defined" aligns with the PR objective of omitting tests. Please ensure to add test coverage in a future PR as mentioned in the PR summary.Do you want me to open a GitHub issue to track the task of adding test coverage?
packages/rfq-indexer/api/src/controllers/refundedAndRelayedController.ts (1)
32-38
: Consider returning an empty array when no transactions are foundReturning an empty array
[]
instead of a message provides a more consistent API response and simplifies client-side handling.Apply this diff to adjust the response:
if (nestedResults && nestedResults.length > 0) { res.json(nestedResults) } else { - res - .status(200) - .json({ message: 'No refunded and relayed transactions found' }) + res.json([]) }packages/rfq-indexer/api/src/controllers/conflictingProofsController.ts (1)
8-50
: Consider adding unit tests for 'conflictingProofsController'Adding unit tests for this controller will help ensure its correctness and prevent regressions in the future.
Do you want me to assist in generating unit tests for this controller, or open a GitHub issue to track this task?
packages/rfq-indexer/api/src/controllers/transactionIdController.ts (1)
55-55
: Consider using a logging library instead ofconsole.error
.Using
console.error(error)
is suitable for development but may not be ideal for production environments. Consider using a logging library to handle error logging more effectively and provide better log management.
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files ignored due to path filters (1)
yarn.lock
is excluded by!**/yarn.lock
,!**/*.lock
Files selected for processing (25)
- packages/rfq-indexer/api/package.json (3 hunks)
- packages/rfq-indexer/api/src/.babelrc (1 hunks)
- packages/rfq-indexer/api/src/app.ts (1 hunks)
- packages/rfq-indexer/api/src/controllers/conflictingProofsController.ts (1 hunks)
- packages/rfq-indexer/api/src/controllers/invalidRelaysController.ts (1 hunks)
- packages/rfq-indexer/api/src/controllers/pendingTransactionsController.ts (1 hunks)
- packages/rfq-indexer/api/src/controllers/refundedAndRelayedController.ts (1 hunks)
- packages/rfq-indexer/api/src/controllers/transactionIdController.ts (1 hunks)
- packages/rfq-indexer/api/src/index.ts (0 hunks)
- packages/rfq-indexer/api/src/jest.config.js (1 hunks)
- packages/rfq-indexer/api/src/middleware/showFirstValidationError.ts (1 hunks)
- packages/rfq-indexer/api/src/queries/claimsQueries.ts (1 hunks)
- packages/rfq-indexer/api/src/queries/depositsQueries.ts (1 hunks)
- packages/rfq-indexer/api/src/queries/index.ts (1 hunks)
- packages/rfq-indexer/api/src/queries/proofsQueries.ts (1 hunks)
- packages/rfq-indexer/api/src/queries/refundsQueries.ts (1 hunks)
- packages/rfq-indexer/api/src/queries/relaysQueries.ts (1 hunks)
- packages/rfq-indexer/api/src/routes/conflictingProofsRoute.ts (1 hunks)
- packages/rfq-indexer/api/src/routes/index.ts (1 hunks)
- packages/rfq-indexer/api/src/routes/invalidRelaysRoute.ts (1 hunks)
- packages/rfq-indexer/api/src/routes/pendingTransactionsRoute.ts (1 hunks)
- packages/rfq-indexer/api/src/routes/refundedAndRelayedRoute.ts (1 hunks)
- packages/rfq-indexer/api/src/routes/transactionIdRoute.ts (1 hunks)
- packages/rfq-indexer/api/src/swagger.ts (1 hunks)
- packages/rfq-indexer/api/src/utils/nestResulsts.ts (1 hunks)
Files not reviewed due to no reviewable changes (1)
- packages/rfq-indexer/api/src/index.ts
Additional comments not posted (35)
packages/rfq-indexer/api/src/.babelrc (1)
1-3
: LGTM!The Babel configuration looks good. It includes the necessary presets for transpiling modern JavaScript and TypeScript code.
Using
@babel/preset-env
will ensure that the code is transpiled to a compatible version based on the target environment, while@babel/preset-typescript
will enable TypeScript support.This configuration will improve developer productivity and code maintainability by allowing the use of modern JavaScript features and TypeScript.
packages/rfq-indexer/api/src/queries/index.ts (1)
1-5
: LGTM!The file provides a clean and organized way to export various query functions. The naming convention for the exports is consistent, making it easy to understand the purpose of each export. This central export file will make it convenient to import the query functions in other parts of the codebase.
packages/rfq-indexer/api/src/jest.config.js (1)
1-10
: LGTM!The Jest configuration is set up correctly for a TypeScript project. It includes the necessary settings for the testing environment, root directory, file extensions, and module directories. The
ts-jest
preset andbabel-jest
transformer ensure that TypeScript files are properly handled during testing.packages/rfq-indexer/api/src/queries/proofsQueries.ts (1)
4-15
: LGTM!The
qProofs
function provides a clean and reusable way to query proof-related fields from theBridgeProofProvidedEvents
table. The use of field aliasing with the_proof
suffix is a good practice to avoid naming conflicts when joining with other tables.The function returns the query builder object, which allows for flexible composition of queries by chaining additional query methods as needed.
packages/rfq-indexer/api/src/queries/relaysQueries.ts (1)
4-16
: LGTM!The
qRelays
function correctly builds a SQL query using thekysely
library to select specific fields from theBridgeRelayedEvents
table. The selected fields are appropriately aliased with a_relay
suffix to distinguish them from similar fields in other tables.The function is well-structured and follows good practices for building SQL queries using the
kysely
library.packages/rfq-indexer/api/src/middleware/showFirstValidationError.ts (1)
4-24
: LGTM!The
showFirstValidationError
middleware function is well-structured and follows best practices for error handling in Express middleware. It provides a consistent way to handle validation errors across the API and improves the developer experience by providing clear and detailed error responses.The function correctly extracts validation errors using
validationResult
from theexpress-validator
library. It checks if there are any errors and sends a 400 response with the first error details if there are any. If there are no errors, it calls thenext
function to pass control to the next middleware.The error response includes the error value, message, field (if applicable), and location, providing comprehensive information about the validation error.
Overall, this middleware function helps maintain a clean and readable codebase by separating the error handling logic from the route handlers.
packages/rfq-indexer/api/src/routes/index.ts (1)
1-17
: LGTM!The
index.ts
file provides a well-structured and modular approach to organizing the API routes. It follows best practices by:
- Importing individual route modules for each specific functionality (pending transactions, refunded and relayed transactions, invalid relays, conflicting proofs, and transaction ID).
- Mounting each route module on the main router using descriptive base paths.
- Exporting the configured router as the default export.
This structure enhances the maintainability and readability of the API, making it easier to understand and navigate the different routes.
packages/rfq-indexer/api/src/swagger.ts (3)
1-2
: LGTM!The import statement for the
swaggerJsdoc
module is correct. This module is commonly used to generate Swagger documentation from JSDoc comments in the code.
15-26
: LGTM!The options object for the
swaggerJsdoc
module is correctly defined. It includes the necessary information such as the OpenAPI version, API title, version, description, and the location of the API documentation files. The servers are also conditionally set based on the environment.
28-28
: LGTM!The code correctly generates the Swagger specification using the
swaggerJsdoc
module with the defined options and exports it asspecs
. This allows other parts of the application to access and use the generated Swagger documentation.packages/rfq-indexer/api/src/app.ts (1)
1-32
: Great job with the server setup!The code follows a modular structure and uses well-established libraries and patterns. The separation of concerns into different files and modules enhances maintainability and readability. The custom utility function for handling BigInt serialization is a nice touch. The logging statements provide useful information about the server's endpoints and ports.
Overall, the server setup looks solid and well-organized.
packages/rfq-indexer/api/package.json (13)
9-9
: LGTM!The change in the
dev:local
script to referencesrc/app.ts
is consistent with the refactoring objective.
10-10
: LGTM!The change in the
dev:prod
script to referencesrc/app.ts
is consistent with the refactoring objective.
11-11
: LGTM!The change in the
start
script to referencesrc/app.ts
is consistent with the refactoring objective.
12-12
: LGTM!The change in the
start:local
script to referencesrc/app.ts
is consistent with the refactoring objective.
13-13
: LGTM!The change in the
dev
script to referencesrc/app.ts
is consistent with the refactoring objective.
33-33
: LGTM!The addition of the
express-validator
dependency aligns with the refactoring objective to enhance consistency and maintainability of the API.
38-38
: Clarify the purpose of adding thesupertest
dependency.The addition of the
supertest
dependency seems to contradict the PR objective of omitting tests from the current PR. Could you please clarify the purpose of adding this dependency in this PR?
48-48
: LGTM!The addition of the
@babel/core
dev dependency aligns with the refactoring objective to enhance consistency and maintainability of the API.
49-49
: LGTM!The addition of the
@babel/preset-env
dev dependency aligns with the refactoring objective to enhance consistency and maintainability of the API.
50-50
: LGTM!The addition of the
@babel/preset-typescript
dev dependency aligns with the refactoring objective to enhance consistency and maintainability of the API.
52-52
: Clarify the purpose of adding the@types/supertest
dev dependency.The addition of the
@types/supertest
dev dependency seems to contradict the PR objective of omitting tests from the current PR. Could you please clarify the purpose of adding this dev dependency in this PR?
53-54
: LGTM!The addition of the
@types/swagger-jsdoc
and@types/swagger-ui-express
dev dependencies aligns with the PR objective of introducing Swagger documentation for the API.
57-58
: LGTM!The addition of the
swagger-jsdoc
andswagger-ui-express
dev dependencies aligns with the PR objective of introducing Swagger documentation for the API.Handling of 'transactionId' fields is intentional but could benefit from clarification
The current implementation in 'nestResulsts.ts' does indeed process only the first 'transactionId' field and ignores others, as noted in the original review comment. This approach appears to be intentional, likely to avoid duplicating or overwriting the transaction ID in the resulting structure.
Key points:
- A 'transactionIdSet' flag ensures only the first 'transactionId' field is processed.
- Subsequent 'transactionId' fields are explicitly ignored with a comment.
While this implementation may be correct for the current use case, it could benefit from:
- A comment explaining why only the first 'transactionId' is used.
- Clarification on whether ignoring subsequent 'transactionId' fields could lead to data loss in any scenarios.
- Consider logging a warning if multiple 'transactionId' fields are encountered, to alert developers of potential issues.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Search for all 'transactionId' fields in the codebase. rg --type typescript 'transactionId\w*'Length of output: 76
Script:
#!/bin/bash # Description: Search for all 'transactionId' fields in the relevant directory rg -t txt 'transactionId\w*' packages/rfq-indexer/api/srcLength of output: 59
Script:
#!/bin/bash # Description: List directory structure and search for 'transactionId' fields echo "Directory structure:" find . -type d echo -e "\nSearching for 'transactionId' fields:" rg -t txt 'transactionId'Length of output: 30719
Script:
#!/bin/bash # Description: Search for files with names similar to 'nestResulsts.ts' and TypeScript files containing 'transactionId' echo "Searching for files similar to 'nestResulsts.ts':" find . -name "*nest*ts" echo -e "\nSearching for TypeScript files containing 'transactionId':" find . -name "*.ts" -exec grep -l "transactionId" {} +Length of output: 1656
Script:
#!/bin/bash # Description: Display the content of nestResulsts.ts echo "Content of ./packages/rfq-indexer/api/src/utils/nestResulsts.ts:" cat ./packages/rfq-indexer/api/src/utils/nestResulsts.tsLength of output: 2304
packages/rfq-indexer/api/src/controllers/pendingTransactionsController.ts
Show resolved
Hide resolved
packages/rfq-indexer/api/src/controllers/pendingTransactionsController.ts
Outdated
Show resolved
Hide resolved
packages/rfq-indexer/api/src/controllers/pendingTransactionsController.ts
Outdated
Show resolved
Hide resolved
packages/rfq-indexer/api/src/controllers/pendingTransactionsController.ts
Show resolved
Hide resolved
packages/rfq-indexer/api/src/controllers/pendingTransactionsController.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
Outside diff range and nitpick comments (1)
packages/rfq-indexer/api/src/utils/nestResults.ts (1)
1-58
: Add function documentation for better clarity.While the function implementation is generally good, it lacks documentation. Consider adding a JSDoc comment to explain the function's purpose, expected input structure, and return value. This will make it easier for other developers to understand and use the function correctly.
Example:
/** * Transforms flat SQL results into a nested structure for transaction data. * @param {any[]} sqlResults - An array of flat objects representing SQL query results. * @returns {any[]} An array of nested objects, each representing a structured transaction. * * @example * const sqlResults = [{ transactionId: '123', amount_deposit: 100, status_relay: 'completed' }]; * const nestedResults = nest_results(sqlResults); * // nestedResults will be: * // [{ * // Bridge: { transactionId: '123' }, * // BridgeRequest: { amount: 100 }, * // BridgeRelay: { status: 'completed' } * // }] */ export const nest_results = (sqlResults: any[]): any[] => { // Function implementation }
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (5)
- packages/rfq-indexer/api/src/controllers/conflictingProofsController.ts (1 hunks)
- packages/rfq-indexer/api/src/controllers/pendingTransactionsController.ts (1 hunks)
- packages/rfq-indexer/api/src/controllers/refundedAndRelayedController.ts (1 hunks)
- packages/rfq-indexer/api/src/controllers/transactionIdController.ts (1 hunks)
- packages/rfq-indexer/api/src/utils/nestResults.ts (1 hunks)
Files skipped from review as they are similar to previous changes (4)
- packages/rfq-indexer/api/src/controllers/conflictingProofsController.ts
- packages/rfq-indexer/api/src/controllers/pendingTransactionsController.ts
- packages/rfq-indexer/api/src/controllers/refundedAndRelayedController.ts
- packages/rfq-indexer/api/src/controllers/transactionIdController.ts
Additional comments not posted (2)
packages/rfq-indexer/api/src/utils/nestResults.ts (2)
37-55
: LGTM: Result object construction is clear and efficient.The construction of the result object is well-implemented. It correctly includes the main transaction fields and only adds nested objects for categories that have properties. This approach ensures that the resulting structure is clean and doesn't include empty objects.
56-58
: LGTM: Return statement is correct.The function correctly returns the processed result for each transaction in the input array.
* update bl * remove global solidity extension settings * use monorepo support in global workspace only * - use Solidity extension for formatting *.sol files - use `forge fmt` as formatter in Solidity extension * REST API Improvements [SLT-179] (#3133) * fix swaptxinfo function * Updates test coverage command * migrating to using token addresses instead of symbols * fix linting errors * fixing swaptxinfocontroller * new tests and new functionality --------- Co-authored-by: abtestingalpha <[email protected]> * Publish - @synapsecns/[email protected] - @synapsecns/[email protected] * fix harmony proxy (#3149) Co-authored-by: Trajan0x <[email protected]> * merging rfq indexer into monorepo [SLT-164] [SLT-176] (#3136) * merging rfq indexer into monorepo * nuke .env * fix commands * fix package name * test coverage script * rough pass at docs and some linting and fixes yarn * Upgrades wagmi & rainbowkit * indxer * Adds invisible but used packages * +recent-invalid-fills [SLT-188] * Moves wagmi to root * new endpoints and clean up linting --------- Co-authored-by: Trajan0x <[email protected]> Co-authored-by: abtestingalpha <[email protected]> Co-authored-by: parodime <[email protected]> * Publish - @synapsecns/[email protected] - @synapsecns/[email protected] - @synapsecns/[email protected] * Adds /destinationTokens route [SLT-204] (#3151) * Adds /destinationTokens route * ZeroAddress & NativeGasAddress * Adds test for native gas tokens * Checksums incoming token address params * Publish - @synapsecns/[email protected] * boba pause (#3150) * boba pause * only boba to txns * Publish - @synapsecns/[email protected] * fix(synapse-interface): Reorders validation to check existence first (#3156) * Reorders validation to check existence first * Removes duplicates * Publish - @synapsecns/[email protected] * Fix boba pause (#3158) * Publish - @synapsecns/[email protected] * update bl * feat(rest-api): Adds Swagger for api docs [SLT-205] (#3159) * Adds Swagger for api docs * Replace prepended verb Get routes with nouns * Adds dev flag for swagger serverUrl * Publish - @synapsecns/[email protected] - @synapsecns/[email protected] - @synapsecns/[email protected] - @synapsecns/[email protected] * Pulls version from package json (#3160) * Publish - @synapsecns/[email protected] * Require vs import due to file location (#3161) * Require vs import due to file location * Publish - @synapsecns/[email protected] * Prevent caching of api docs (#3162) * Publish - @synapsecns/[email protected] * feat(contracts-rfq): relay/prove/claim with different address [SLT-130] (#3138) * init. solidity ^. FbV2 relay/prove/claim overloads * +IFastBridgeV2, explicit address0 cast, func scope & inheritdoc fixes * pragma lock, contract relabel * feat: start scoping V2 tests * test: override relayer role scenarios, no longer enforced by V2 * test: finish the parity test * test: the management methods * test: dst chain scenarios * test: bridge * test: prove * test: claim * test: dispute * test: refund * test: bridge reverts * remove redundant extend. rearrange inherit list * revert 0.8.20 in favor of user (non-ws) setting --------- Co-authored-by: ChiTimesChi <[email protected]> * Publish - [email protected] * fix(promexporter): make spans better (#3164) * move the errors * [goreleaser] * fix v to w * changing native token address standard [SLT-210] (#3157) * changing native token address standard * fixing tests * normalizeNativeTokenAddress middleware, additional tests --------- Co-authored-by: abtestingalpha <[email protected]> * Publish - @synapsecns/[email protected] * Refactoring rfq-indexer API and adding swagger docs [SLT-228] (#3167) * refactoring and adding swagger * remove testing scripts * fix typos and consistency with 404 errors * Publish - @synapsecns/[email protected] * fix read mes (#3168) * Publish - @synapsecns/[email protected] - [email protected] - @synapsecns/[email protected] * fix(opbot): use submitter get tx status [SLT-158] (#3134) * use experimental logger to debug * fix lint * [goreleaser] * use submitter instead of client * [goreleaser] * [goreleaser] * fix(synapse-interface): Additional checks on screen [SLT-166] (#3152) * Additional checks on screen * Adds checks on chain/token changes * Publish - @synapsecns/[email protected] * feat(synapse-interface): confirm new price [SLT-150] (#3084) * add bridge quote history middleware * request user confirm changes when quoted price updates * add conditions for displaying confirm change state * track initial quote initializing confirm change state * specify output delta threshold * callback functions to handle initialize/accept/reset confirm changes flow * quote countdown timer animation to signal refresh * implement automatic refresh intervals * mouse move to refresh automatic intervals * add i8n translations for button text --------- Co-authored-by: abtestingalpha <[email protected]> * Publish - @synapsecns/[email protected] * fix: formatted bridge fee amount (#3165) * Publish - @synapsecns/[email protected] * fix(contracts-rfq): CI workflows [SLT-245] (#3178) * fix: license, files * fix: package name * build: update solhint to latest * build: remove prettier dependencies * fix: solhint workflows * build: update solhint in other packages as well * chore: solhint rules, exceptions * fix: silence linter warnings in tests * chore: forge fmt * add variable to test linter CI * Revert "add variable to test linter CI" This reverts commit 0629309. * Publish - @synapsecns/[email protected] - @synapsecns/[email protected] - @synapsecns/[email protected] * feat(api): bridge limits [SLT-165] (#3179) * adds `/bridgeLimits` route, controller * fetch best sdk quote for min/max origin amounts * add tests * implement middleware to normalize addresses * adds swagger doc * Publish - @synapsecns/[email protected] * fix(contracts-rfq): limit the amount of solhint warnings [SLT-245] (#3182) * ci: limit the amount of solhint warnings * refactor: move the errors into the separate interface * refactor: errors imports in tests * Publish - @synapsecns/[email protected] * ci: Solidity gas diff [SLT-259] (#3181) * ci: run tests w/o coverage first for better visibility * test: malform the test to check the adjusted workflow * Revert "test: malform the test to check the adjusted workflow" This reverts commit e7db6e1. * ci: add gas-diff workflow * try changing the contract to trigger gas diffs * retrigger the workflow * ci: provide the correct report path * ci: run on pull requests only * ci: save gas reports in monorepo root * Revert "ci: run on pull requests only" This reverts commit 0a01d60. * Revert "try changing the contract to trigger gas diffs" This reverts commit 91bc03e. * refactor: wrap if statement * refactor: exclude `solidity-devops` package in a more generic way * ci: run tests w/o coverage for `solidity-devops`, add comments * add generic comment to trigger `solidity-devops` workflows * Revert "add generic comment to trigger `solidity-devops` workflows" This reverts commit cc35a43. * Publish - @synapsecns/[email protected] * fix(contracts-core): set very high gas limit for intensive tests [SLT-259] (#3186) * fix: set very high gas limit for intensive tests * ci: speed up solidity coverage * Publish - @synapsecns/[email protected] * feat(rest-api): Adds validateRouteExists validation [SLT-260] (#3180) * Adds validateRouteExists validation * Remove timeouts for 400s * Publish - @synapsecns/[email protected] * add duplicate command warning (#3174) Co-authored-by: Trajan0x <[email protected]> * reduce solhint warnings on FbV2 (#3189) * reduce solhint warnings on FbV2 * fix whitespace * Publish - @synapsecns/[email protected] * ci: solidity gas diff options [SLT-267] (#3193) * ci: ignore test files in gas diff report * add some changes to the test files * ci: define some options for gas-diff * try changing the contract to trigger gas diffs * Revert "try changing the contract to trigger gas diffs" This reverts commit 4504e3c. * Revert "add some changes to the test files" This reverts commit 7e7d6cb. * prove w/ tx id [SLT-181] (#3169) * prove w/ tx id SLT-181 * +proveOther tests, forge fmt * fmt * fmt * Publish - @synapsecns/[email protected] * fix(sdk-router): disable ARB airdrop tests (#3195) * Publish - @synapsecns/[email protected] - @synapsecns/[email protected] - @synapsecns/[email protected] - @synapsecns/[email protected] * Fixing issue for wallet integration [SLT-270] (#3194) * slight modification to graphql call * fixing explorer frontend as well * Publish - @synapsecns/[email protected] - @synapsecns/[email protected] * store relayer on relay [SLT-182] (#3170) * store relayer on relay [SLT-182] * +tests, zeroAddr check, fmt * Publish - @synapsecns/[email protected] * Adjust text to trigger build (#3199) * Publish - @synapsecns/[email protected] * feat(synapse-interface): refund RFQ transaction [SLT-272] (#3197) * Txn transaction refund tracking * Update store to support tracking * Query FastBridge contract for `bridgeStatuses` to find refund status * Track bridge transaction `bridgeQuote.routerAddress` in store * Fetch FastBridge contract address when only provided router address * add translations --------- Co-authored-by: aureliusbtc <[email protected]> Co-authored-by: ChiTimesChi <[email protected]> Co-authored-by: abtestingalpha <[email protected]> Co-authored-by: Defi-Moses <[email protected]> Co-authored-by: trajan0x <[email protected]> Co-authored-by: Trajan0x <[email protected]> Co-authored-by: parodime <[email protected]> Co-authored-by: abtestingalpha <[email protected]> Co-authored-by: abtestingalpha <[email protected]> Co-authored-by: parodime <[email protected]> Co-authored-by: vro <[email protected]> Co-authored-by: ChiTimesChi <[email protected]> Co-authored-by: bigboydiamonds <[email protected]> Co-authored-by: bigboydiamonds <[email protected]>
This PR refactors the rfq-indexer api to match our schema elsewhere. It also adds Swagger documentation and cleans up the way in which we can add new endpoints.
Ive also outlined tests, but omitted them from this PR as it will require a mock db
Summary by CodeRabbit