-
Notifications
You must be signed in to change notification settings - Fork 30
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
Adds /destinationTokens route [SLT-204] #3151
Conversation
WalkthroughThis pull request introduces enhancements to the ESLint configuration and adds a new Express.js controller and route for handling destination tokens within a REST API. It includes validation for incoming requests, error handling, and a utility for mapping bridge routes between tokens across different blockchain networks. Additionally, unit tests are added to ensure the functionality and reliability of the new route. Changes
Possibly related PRs
Suggested labels
Poem
Recent review detailsConfiguration used: .coderabbit.yaml Files selected for processing (4)
Files skipped from review as they are similar to previous changes (3)
Additional context usedLearnings (1)
Gitleaks
Additional comments not posted (11)
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
|
Deploying sanguine-fe with Cloudflare Pages
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3151 +/- ##
===================================================
+ Coverage 36.37752% 37.95009% +1.57257%
===================================================
Files 438 418 -20
Lines 25535 24245 -1290
Branches 82 82
===================================================
- Hits 9289 9201 -88
+ Misses 15505 14306 -1199
+ Partials 741 738 -3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Bundle ReportChanges will decrease total bundle size by 147.22kB (-0.41%) ⬇️. This is within the configured threshold ✅ Detailed changes
|
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: 1
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (7)
- packages/rest-api/.eslintrc.js (1 hunks)
- packages/rest-api/src/constants/bridgeable.ts (1 hunks)
- packages/rest-api/src/constants/index.ts (1 hunks)
- packages/rest-api/src/controllers/destinationTokensController.ts (1 hunks)
- packages/rest-api/src/tests/destinationTokensRoute.test.ts (1 hunks)
- packages/rest-api/src/utils/bridgeRouteMapping.ts (1 hunks)
- packages/rest-api/src/utils/tokenAddressToToken.ts (1 hunks)
Files skipped from review due to trivial changes (1)
- packages/rest-api/src/constants/bridgeable.ts
Files skipped from review as they are similar to previous changes (2)
- packages/rest-api/src/controllers/destinationTokensController.ts
- packages/rest-api/src/utils/bridgeRouteMapping.ts
Additional context used
Learnings (1)
packages/rest-api/src/tests/destinationTokensRoute.test.ts (1)
Learnt from: abtestingalpha PR: synapsecns/sanguine#3126 File: packages/rest-api/src/tests/indexRoute.test.ts:21-31 Timestamp: 2024-09-16T17:19:34.740Z Learning: In this project, tests intentionally use hardcoded values for counts to capture changes in the number of available chains and tokens.
Gitleaks
packages/rest-api/src/tests/destinationTokensRoute.test.ts
13-13: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
27-27: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
53-53: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
66-66: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
78-78: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
Additional comments not posted (10)
packages/rest-api/src/constants/index.ts (1)
7-8
: LGTM!The new constants
ZeroAddress
andEthAddress
are correctly defined and exported. These constants will be useful for representing common Ethereum addresses throughout the application, promoting code clarity and reducing the likelihood of errors associated with hardcoding these values in multiple locations.packages/rest-api/.eslintrc.js (1)
8-9
: LGTM!Disabling the
guard-for-in
rule for the Jest configuration file is acceptable as it is not part of the application code.packages/rest-api/src/utils/tokenAddressToToken.ts (1)
1-1
: LGTM!The changes introduce a conditional check to handle the zero address case correctly. If the provided
tokenAddress
is equal to theZeroAddress
constant, it is substituted with theEthAddress
constant before attempting to retrieve the token information from thechainData
. This ensures that the function can handle the zero address case appropriately and prevents potential null reference errors.The overall flow of the function remains intact, and the added logic improves its robustness.
Also applies to: 10-10
packages/rest-api/src/tests/destinationTokensRoute.test.ts (7)
10-22
: LGTM!The test case correctly asserts the behavior of the
/destinationTokens
route for a valid request. It checks the response status code, response body type, and the presence of expected properties in the destination token objects.Tools
Gitleaks
13-13: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
24-35
: LGTM!The test case correctly asserts the error handling behavior of the
/destinationTokens
route for an unsupportedfromChain
value. It checks the response status code and the presence of the expected error message.Tools
Gitleaks
27-27: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
37-48
: LGTM!The test case correctly asserts the error handling behavior of the
/destinationTokens
route for an invalidfromToken
address. It checks the response status code and the presence of the expected error message.
50-61
: LGTM!The test case correctly asserts the error handling behavior of the
/destinationTokens
route for a token not supported by Synapse. It checks the response status code and the presence of the expected error message.Tools
Gitleaks
53-53: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
63-74
: LGTM!The test case correctly asserts the error handling behavior of the
/destinationTokens
route for a token not supported on the specified chain. It checks the response status code and the presence of the expected error message.Tools
Gitleaks
66-66: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
76-86
: LGTM!The test case correctly asserts the error handling behavior of the
/destinationTokens
route for a missingfromChain
query parameter. It checks the response status code and the presence of the expected error message.Tools
Gitleaks
78-78: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
88-98
: LGTM!The test case correctly asserts the error handling behavior of the
/destinationTokens
route for a missingfromToken
query parameter. It checks the response status code and the presence of the expected error message.
Most looks good for me, im not getting any responses on avalanche tokens though... thinking this could be an rpc issue? |
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: 1
Outside diff range and nitpick comments (1)
packages/rest-api/src/middleware/checksumAddresses.ts (1)
10-12
: Consider removing the console log statement in production.Logging errors to the console can be useful for debugging purposes during development. However, in a production environment, it is generally recommended to use a more robust logging solution that can capture and centralize logs for easier monitoring and troubleshooting.
Consider removing the console log statement and replacing it with a proper logging mechanism, such as a logging library or a centralized logging service, to ensure that errors are properly captured and handled in production.
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (7)
- packages/rest-api/src/middleware/checksumAddresses.ts (1 hunks)
- packages/rest-api/src/routes/bridgeRoute.ts (1 hunks)
- packages/rest-api/src/routes/bridgeTxInfoRoute.ts (1 hunks)
- packages/rest-api/src/routes/destinationTokensRoute.ts (1 hunks)
- packages/rest-api/src/routes/swapRoute.ts (1 hunks)
- packages/rest-api/src/routes/swapTxInfoRoute.ts (1 hunks)
- packages/rest-api/src/tests/destinationTokensRoute.test.ts (1 hunks)
Additional context used
Learnings (1)
packages/rest-api/src/tests/destinationTokensRoute.test.ts (1)
Learnt from: abtestingalpha PR: synapsecns/sanguine#3126 File: packages/rest-api/src/tests/indexRoute.test.ts:21-31 Timestamp: 2024-09-16T17:19:34.740Z Learning: In this project, tests intentionally use hardcoded values for counts to capture changes in the number of available chains and tokens.
Gitleaks
packages/rest-api/src/tests/destinationTokensRoute.test.ts
13-13: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
41-41: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
55-55: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
81-81: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
94-94: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
106-106: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
Additional comments not posted (23)
packages/rest-api/src/middleware/checksumAddresses.ts (1)
4-18
: ThechecksumAddresses
middleware function is well-implemented and provides a useful functionality.The
checksumAddresses
middleware function is a well-designed and useful addition to the codebase. It provides a convenient way to validate and convert Ethereum addresses to their checksum format, ensuring consistency and reducing the chances of errors related to address formatting.Some positive aspects of the implementation:
Modularity: The middleware function is implemented as a separate module, promoting code modularity and reusability. It can be easily integrated into different routes or parts of the application where address validation is required.
Configurability: The function takes an array of address field names as a parameter, allowing flexibility in specifying which query parameters should be validated and converted. This makes the middleware adaptable to different use cases and API endpoints.
Error handling: The function gracefully handles errors that may occur during address conversion. It catches any exceptions thrown by the
getAddress
function and logs them to the console, preventing the middleware from interrupting the request flow. This ensures a smooth user experience even if an invalid address is provided.Use of reliable library: The function leverages the
getAddress
function from the well-establishedethers
library to perform the address conversion. This ensures that the conversion follows the standard checksum format and benefits from the library's robust implementation.Overall, the
checksumAddresses
middleware function is a valuable addition to the codebase, enhancing the reliability and consistency of Ethereum address handling in the application.packages/rest-api/src/routes/destinationTokensRoute.ts (5)
1-11
: LGTM!The imports are relevant and required for the route implementation.
12-13
: LGTM!Creating an Express router instance is necessary for defining the route.
14-38
: LGTM!The validation rules for
fromChain
andfromToken
query parameters are comprehensive and cover the necessary checks. UsingshowFirstValidationError
middleware to handle validation errors is a good practice. The integration withdestinationTokensController
is correct.
40-40
: LGTM!Exporting the router instance is necessary for using it in other parts of the application.
14-38
: Verify the issue with Avalanche tokens.The comments summary mentions an issue with querying Avalanche tokens, possibly due to an RPC problem. This issue is not apparent in the code segment and may require further investigation.
To verify the issue, we can run the following script:
If the issue is confirmed, please provide more details about the RPC setup and configuration. I'll be happy to assist in resolving the issue.
packages/rest-api/src/routes/swapRoute.ts (2)
9-9
: LGTM!The import statement for the
checksumAddresses
middleware is correctly added.
15-15
: Verify the middleware handles missing token fields gracefully.The
checksumAddresses
middleware is correctly applied to the route handler. It will help ensure thefromToken
andtoToken
fields are in a valid checksum format, enhancing the robustness of the API.Please ensure that the middleware handles the case when the
fromToken
ortoToken
fields are missing in the request, to avoid potential errors. You can verify this by running the following script:Verification successful
Middleware handles missing token fields gracefully
After analyzing the codebase, I can confirm that the
checksumAddresses
middleware is implemented correctly and handles missing token fields gracefully. Here are the key points:
- The middleware checks if the query parameters exist and are strings before processing them.
- It uses a try-catch block to handle potential errors during address validation.
- The API consistently returns a 400 status with error details when validation fails across various routes and controllers.
While we couldn't directly see the swap route handler, the pattern of using
isTokenSupportedOnChain
for validation is consistent across routes, suggesting that proper validation is likely in place for the swap route as well.The overall error handling in the API appears robust, with multiple controllers implementing consistent error responses for invalid or missing parameters.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the middleware handles missing token fields gracefully. # Test 1: Send a request without the fromToken field. Expect: Appropriate error response. curl -X GET "http://localhost:3000/swap?chain=1&toToken=0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984&amount=100" # Test 2: Send a request without the toToken field. Expect: Appropriate error response. curl -X GET "http://localhost:3000/swap?chain=1&fromToken=0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984&amount=100"Length of output: 1041
Script:
#!/bin/bash # Search for the checksumAddresses middleware implementation echo "Searching for checksumAddresses middleware:" ast-grep --lang typescript --pattern 'export const checksumAddresses = ($params) => { $$$ }' echo "\nSearching for the swap route handler:" ast-grep --lang typescript --pattern 'router.get("/", $$$, async (req, res) => { $$$ })' echo "\nSearching for error handling in the route handler:" rg "throw new Error|res.status\(4[0-9]{2}\).json" packages/rest-api/src/routes/swapRoute.tsLength of output: 580
Script:
#!/bin/bash # Find relevant files echo "Searching for relevant files:" fd -e ts -e js middleware routes swap echo "\nSearching for checksumAddresses middleware:" rg -i "checksumAddresses.*=.*\(.*\).*=>" -g '*.ts' -g '*.js' echo "\nSearching for swap route handler:" rg -i "router\.get.*\(.*'/.*'.*,.*async.*\(.*req.*,.*res.*\).*=>" -g '*.ts' -g '*.js' echo "\nSearching for error handling or parameter validation:" rg "(throw new Error|res\.status\(4[0-9]{2}\)\.json|req\.query|req\.params)" -g '*.ts' -g '*.js'Length of output: 7421
packages/rest-api/src/routes/swapTxInfoRoute.ts (2)
10-10
: LGTM!The import statement for the
checksumAddresses
middleware is correct.
16-16
: Great addition of thechecksumAddresses
middleware!Applying the
checksumAddresses
middleware to thefromToken
andtoToken
parameters is a good practice to ensure data integrity. It will prevent potential issues caused by inconsistent casing of token addresses.packages/rest-api/src/routes/bridgeRoute.ts (2)
9-9
: LGTM!The import statement for the
checksumAddresses
middleware is correct and aligns with the PR objectives.
15-15
: Verify the middleware functionality.The
checksumAddresses
middleware is correctly applied to the GET request handler for the root route, enhancing the input validation process for thefromToken
andtoToken
parameters.To verify the middleware functionality, run the following script:
packages/rest-api/src/routes/bridgeTxInfoRoute.ts (2)
10-10
: LGTM!The import statement for the
checksumAddresses
middleware is syntactically correct and follows the expected naming convention.
16-16
: Great addition of thechecksumAddresses
middleware!Applying the
checksumAddresses
middleware to the GET route enhances the input validation by ensuring that thefromToken
andtoToken
parameters are in the expected checksum format. This improves the robustness and reliability of the API.The middleware is correctly applied to the route, and the array of parameter names
['fromToken', 'toToken']
specifies the parameters that need to be validated and potentially transformed.Overall, this is a valuable addition to the route definition.
packages/rest-api/src/tests/destinationTokensRoute.test.ts (9)
10-22
: LGTM!The test correctly verifies the behavior of the
/destinationTokens
route for a valid request. The assertions check the status code and the structure of the response body.Tools
Gitleaks
13-13: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
24-36
: LGTM!The test correctly verifies the behavior of the
/destinationTokens
route for a valid request with a gas token (zero address). The assertions check the status code and the structure of the response body.
38-50
: LGTM!The test correctly verifies the behavior of the
/destinationTokens
route for a valid request with a non-checksummed token address. The assertions check the status code and the structure of the response body.Tools
Gitleaks
41-41: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
52-63
: LGTM!The test correctly verifies the error handling of the
/destinationTokens
route for an invalid request with an unsupportedfromChain
value. The assertions check the status code and the error message in the response body.Tools
Gitleaks
55-55: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
65-76
: LGTM!The test correctly verifies the error handling of the
/destinationTokens
route for an invalid request with an invalidfromToken
address. The assertions check the status code and the error message in the response body.
78-89
: LGTM!The test correctly verifies the error handling of the
/destinationTokens
route for an invalid request with a token address not supported by Synapse. The assertions check the status code and the error message in the response body.Tools
Gitleaks
81-81: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
91-102
: LGTM!The test correctly verifies the error handling of the
/destinationTokens
route for an invalid request with a token address not supported on the specified chain. The assertions check the status code and the error message in the response body.Tools
Gitleaks
94-94: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
104-114
: LGTM!The test correctly verifies the error handling of the
/destinationTokens
route for an invalid request with a missingfromChain
query parameter. The assertions check the status code and the error message in the response body.Tools
Gitleaks
106-106: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
116-126
: LGTM!The test correctly verifies the error handling of the
/destinationTokens
route for an invalid request with a missingfromToken
query parameter. The assertions check the status code and the error message in the response body.
* 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 <abtestingalpha@gmail.com> * Publish - @synapsecns/rest-api@1.0.75 - @synapsecns/synapse-interface@0.38.4 * fix harmony proxy (#3149) Co-authored-by: Trajan0x <trajan0x@users.noreply.github.com> * 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 <trajan0x@users.noreply.github.com> Co-authored-by: abtestingalpha <abtestingalpha@gmail.com> Co-authored-by: parodime <jordan@protochainresearch.com> * Publish - @synapsecns/synapse-interface@0.38.5 - @synapsecns/rfq-indexer-api@1.0.2 - @synapsecns/rfq-indexer@0.0.2 * Adds /destinationTokens route [SLT-204] (#3151) * Adds /destinationTokens route * ZeroAddress & NativeGasAddress * Adds test for native gas tokens * Checksums incoming token address params * Publish - @synapsecns/rest-api@1.0.76 * boba pause (#3150) * boba pause * only boba to txns * Publish - @synapsecns/synapse-interface@0.38.6 * fix(synapse-interface): Reorders validation to check existence first (#3156) * Reorders validation to check existence first * Removes duplicates * Publish - @synapsecns/rest-api@1.0.77 * Fix boba pause (#3158) * Publish - @synapsecns/synapse-interface@0.38.7 * 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/rest-api@1.1.0 - @synapsecns/synapse-interface@0.38.8 - @synapsecns/rfq-indexer-api@1.0.3 - @synapsecns/rfq-indexer@0.0.3 * Pulls version from package json (#3160) * Publish - @synapsecns/rest-api@1.1.1 * Require vs import due to file location (#3161) * Require vs import due to file location * Publish - @synapsecns/rest-api@1.1.2 * Prevent caching of api docs (#3162) * Publish - @synapsecns/rest-api@1.1.3 * 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 <88190723+ChiTimesChi@users.noreply.github.com> * Publish - FastBridge@0.4.0 * 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 <abtestingalpha@gmail.com> * Publish - @synapsecns/rest-api@1.1.4 * 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/rfq-indexer-api@1.0.4 * fix read mes (#3168) * Publish - @synapsecns/contracts-core@1.0.32 - FastBridge@0.4.1 - @synapsecns/solidity-devops@0.4.5 * 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/synapse-interface@0.38.9 * 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 <abtestingalpha@gmail.com> * Publish - @synapsecns/synapse-interface@0.39.0 * fix: formatted bridge fee amount (#3165) * Publish - @synapsecns/rest-api@1.1.5 * 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/contracts-core@1.0.33 - @synapsecns/contracts-rfq@0.5.0 - @synapsecns/solidity-devops@0.4.6 * 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/rest-api@1.2.0 * 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/contracts-rfq@0.5.1 * 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/contracts-rfq@0.5.2 * 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/contracts-core@1.0.34 * feat(rest-api): Adds validateRouteExists validation [SLT-260] (#3180) * Adds validateRouteExists validation * Remove timeouts for 400s * Publish - @synapsecns/rest-api@1.3.0 * add duplicate command warning (#3174) Co-authored-by: Trajan0x <trajan0x@users.noreply.github.com> * reduce solhint warnings on FbV2 (#3189) * reduce solhint warnings on FbV2 * fix whitespace * Publish - @synapsecns/contracts-rfq@0.5.3 * 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/contracts-rfq@0.5.4 * fix(sdk-router): disable ARB airdrop tests (#3195) * Publish - @synapsecns/rest-api@1.3.1 - @synapsecns/sdk-router@0.11.2 - @synapsecns/synapse-interface@0.39.1 - @synapsecns/widget@0.7.2 * Fixing issue for wallet integration [SLT-270] (#3194) * slight modification to graphql call * fixing explorer frontend as well * Publish - @synapsecns/explorer-ui@0.3.3 - @synapsecns/rest-api@1.3.2 * store relayer on relay [SLT-182] (#3170) * store relayer on relay [SLT-182] * +tests, zeroAddr check, fmt * Publish - @synapsecns/contracts-rfq@0.5.5 * Adjust text to trigger build (#3199) * Publish - @synapsecns/synapse-interface@0.39.2 * 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 <82057759+aureliusbtc@users.noreply.github.com> Co-authored-by: ChiTimesChi <88190723+ChiTimesChi@users.noreply.github.com> Co-authored-by: abtestingalpha <abtestingalpha@gmail.com> Co-authored-by: Defi-Moses <Defi-Moses@users.noreply.github.com> Co-authored-by: trajan0x <83933037+trajan0x@users.noreply.github.com> Co-authored-by: Trajan0x <trajan0x@users.noreply.github.com> Co-authored-by: parodime <jordan@protochainresearch.com> Co-authored-by: abtestingalpha <104046418+abtestingalpha@users.noreply.github.com> Co-authored-by: abtestingalpha <abtestingalpha@users.noreply.github.com> Co-authored-by: parodime <parodime@users.noreply.github.com> Co-authored-by: vro <168573323+golangisfun123@users.noreply.github.com> Co-authored-by: ChiTimesChi <ChiTimesChi@users.noreply.github.com> Co-authored-by: bigboydiamonds <57741810+bigboydiamonds@users.noreply.github.com> Co-authored-by: bigboydiamonds <bigboydiamonds@users.noreply.github.com>
Description
Adds
/destinationTokens
route. Given query params fromfromChain
andfromToken
, response returns list of possible destination tokens withsymbol
,address
, andchainId
metadata.Summary by CodeRabbit
New Features
Bug Fixes
Tests
Chores