Skip to content

feat(cow-shed): support Poller deployment domains - #990

Open
igorroncevic wants to merge 4 commits into
feat/composable-cow-poller-actionsfrom
feat/composable-cow-poller-cow-shed
Open

feat(cow-shed): support Poller deployment domains#990
igorroncevic wants to merge 4 commits into
feat/composable-cow-poller-actionsfrom
feat/composable-cow-poller-cow-shed

Conversation

@igorroncevic

@igorroncevic igorroncevic commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

What and why

ComposableCowPoller integrations can now bundle registerFromShed and revokeFromShed calls through CowShedSdk without subclassing it for custom deployments. CowShedSdk accepts custom factory, implementation, proxy-code, and EIP-712 domain settings, including domain version 2.1.0, while preserving its existing version and subclass APIs.

Depends on #966 and cowprotocol/composable-cow#145.

Related: TWAP for EOAs

Test

pnpm --filter @cowprotocol/sdk-cow-shed test

Try it

npm install @cowprotocol/sdk-cow-shed
const cowShedSdk = new CowShedSdk(adapter, {
  ...cowShedDeployment,
  domainVersion: '2.1.0',
})
const cowShed = cowShedSdk.getCowShedAccount(chainId, funder)

const callData = poller.encodeRegisterFromShed({ ...schedule, owner: cowShed })
// To revoke instead: poller.encodeRevokeFromShed({ ...schedule, owner: cowShed })

const signedBundle = await cowShedSdk.signCalls({
  chainId,
  signer,
  calls: [{ target: pollerAddress, callData, value: 0n, isDelegateCall: false, allowFailure: false }],
})

The returned bundle targets the configured CowShed factory and signs with EIP-712 domain version 2.1.0.

@coderabbitai

coderabbitai Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: 424dcbc0-727c-4a1d-b5d0-cd8d7f5753bf

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

📦 GitHub Packages Published

Last updated: Sep 7, 2026, 09:51:05 AM UTC

The following packages have been published to GitHub Packages with pre-release version pr-990-1648a2c6:

  • @cowprotocol/cow-sdk@9.2.7-pr-990-1648a2c6.0
  • @cowprotocol/sdk-app-data@6.0.0-pr-990-1648a2c6.0
  • @cowprotocol/sdk-bridging@4.4.3-pr-990-1648a2c6.0
  • @cowprotocol/sdk-common@0.12.1-pr-990-1648a2c6.0
  • @cowprotocol/sdk-composable@1.4.0-pr-990-1648a2c6.0
  • @cowprotocol/sdk-config@2.4.0-pr-990-1648a2c6.0
  • @cowprotocol/sdk-contracts-ts@3.4.0-pr-990-1648a2c6.0
  • @cowprotocol/sdk-cow-shed@0.4.6-pr-990-1648a2c6.0
  • @cowprotocol/sdk-ethers-v5-adapter@0.4.11-pr-990-1648a2c6.0
  • @cowprotocol/sdk-ethers-v6-adapter@0.4.11-pr-990-1648a2c6.0
  • @cowprotocol/sdk-flash-loans@3.3.4-pr-990-1648a2c6.0
  • @cowprotocol/sdk-order-book@4.0.2-pr-990-1648a2c6.0
  • @cowprotocol/sdk-order-signing@1.1.7-pr-990-1648a2c6.0
  • @cowprotocol/sdk-subgraph@1.2.1-pr-990-1648a2c6.0
  • @cowprotocol/sdk-trading@2.3.0-pr-990-1648a2c6.0
  • @cowprotocol/sdk-viem-adapter@0.3.26-pr-990-1648a2c6.0
  • @cowprotocol/sdk-weiroll@0.2.2-pr-990-1648a2c6.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@9.2.7-pr-990-1648a2c6.0) or more conveniently by using the tag (@cowprotocol/cow-sdk@pr-990):

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

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

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

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

@Danziger

Danziger commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

I think packages/cow-shed/src/const.ts also needs to be updated to add 2.1.0, and we probably want to make it the COW_SHED_LATEST_VERSION.

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.

2 participants