Skip to content

Conversation

@kernelwhisperer
Copy link
Contributor

@kernelwhisperer kernelwhisperer commented Jan 19, 2026

Summary by CodeRabbit

  • Chores
    • Updated referrer metadata version to support new validation requirements.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 19, 2026

📝 Walkthrough

Walkthrough

Updated the referrer metadata version constant from 0.2.0 to 0.3.0 and added a new JSON Schema file (v0.3.0) that defines the Referrer object with address and code properties, including validation rules and an anyOf constraint requiring either address or code.

Changes

Cohort / File(s) Summary
Referrer Metadata Version Bump
packages/app-data/src/generatedTypes/index.ts
Updated LATEST_REFERRER_METADATA_VERSION constant from '0.2.0' to '0.3.0'
Referrer Schema v0.3.0
packages/app-data/src/schemas/referrer/v0.3.0.json
Added new JSON Schema defining Referrer object with address (Ethereum address reference) and code (string matching pattern ^[A-Z0-9_-]{6,12}$) properties; includes anyOf constraint requiring either address or code

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

Poem

🐰 Whiskers twitching with delight,
Versions bumped from two to three,
New schemas hopping into sight,
Referrer codes dance wild and free,
A little hop, a schema's might!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: allow new code property in referrer schema' accurately describes the main change: introducing a new code property option in the referrer schema v0.3.0, complementing the existing address property.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing touches
  • 📝 Generate docstrings

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.

@github-actions
Copy link
Contributor

📦 GitHub Packages Published

Last updated: Jan 19, 2026, 12:47:32 PM UTC

The following packages have been published to GitHub Packages with pre-release version pr-774-c3f958df:

  • @cowprotocol/cow-sdk@7.2.11-pr-774-c3f958df.0
  • @cowprotocol/sdk-app-data@4.5.1-pr-774-c3f958df.0
  • @cowprotocol/sdk-bridging@1.4.0-pr-774-c3f958df.0
  • @cowprotocol/sdk-common@0.5.0-pr-774-c3f958df.0
  • @cowprotocol/sdk-composable@0.1.24-pr-774-c3f958df.0
  • @cowprotocol/sdk-config@0.6.3-pr-774-c3f958df.0
  • @cowprotocol/sdk-contracts-ts@1.1.0-pr-774-c3f958df.0
  • @cowprotocol/sdk-cow-shed@0.2.10-pr-774-c3f958df.0
  • @cowprotocol/sdk-ethers-v5-adapter@0.3.1-pr-774-c3f958df.0
  • @cowprotocol/sdk-ethers-v6-adapter@0.3.1-pr-774-c3f958df.0
  • @cowprotocol/sdk-flash-loans@1.6.6-pr-774-c3f958df.0
  • @cowprotocol/sdk-order-book@0.5.1-pr-774-c3f958df.0
  • @cowprotocol/sdk-order-signing@0.1.24-pr-774-c3f958df.0
  • @cowprotocol/sdk-subgraph@0.2.7-pr-774-c3f958df.0
  • @cowprotocol/sdk-trading@0.8.1-pr-774-c3f958df.0
  • @cowprotocol/sdk-viem-adapter@0.3.1-pr-774-c3f958df.0
  • @cowprotocol/sdk-weiroll@0.1.12-pr-774-c3f958df.0

Installation

These packages require authentication to install from GitHub Packages. First, create a .npmrc file:

# Create .npmrc file in your project root
echo "@cowprotocol:registry=https://npm.pkg.github.com" > .npmrc
echo "//npm.pkg.github.com/:_authToken=YOUR_GITHUB_TOKEN" >> .npmrc

To get your GitHub token:

  1. Go to https://github.com/settings/tokens
  2. Click "Generate new token (classic)"
  3. Check only the "read:packages" scope
  4. Copy the token and replace YOUR_GITHUB_TOKEN in the .npmrc file

Then install any of the packages above, either by exact version (i.e. @cowprotocol/cow-sdk@7.2.11-pr-774-c3f958df.0) or more conveniently by using the tag (@cowprotocol/cow-sdk@pr-774):

# Yarn
yarn add npm:@cowprotocol/cow-sdk@pr-774

# pnpm
pnpm install npm:@cowprotocol/cow-sdk@pr-774

# NPM
npm install npm:@cowprotocol/cow-sdk@pr-774

Update to the latest version (only if you used the tag)

Every commit will publish a new package. To upgrade to the latest version, run:

# Yarn
yarn upgrade @cowprotocol/cow-sdk

# pnpm
pnpm update @cowprotocol/cow-sdk

# NPM
npm update @cowprotocol/cow-sdk

View Packages

You can view the published packages at: https://github.com/cowprotocol/cow-sdk/packages

@@ -0,0 +1,27 @@
{
Copy link
Contributor

Choose a reason for hiding this comment

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

The root schema also should be bumped with the new referrer version.
Example: #776

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants