-
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
feat(rfq-indexer): add request
column to BridgeRequested
for refunds
#3287
Conversation
* Feat: add quoteParams helper for test * Feat: add MaxQuoteAmount to relconfig * Feat: use MaxQuoteAmount * Feat: handle MaxQuoteAmount in quoter test * Replace: MaxQuoteAmount -> MaxRelayAmount * Feat: shouldProcess() returns false if max relay amount exceeded * Feat: add test for MaxRelayAmount
WalkthroughThe changes in this pull request involve the addition of a new field, Changes
Possibly related PRs
Suggested labels
Suggested reviewers
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
🧰 Additional context used🔇 Additional comments (1)
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
|
request
column toBridgeRequested
for refundsrequest
column to BridgeRequested
for refunds
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: 0
🧹 Outside diff range and nitpick comments (1)
packages/rfq-indexer/indexer/src/index.ts (1)
19-19
: LGTM! Consider adding type checking for therequest
property.The addition of the
request
property to theBridgeRequested
event handler aligns with the PR objective. The implementation correctly extracts the property from the event args and includes it in the database entry.To enhance type safety, consider adding a type check or assertion for the
request
property. For example:request: request as string, // Assuming request is expected to be a stringThis will help catch potential type mismatches early in the development process.
Also applies to: 37-37
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (5)
- packages/rfq-indexer/api/src/graphql/resolvers.ts (1 hunks)
- packages/rfq-indexer/api/src/queries/depositsQueries.ts (1 hunks)
- packages/rfq-indexer/api/src/types/index.ts (1 hunks)
- packages/rfq-indexer/indexer/ponder.schema.ts (1 hunks)
- packages/rfq-indexer/indexer/src/index.ts (2 hunks)
🧰 Additional context used
🔇 Additional comments (5)
packages/rfq-indexer/api/src/queries/depositsQueries.ts (1)
20-20
: LGTM! Verify impact on dependent code.The addition of
'BridgeRequestEvents.request'
to the selection is correct and aligns with the PR objectives. This change expands the data retrieved by the query, which is likely the intended behavior for handling refunds.To ensure this change doesn't cause any issues in dependent code, please run the following script:
This script will help identify any code that might need to be updated to handle the new
request
field in the query results.packages/rfq-indexer/indexer/ponder.schema.ts (1)
8-8
: LGTM! Verify usage in related code.The addition of the
request
field to theBridgeRequestEvents
table is implemented correctly and aligns with the PR objective. The field type (string) is appropriate for storing request-related information.To ensure consistency across the codebase, please verify that all code interacting with
BridgeRequestEvents
is updated to handle this new field. Run the following script to identify potential areas that may need updates:This script will help identify areas of the codebase that might need to be updated to accommodate the new
request
field.✅ Verification successful
Verification Complete: No Issues Found
The usage of the
request
field inBridgeRequestEvents
has been correctly updated across the codebase. All relevant TypeScript files, including GraphQL resolvers and queries, are handling the new field appropriately.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Find usages of BridgeRequestEvents that might need updating # Search for BridgeRequestEvents usage in TypeScript/JavaScript files echo "Searching for BridgeRequestEvents usage:" rg --type-add 'ts:*.{ts,js}' --type ts 'BridgeRequestEvents' -C 3 # Search for GraphQL queries/mutations that might need updating echo "\nSearching for GraphQL queries/mutations involving BridgeRequestEvents:" rg --type-add 'gql:*.{graphql,gql}' --type gql 'BridgeRequestEvents' -C 3Length of output: 12483
packages/rfq-indexer/api/src/types/index.ts (1)
13-13
: LGTM! Verify usage across the codebase.The addition of the
request
property to theBridgeRequestEvents
interface is appropriate and consistent with the existing structure. The typeColumnType<string>
aligns with other string fields in the interface.To ensure this change is properly integrated, please run the following script to check for any places that might need updating:
This will help identify any areas of the codebase that might need to be updated to accommodate the new
request
field.✅ Verification successful
Verified: The
request
property inBridgeRequestEvents
is correctly integrated and consistently used across the codebase. No issues found.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check for usage of BridgeRequestEvents that might need updating # Search for BridgeRequestEvents usage echo "Searching for BridgeRequestEvents usage:" rg --type typescript -A 5 "BridgeRequestEvents" # Search for database operations related to bridge_request_events table echo "Searching for database operations on bridge_request_events:" rg --type typescript -A 5 "bridge_request_events"Length of output: 387
Script:
#!/bin/bash # Description: Re-check for usage of BridgeRequestEvents that might need updating without specifying file type # Search for BridgeRequestEvents usage in .ts and .tsx files echo "Searching for BridgeRequestEvents usage in TypeScript files:" rg "BridgeRequestEvents" --glob "*.ts" --glob "*.tsx" -A 5 # Search for database operations related to bridge_request_events table in .ts and .tsx files echo "Searching for database operations on bridge_request_events in TypeScript files:" rg "bridge_request_events" --glob "*.ts" --glob "*.tsx" -A 5Length of output: 11580
packages/rfq-indexer/indexer/src/index.ts (1)
Line range hint
1-238
: Overall changes look good and are well-integrated.The addition of the
request
property to theBridgeRequested
event handler is the only change in this file. The implementation is consistent with the existing code style and doesn't introduce any breaking changes to other event handlers.To ensure the
request
property is used correctly throughout the codebase, run the following script:This will help identify any places where the new property might need to be added or where there might be pending work related to this change.
✅ Verification successful
Verification Successful: 'request' property is used correctly
References to
BridgeRequestEvents.request
found in:
packages/rfq-indexer/api/src/queries/depositsQueries.ts
packages/rfq-indexer/api/src/graphql/resolvers.ts
No TODOs or FIXMEs related to the
request
property were found.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of the new 'request' property in related files. # Test: Search for references to 'BridgeRequestEvents' and 'request' property rg --type typescript -e 'BridgeRequestEvents.*request' -e 'FastBridgeV2:BridgeRequested.*request' # Test: Check for any TODOs or FIXMEs related to the new property rg --type typescript -e 'TODO.*request' -e 'FIXME.*request'Length of output: 231
Script:
#!/bin/bash # Description: Verify the usage of the new 'request' property in related files. # Test: Search for references to 'BridgeRequestEvents' and 'request' property in TypeScript files rg -g "*.ts" -g "*.tsx" -e 'BridgeRequestEvents.*request' -e 'FastBridgeV2:BridgeRequested.*request' # Test: Check for any TODOs or FIXMEs related to the new property in TypeScript files rg -g "*.ts" -g "*.tsx" -e 'TODO.*request' -e 'FIXME.*request'Length of output: 347
packages/rfq-indexer/api/src/graphql/resolvers.ts (1)
23-23
: New field 'request' added to BridgeRequestEvents queryThe addition of the 'BridgeRequestEvents.request' field to the
qDeposits
function aligns with the PR objective. This change will allow the retrieval of the 'request' data for refunds in bridge requests.Please ensure the following:
- Update any relevant GraphQL type definitions or database schemas to include this new 'request' field.
- Verify if the
nest_results
function needs to be modified to properly handle this new field in the query results.To help with verification, you can run the following script to check for any type definitions that might need updating:
Deploying sanguine-fe with Cloudflare Pages
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## feat/explorer-w #3287 +/- ##
==========================================================
- Coverage 90.44834% 35.14833% -55.30001%
==========================================================
Files 54 77 +23
Lines 1026 2663 +1637
Branches 82 82
==========================================================
+ Hits 928 936 +8
- Misses 95 1722 +1627
- Partials 3 5 +2
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.
lgtm
* explorer UI updated * rfq-indexer update * explorer backend update * [goreleaser] trigger explorer version bump * rfq indexer with the right contracts * [goreleaser] adding catch * response error fixes and wld decimals * adding address * feat(rfq-indexer): add `request` column to `BridgeRequested` for refunds (#3287) * feat(rfq-relayer): add MaxRelayAmount (#3259) * Feat: add quoteParams helper for test * Feat: add MaxQuoteAmount to relconfig * Feat: use MaxQuoteAmount * Feat: handle MaxQuoteAmount in quoter test * Replace: MaxQuoteAmount -> MaxRelayAmount * Feat: shouldProcess() returns false if max relay amount exceeded * Feat: add test for MaxRelayAmount * add request field for refunds * adding to events typing --------- Co-authored-by: dwasse <wassermandaniel8@gmail.com> Co-authored-by: defi-moses <jakedinero@protonmail.com> * fix api docs * linting fixes * fixing irrelavent files --------- Co-authored-by: vro <168573323+golangisfun123@users.noreply.github.com> Co-authored-by: dwasse <wassermandaniel8@gmail.com>
Description
A clear and concise description of the features you're adding in this pull request.
Additional context
Add any other context about the problem you're solving.
Metadata
Summary by CodeRabbit
New Features
request
, to the deposit events, enhancing the information retrieved for bridge requests.request
field in theBridgeRequestEvent
type.Bug Fixes
originChainId
anddestChainId
to numbers in the event data structure.