-
Notifications
You must be signed in to change notification settings - Fork 543
new tokens route #7170
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
new tokens route #7170
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
WalkthroughThe "Get ERC-20 balances by address" endpoint was marked as deprecated, and a new non-deprecated "Get tokens" endpoint was added to the tokens blueprint paths in the playground-web app. No other changes to exported or public entities were made. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant PlaygroundWeb
participant TokensAPI
User ->> PlaygroundWeb: Request tokens data
PlaygroundWeb ->> TokensAPI: Call /v1/tokens (new endpoint)
TokensAPI -->> PlaygroundWeb: Return tokens data
PlaygroundWeb -->> User: Display tokens information
Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (8)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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
CodeRabbit Configuration File (
|
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7170 +/- ##
=======================================
Coverage 55.67% 55.67%
=======================================
Files 904 904
Lines 58391 58391
Branches 4119 4119
=======================================
Hits 32510 32510
Misses 25775 25775
Partials 106 106
🚀 New features to boost your workflow:
|
size-limit report 📦
|
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 comments (1)
apps/playground-web/src/app/insight/insightBlueprints.ts (1)
1-1
: 💡 Verification agent🧩 Analysis chain
Verify manual changes to auto-generated file.
The file header indicates this is auto-generated by the
update-insight-blueprints
script, but manual changes are being made in this PR. Ensure this is intentional and won't be overwritten by the next script execution.
🏁 Script executed:
#!/bin/bash # Description: Check if there are any scripts or processes that auto-generate this file # Expected: Find references to update-insight-blueprints script and understand the generation process # Search for the update script mentioned in the comment fd -t f -e js -e ts -e json | xargs rg -l "update-insight-blueprints" # Look for any build or generation scripts fd -t f -e js -e ts -e json -e sh | xargs rg -l "insightBlueprints" # Check for any package.json scripts that might regenerate this file cat package.json | jq '.scripts' 2>/dev/null || echo "No package.json found"Length of output: 2501
I’d like to inspect the generator to confirm exactly how
insightBlueprints.ts
is produced. Please run:
🏁 Script executed:
#!/bin/bash # Show the updateInsightBlueprints generator to verify overwrite behavior sed -n '1,200p' apps/playground-web/scripts/updateInsightBlueprints.tsLength of output: 672
Manual edits to auto-generated file will be overwritten
TheinsightBlueprints.ts
inapps/playground-web/src/app/insight/
is completely re-written each time you runapps/playground-web/scripts/updateInsightBlueprints.ts
. Any direct changes here (deprecating ERC-20 or adding a new tokens endpoint) will be lost on the next generation.Please:
- Revert your manual changes in
insightBlueprints.ts
.- Update the source of truth used by
fetchAllBlueprints()
—for example, modify the upstream blueprint definitions or adjust the logic inapps/playground-web/scripts/utils.ts
.- Rerun
pnpm playground:build
(or directlynode apps/playground-web/scripts/updateInsightBlueprints.ts
), then commit the regeneratedinsightBlueprints.ts
.
🧹 Nitpick comments (1)
apps/playground-web/src/app/insight/insightBlueprints.ts (1)
82-86
: LGTM: New tokens endpoint added correctly.The new general tokens endpoint follows the established structure and is correctly marked as non-deprecated.
Consider moving the general
/v1/tokens
endpoint to appear before the more specific token endpoints for better logical organization:paths: [ + { + name: "Get tokens", + path: "/v1/tokens", + deprecated: false, + }, { name: "Get token transfers by transaction", path: "/v1/tokens/transfers/transaction/{transaction_hash}", deprecated: false, }, // ... other endpoints - { - name: "Get tokens", - path: "/v1/tokens", - deprecated: false, - },
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
apps/playground-web/src/app/insight/insightBlueprints.ts
(1 hunks)
🔇 Additional comments (2)
apps/playground-web/src/app/insight/insightBlueprints.ts (2)
80-80
: LGTM: ERC-20 endpoint correctly deprecated.The existing ERC-20 balances endpoint has been properly marked as deprecated, which aligns with the PR objectives.
78-86
:✅ Verification successful
Verify endpoint accessibility and deprecation flags.
As requested in the PR objectives, please verify that:
- The new
/v1/tokens
endpoint is accessible- The deprecated flag is correctly set for both endpoints
🏁 Script executed:
#!/bin/bash # Description: Verify the endpoints are properly configured by checking for any related route definitions # Expected: Find route handlers or API definitions that correspond to these endpoints # Search for route definitions or handlers for the new tokens endpoint rg -A 5 -B 5 "\/v1\/tokens\"" --type ts --type js # Look for any API documentation or OpenAPI specs that might reference these endpoints rg -A 3 -B 3 "v1/tokens" --type json --type yaml --type yml # Check for any test files that might test these endpoints fd -t f -e test.ts -e test.js -e spec.ts -e spec.js | xargs rg -l "v1/tokens"Length of output: 296
🏁 Script executed:
#!/bin/bash # Description: Re-run verification for /v1/tokens endpoint definitions # Search for route definitions or handlers for the new tokens endpoint in .ts and .js files rg -A5 -B5 "/v1/tokens" --type ts --type js # Look for any API documentation or OpenAPI specs referencing these endpoints in JSON or YAML files rg -A3 -B3 "v1/tokens" --type json --type yaml # Check for any test/spec files that might test these endpoints fd -e test.ts -e test.js -e spec.ts -e spec.js | xargs -r rg -l "v1/tokens"Length of output: 18780
No changes needed—endpoints and deprecation flags are correct
- The new
/v1/tokens
endpoint is present in the generated client (types.gen.ts
andsdk.gen.ts
) and is already consumed (e.g. inapps/dashboard/src/@/api/universal-bridge/tokens.ts
).- In
apps/playground-web/src/app/insight/insightBlueprints.ts
,/v1/tokens/erc20/{ownerAddress}
remainsdeprecated: true
and/v1/tokens
isdeprecated: false
as intended.
Merge activity
|
## [Dashboard] Feature: Add new tokens endpoint and deprecate ERC-20 balances endpoint ## Notes for the reviewer This PR adds a new endpoint for getting tokens at `/v1/tokens` and marks the existing ERC-20 balances endpoint (`/v1/tokens/erc20/{ownerAddress}`) as deprecated. ## How to test Verify that the new endpoint is accessible and that the deprecated flag is correctly set for both endpoints in the insight blueprints. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced a new "Get tokens" endpoint for accessing token data. - **Bug Fixes** - Marked the older ERC-20 balances endpoint as deprecated to guide users toward the updated endpoint. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
45a00fe
to
f115b4d
Compare
[Dashboard] Feature: Add new tokens endpoint and deprecate ERC-20 balances endpoint
Notes for the reviewer
This PR adds a new endpoint for getting tokens at
/v1/tokens
and marks the existing ERC-20 balances endpoint (/v1/tokens/erc20/{ownerAddress}
) as deprecated.How to test
Verify that the new endpoint is accessible and that the deprecated flag is correctly set for both endpoints in the insight blueprints.
Summary by CodeRabbit
New Features
Bug Fixes
PR-Codex overview
This PR introduces a new endpoint for retrieving tokens and marks an existing endpoint as deprecated in the
insightBlueprints.ts
file.Detailed summary
name
: "Get tokens"path
: "/v1/tokens"deprecated
: falsedeprecated: true
.