Conversation
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 34 minutes and 11 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (3)
📝 WalkthroughWalkthroughBumps package version to 4.0.0 and updates Changes
Sequence Diagram(s)sequenceDiagram
participant ChainCtx as ChainContext
participant Helper as configureSdkAdapters
participant Ethers as EthersV5Adapter
participant CowSDK as `@cowprotocol/cow-sdk`
participant Composable as `@cowprotocol/sdk-composable`
ChainCtx->>Helper: init(provider)
Helper->>Ethers: new EthersV5Adapter({provider})
Helper->>CowSDK: setGlobalAdapter(Ethers)
Helper->>Composable: setGlobalAdapter(Ethers)
Note right of Composable: Both SDKs now share the same adapter instance
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@package.json`:
- Line 49: Update the package.json dependency for the Cow Protocol SDK: replace
the non-existent version specifier "@cowprotocol/cow-sdk": "^8.1.0" with a
published version that npm/yarn can resolve (use "@cowprotocol/cow-sdk":
"^8.0.5") so the dependency installer succeeds and remains compatible with
existing packages like `@cowprotocol/sdk-composable` and
`@cowprotocol/sdk-ethers-v5-adapter`.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 5bb71836-3a54-409b-b709-ce244d7eb95a
⛔ Files ignored due to path filters (1)
yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (1)
package.json
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/services/chain.ts`:
- Around line 39-43: configureSdkAdapters currently creates an EthersV5Adapter
and calls setGlobalAdapter/setComposableGlobalAdapter, which causes a race when
multiple ChainContext.init run in parallel; instead, change
configureSdkAdapters(EthersV5Adapter, provider) to produce and return a
chain-specific adapter (do not call setGlobalAdapter/setComposableGlobalAdapter
inside it), and update callers (e.g., ChainContext.init) to store that adapter
in a per-chain registry or pass it into chain-local SDK consumers;
alternatively, implement a chain-aware lookup (adapterMap keyed by chainId) and
have ChainContext.init register the adapter there rather than mutating global
state.
- Around line 6-7: The import uses a deep node_modules path for setGlobalAdapter
(aliased as setComposableGlobalAdapter); replace that import to pull
setGlobalAdapter directly from the public package "@cowprotocol/sdk-common"
(e.g., import { setGlobalAdapter as setComposableGlobalAdapter } from
"@cowprotocol/sdk-common"), and ensure package.json lists
"@cowprotocol/sdk-common" as a dependency so the module resolves correctly.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: c727bcba-6e7e-44a1-81eb-afd654105343
📒 Files selected for processing (4)
.gitignorepackage.jsonsrc/domain/polling/index.tssrc/services/chain.ts
✅ Files skipped from review due to trivial changes (1)
- .gitignore
🚧 Files skipped from review as they are similar to previous changes (1)
- package.json
2a8217c to
6dcf476
Compare
6dcf476 to
07126ec
Compare
| /config*.json | ||
|
|
||
| # Idea | ||
| .idea/ No newline at end of file |
Description
Update to latest sdk version
Summary by CodeRabbit