Skip to content

feat!: update cow-sdk to latest version without Lens#201

Merged
Danziger merged 4 commits intomainfrom
feat/cow-243-remove-lens
Mar 19, 2026
Merged

feat!: update cow-sdk to latest version without Lens#201
Danziger merged 4 commits intomainfrom
feat/cow-243-remove-lens

Conversation

@Danziger
Copy link
Copy Markdown
Contributor

@Danziger Danziger commented Mar 13, 2026

Description

Summary by CodeRabbit

  • Chores
    • Bumped package version to 3.0.0
    • Updated core protocol libraries to newer versions for improved compatibility
  • Bug Fixes
    • Improved numeric boundary handling to prevent rare runtime errors during contract-related operations

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 13, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 832e7186-d945-4e72-b282-06ac70228f22

📥 Commits

Reviewing files that changed from the base of the PR and between e147b1c and 40a662d.

📒 Files selected for processing (1)
  • package.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • package.json

📝 Walkthrough

Walkthrough

Version bumped to 3.0.0 in package.json, four @cowprotocol/* dependency ranges were updated, and a numeric bound check in src/utils/contracts.ts was changed to use a BigInt-based comparison for POLL_TRY_AT_BLOCK and POLL_TRY_AT_EPOCH.

Changes

Cohort / File(s) Summary
Package Configuration
package.json
Package version updated 2.14.03.0.0. Dependency ranges updated: @cowprotocol/contracts ^1.4.0^1.8.0, @cowprotocol/cow-sdk ^7.3.5^8.0.0, @cowprotocol/sdk-composable ^0.1.31^0.1.38, @cowprotocol/sdk-ethers-v5-adapter ^0.3.6^0.3.11.
Contract utils
src/utils/contracts.ts
Replaced .gt(MAX_UINT32) check with a BigInt-based comparison: BigInt(blockNumberOrEpoch.toString()) > MAX_UINT32 for POLL_TRY_AT_BLOCK and POLL_TRY_AT_EPOCH.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 I hopped through JSON, version set to three,
Bumped some crates and checked bounds carefully.
BigInt paws tap the numbers just right,
A tidy small change, and I’m off in the night. 🥕

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is incomplete. It lacks the required 'Changes' and 'How to test' sections from the template. Add a detailed 'Changes' section listing the dependency updates and version bump, and include a 'How to test' section with testing instructions.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: updating cow-sdk dependencies to the latest version and removing Lens support.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/cow-243-remove-lens
📝 Coding Plan
  • Generate coding plan for human review comments

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@socket-security
Copy link
Copy Markdown

socket-security bot commented Mar 13, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​cowprotocol/​sdk-ethers-v5-adapter@​0.3.6 ⏵ 0.3.11771009999 +1100
Updated@​cowprotocol/​sdk-composable@​0.1.31 ⏵ 0.1.38781009999 +1100
Updated@​cowprotocol/​cow-sdk@​7.3.5 ⏵ 8.0.079 +110010099100
Updated@​cowprotocol/​contracts@​1.4.0 ⏵ 1.8.087100100 +185 +270

View full report

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 `@package.json`:
- Line 4: The package.json currently sets "version": "2.15.0" but this PR is a
breaking change (feat! removing Lens support); update the package version to a
new major (e.g., "3.0.0") to reflect the breaking change so downstream consumers
won't receive a silent incompatible upgrade; locate the "version" field in
package.json and change its value and update any release/changelog metadata or
CI/release scripts that derive tags from the package version (references: the
"version" field in package.json).
- Around line 48-51: The comparison at src/utils/contracts.ts (around the check
using blockNumberOrEpoch and MAX_UINT32) breaks because MAX_UINT32 is now a
bigint while blockNumberOrEpoch is an ethers BigNumber; update the comparison to
use matching types: either convert MAX_UINT32 to an ethers BigNumber (e.g., via
BigNumber.from(MAX_UINT32)) before using blockNumberOrEpoch.gt(MAX_UINT32) or
convert blockNumberOrEpoch to a bigint (via blockNumberOrEpoch.toBigInt()) and
perform a native bigint comparison; ensure this change touches the check
referencing MAX_UINT32 and the variable blockNumberOrEpoch so the runtime .gt()
call only ever receives a compatible type.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 274a1f5e-a6fb-40fb-87a4-4a73c8692244

📥 Commits

Reviewing files that changed from the base of the PR and between 13d0156 and 7fd14d6.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (1)
  • package.json

@Danziger Danziger requested a review from a team March 13, 2026 12:24
@Danziger Danziger merged commit 4fb9e1a into main Mar 19, 2026
5 checks passed
@Danziger Danziger deleted the feat/cow-243-remove-lens branch March 19, 2026 12:13
@github-actions github-actions bot locked and limited conversation to collaborators Mar 19, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants