Skip to content

feat(composable): add signed Poller revocation - #960

Open
igorroncevic wants to merge 6 commits into
feat/composable-cow-poller-register-signaturefrom
feat/composable-cow-poller-revoke-signature
Open

feat(composable): add signed Poller revocation#960
igorroncevic wants to merge 6 commits into
feat/composable-cow-poller-register-signaturefrom
feat/composable-cow-poller-revoke-signature

Conversation

@igorroncevic

@igorroncevic igorroncevic commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

What and why

JIT Poller integrations can now build the exact EIP-712 revocation payload and revokeWithSignature calldata, allowing relayers to revoke schedules authorized by the funder. The authorization includes the supplied schedule authEpoch; the Poller increments its stored epoch after revocation to prevent replay.

Depends on #959 and cowprotocol/composable-cow#136.

Related: https://linear.app/cowswap/project/twap-for-eoas-07d3dae536ea/overview

Test

pnpm --filter @cowprotocol/sdk-composable test

Summary by CodeRabbit

  • New Features
    • Added support for creating typed-data payloads for signed authorization revocations.
    • Added support for encoding signed revocation calldata, including authorization details, deadlines, and signatures.
    • Documented the signed revocation workflow, including relayer submission.
  • Tests
    • Added coverage to verify typed-data generation, cross-adapter consistency, calldata encoding, and validation when no Poller address is configured.

@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: 63f95dce-9f55-47c2-aaae-7805921ba97e

📥 Commits

Reviewing files that changed from the base of the PR and between 3e01c4f and 97c0ef3.

📒 Files selected for processing (4)
  • packages/composable/README.md
  • packages/composable/src/ComposableCowPoller.ts
  • packages/composable/src/types.ts
  • packages/composable/tests/ComposableCowPoller.spec.ts

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

Signed revocation support is added to ComposableCowPoller. The SDK now creates revoke EIP-712 data and encodes revokeWithSignature calldata. Tests and JIT Poller documentation cover the new flow.

Changes

Signed revocation

Layer / File(s) Summary
Revoke typed-data contract
packages/composable/src/types.ts, packages/composable/src/ComposableCowPoller.ts
Adds revoke typed-data parameters, the Revoke message definition, and getRevokeTypedData.
Signed revoke calldata
packages/composable/src/ComposableCowPoller.ts
Adds encodeRevokeWithSignature for authorization fields, deadline, and signature.
Revocation validation and documentation
packages/composable/tests/ComposableCowPoller.spec.ts, packages/composable/README.md
Tests typed-data hashes and decoded calldata across adapters. Documents signing and relayer submission.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to 97c0e

The SDK adds signed Poller schedule revocation payload and calldata support, with coverage for typed-data and encoded-call consistency. No concrete current-head merge-blocking risk remains.

Sequence Diagram(s)

sequenceDiagram
  participant Caller
  participant ComposableCowPoller
  participant Signer
  participant Relayer
  Caller->>ComposableCowPoller: request revoke typed data
  ComposableCowPoller-->>Caller: return Revoke typed data
  Caller->>Signer: sign typed data
  Signer-->>Caller: return signature
  Caller->>ComposableCowPoller: encode authorization and signature
  ComposableCowPoller-->>Caller: return signed revoke calldata
  Caller->>Relayer: submit signed calldata
Loading

Suggested reviewers: shoom3301

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding signed Poller revocation support in the composable package.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 3…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/composable-cow-poller-revoke-signature

Warning

Some tools did not complete. Review the errors below.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

packages/composable/src/ComposableCowPoller.ts

Parsing error: Unable to parse the specified 'tsconfig' file. Ensure it's correct and has valid syntax.

packages/app-data/tsconfig.json(2,14): error TS6053: File '@cow-sdk/typescript-config/base.json' not found.

packages/composable/src/types.ts

Parsing error: Unable to parse the specified 'tsconfig' file. Ensure it's correct and has valid syntax.

packages/app-data/tsconfig.json(2,14): error TS6053: File '@cow-sdk/typescript-config/base.json' not found.

packages/composable/tests/ComposableCowPoller.spec.ts

Parsing error: Unable to parse the specified 'tsconfig' file. Ensure it's correct and has valid syntax.

packages/app-data/tsconfig.json(2,14): error TS6053: File '@cow-sdk/typescript-config/base.json' not found.


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 Aug 4, 2026

Copy link
Copy Markdown
Contributor

📦 GitHub Packages Published

Last updated: Sep 7, 2026, 09:21:27 AM UTC

The following packages have been published to GitHub Packages with pre-release version pr-960-97c0ef3b:

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

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

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

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

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

# Conflicts:
#	packages/composable/README.md
#	packages/composable/src/ComposableCowPoller.ts
#	packages/composable/tests/ComposableCowPoller.spec.ts
@igorroncevic
igorroncevic force-pushed the feat/composable-cow-poller-revoke-signature branch from 9d0d1d3 to a65aab7 Compare August 6, 2026 12:35
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