-
Notifications
You must be signed in to change notification settings - Fork 0
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
chore: bump latest stable #15
base: main
Are you sure you want to change the base?
Conversation
WalkthroughThe pull request introduces changes primarily to the import statements and dependencies in several files, transitioning from the Changes
Possibly related PRs
Suggested reviewers
Poem
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
CodeRabbit Configuration File (
|
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 (2)
src/helpers.ts (1)
178-178
: Consider using type-safe alternatives to @ts-ignoreInstead of using @ts-ignore, consider adding proper type definitions or using type assertions that preserve type safety.
-// @ts-ignore -assets[network.name].USDC as `0x${string}`, +assets[network.name as keyof typeof assets].USDC as `0x${string}`, -// @ts-ignore -address: addresses.Stratosphere![network.name] as `0x${string}`, +address: addresses.Stratosphere![network.name as keyof typeof addresses.Stratosphere] as `0x${string}`,Also applies to: 217-217, 246-246
src/index.ts (1)
78-80
: LGTM: Table references updated correctlyAll database operations have been properly updated to use the new schema-based structure.
Consider reducing code duplication
The points insertion logic is repeated multiple times with similar structure. Consider extracting this into a helper function to improve maintainability.
+ // Add this helper function + async function insertPoints( + db: any, + hash: string, + userData: any, + source: string, + points: bigint, + chainId: number, + timestamp: number + ) { + return await db.insert(schema.pointsTable).values({ + id: `${hash}-${source}`, + userDataId: userData.id, + userHistoryId: userData.id, + pointsSource: source, + points: points, + chainId: chainId, + timestamp: timestamp, + }); + } // Then use it like this: - await db.insert(schema.pointsTable).values({ - id: `${hash}-liquid-mining-first-deposit`, - userDataId: `${userAddressLowerCase}-${chainId}`, - userHistoryId: `${userAddressLowerCase}-${chainId}`, - pointsSource: "liquid_mining_first_deposit", - points: pointsMap.FirstDepositInVPNDLM, - chainId: chainId, - timestamp: timestamp, - }); + await insertPoints( + db, + hash, + userData, + "liquid_mining_first_deposit", + pointsMap.FirstDepositInVPNDLM, + chainId, + timestamp + );Also applies to: 83-85, 88-95, 99-101, 112-119, 126-133, 141-143, 152-154, 164-171, 179-181, 188-195, 203-205, 212-219, 227-229
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yaml
is excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (6)
package.json
(1 hunks)ponder.config.ts
(1 hunks)ponder.schema.ts
(1 hunks)src/helpers.ts
(16 hunks)src/index.ts
(23 hunks)src/types.ts
(0 hunks)
💤 Files with no reviewable changes (1)
- src/types.ts
✅ Files skipped from review due to trivial changes (1)
- ponder.schema.ts
🔇 Additional comments (9)
package.json (1)
16-16
: Verify ponder version compatibility and breaking changes
Please ensure version 0.8.2 is the latest stable release and review the changelog for any breaking changes that might affect the codebase.
✅ Verification successful
Let me gather more information about the dependency changes and their impact on the codebase.
Version 0.8.2 is the latest stable release and appears compatible
The codebase is already using the unified ponder
package (not @ponder/core
) with proper imports in ponder.schema.ts
and ponder.config.ts
. Version 0.8.2 is confirmed as the latest release with only a patch-level bug fix for crash recovery, indicating no breaking changes that would affect the current implementation.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Check latest version and changelog
gh api graphql -f query='
{
repository(owner: "ponder-sh", name: "ponder") {
releases(first: 1, orderBy: {field: CREATED_AT, direction: DESC}) {
nodes {
tagName
description
}
}
}
}'
Length of output: 613
Script:
#!/bin/bash
# Check for @ponder/core imports and related patterns
rg "@ponder/core" -A 2
# Check for ponder imports and related patterns
rg "from ['\"]ponder['\"]" -A 2
# Look for ponder configuration files
fd "ponder.config"
Length of output: 340
ponder.config.ts (1)
1-1
: LGTM!
The import statement has been correctly updated to use the new ponder package.
src/helpers.ts (3)
9-9
: LGTM!
The import statements have been correctly updated to use the new ponder registry and schema.
Also applies to: 20-20
335-337
: LGTM!
The type assertion for deployedBlockTimestamps is correctly implemented using keyof typeof.
Line range hint 70-92
: LGTM!
The database operations have been correctly updated to use the new schema-based approach consistently throughout the file.
Also applies to: 113-146, 343-420
src/index.ts (4)
1-1
: LGTM: Import statements updated correctly
The imports have been properly updated to use the new schema-based structure from the latest stable version.
Also applies to: 24-24
Line range hint 35-42
: LGTM: Table reference updated correctly
The pointsTable reference has been properly updated to use the new schema-based structure while maintaining the existing functionality.
261-262
: LGTM: Table references updated correctly
All database operations have been properly updated to use the new schema-based structure. The same helper function suggested above could be used here to reduce code duplication.
Also applies to: 266-269, 272-279, 282-286, 294-301, 308-312
Line range hint 354-361
: LGTM: Table references updated correctly
All database operations have been properly updated to use the new schema-based structure. The same helper function suggested above could be used here to reduce code duplication in the points insertion logic.
Also applies to: 371-372, 374-381, 386-388, 396-403, 410-414, 421-428, 435-439, 446-453, 460-464
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
Refactor
Chores