Skip to content

feat(COW-163): Update cow-sdk version, add default RPC and run script for Ink#1307

Merged
alfetopito merged 8 commits intomainfrom
feat/cow-163-ink-network-support
Feb 2, 2026
Merged

feat(COW-163): Update cow-sdk version, add default RPC and run script for Ink#1307
alfetopito merged 8 commits intomainfrom
feat/cow-163-ink-network-support

Conversation

@Danziger
Copy link
Contributor

@Danziger Danziger commented Jan 28, 2026

Summary by CodeRabbit

  • New Features

    • Added support for the INK chain (ID 57073): RPC endpoint, explorer, display name, market mapping, network option in forms, and included INK token lists/permit data.
  • Chores

    • Added scripts to fetch/recheck permit info.
    • Updated @cowprotocol/cow-sdk to v7.3.1.
    • Enabled improved ts-node logging/formatting, added .env example, expanded .gitignore, updated README and CI to include INK.

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 28, 2026

📝 Walkthrough

Walkthrough

Add INK (chainId 57073) across configs, scripts, CI, token lists, and auxiliary mappings: RPC URL, NETWORK_CONFIG, CoinGecko/display name, new npm scripts for INK permit fetching, new public token and permit JSONs, ts-node options, .env example and gitignore entries, and an SDK version bump.

Changes

Cohort / File(s) Summary
RPC & permit constants
src/permitInfo/const.ts
Added [SupportedChainId.INK]https://rpc-ten.inkonchain.com to DEFAULT_RPC_URLS.
Public token & permit lists
src/public/CoinGecko.57073.json, src/public/Uniswap.57073.json, src/public/PermitInfo.57073.json
Added token-list and PermitInfo JSON files for chainId 57073 (Ink).
NPM scripts & dependency
package.json
Added fetchPermitInfo:ink and recheckPermitInfo:ink scripts; bumped @cowprotocol/cow-sdk 7.1.0 → 7.3.1.
Aux lists & display names
src/scripts/auxLists/utils.ts
Registered CoinGecko key 'ink' and display name 'Ink' for SupportedChainId.INK.
Network config in scripts
scripts/processRequest.mjs
Added INK entry to NETWORK_CONFIG with chainId: 57073 and explorer explorer.inkonchain.com.
Token list loader path
src/permitInfo/utils/getTokensFromTokenList.ts
Non-HTTP path now resolves tokenListPath via join(BASE_PATH, tokenListPath) when provided.
CI / Workflow
.github/workflows/updatePermitInfo.yml
Added 57073 to workflow matrix.chainId.
Issue templates
.github/ISSUE_TEMPLATE/*
Added INK to network dropdowns; one template removed an address input and adjusted network options.
ts-node options
tsconfig.json
Enabled ts-node.logError and ts-node.pretty (kept esm: true).
Env & gitignore
.env.example, .gitignore
Added COINGECKO_API_KEY= example; ignored .env, .env.local, .env.*.local.
README & docs
README.md
Updated Node prerequisite to v18; added "Adding a new network" guidance and included Ink (57073) in examples.
Formatting-only
src/scripts/downloadImages.js
Whitespace/formatting adjustments only.
Token mapping tweak
src/scripts/mapTokenListToBridge.ts
Gnosis mapping methodName changed: calculateL2TokenAddressbridgedTokenAddress.

Sequence Diagram(s)

sequenceDiagram
  participant CI as CI (GitHub Actions)
  participant Repo as Repository
  participant Script as fetchPermitInfo:ink
  participant RPC as INK RPC\n(rpc-ten.inkonchain.com)
  participant CoinGecko as CoinGecko API
  participant FS as File System

  CI->>Repo: workflow triggers (matrix includes 57073)
  CI->>Script: run `fetchPermitInfo:ink`
  Script->>RPC: query chain data (57073)
  Script->>CoinGecko: request token metadata for 'ink'
  Script->>FS: write `src/public/CoinGecko.57073.json` & `src/public/PermitInfo.57073.json`
  FS-->>Repo: updated files staged/committed
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • alfetopito
  • shoom3301

Poem

🐰 I hopped to INK with nimble paws,
RPC, lists, and scripts—no pause,
CI hums, token files unfurled,
SDK nudged to join the world,
A tiny rabbit stamps: all set—hooray! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main changes: updating cow-sdk version, adding default RPC support, and adding a run script for Ink network support, which aligns with the changeset.

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


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

socket-security bot commented Jan 28, 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/​cow-sdk@​7.1.0 ⏵ 7.3.179 +110010099 +1100

View full report

@github-actions
Copy link
Contributor

github-actions bot commented Jan 28, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

Copy link
Contributor

@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: 1

🤖 Fix all issues with AI agents
In `@package.json`:
- Around line 52-54: The package.json references an unpublished pre-release
"@cowprotocol/cow-sdk": "7.3.0"; change that dependency to the latest published
release "7.2.13" (or the correct published version you intend) in package.json,
then run your package manager to update lockfiles (npm/yarn/pnpm) and verify
imports/usages of `@cowprotocol/cow-sdk` in your scripts compile and tests pass;
if 7.3.0 was intentional, replace the version with a published tag (or add a
clear comment and registry configuration) and ensure the registry contains that
pre-release before merging.

Comment on lines 52 to 54
"dependencies": {
"@cowprotocol/cow-sdk": "7.1.0",
"@cowprotocol/cow-sdk": "7.3.0",
"@cowprotocol/permit-utils": "^0.7.0-RC.1",
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🌐 Web query:

@cowprotocol/cow-sdk 7.3.0 release notes changelog breaking changes

💡 Result:

As of January 28, 2026, there is no published GitHub Release/Tag for @cowprotocol/cow-sdk version 7.3.0 in the cowprotocol/cow-sdk repository (so there are no official 7.3.0 release notes / changelog / breaking-changes entry to reference). The latest published cow-sdk release visible on GitHub is:

  • cow-sdk: v7.2.13 (2026-01-22) — release notes list dependency bumps only and do not mention breaking changes. [1]

If you meant a different artifact (e.g., an npm prerelease tag like 7.3.0-beta.x), tell me the exact version string and where you saw it (npm, GitHub, etc.), and I can look up that changelog.

Sources: [1]


🏁 Script executed:

# Examine the full package.json to understand current dependencies and peer deps
cat package.json

Repository: cowprotocol/token-lists

Length of output: 4094


🏁 Script executed:

# Check if there are any scripts that depend on cow-sdk
rg "cow-sdk" --type json --type ts --type js -A 2 -B 2 | head -50

Repository: cowprotocol/token-lists

Length of output: 3174


@cowprotocol/cow-sdk 7.3.0 is not a published release. The latest available version is v7.2.13 (2026-01-22). Verify whether 7.3.0 is an intentional pre-release version or a version mismatch, as release notes and peer dependency requirements cannot be confirmed for an unpublished version. Multiple scripts depend on this package (src/scripts/auxLists/, src/scripts/lp-tokens/, src/permitInfo/*), so the intended version must be clarified and available in the package registry.

🤖 Prompt for AI Agents
In `@package.json` around lines 52 - 54, The package.json references an
unpublished pre-release "@cowprotocol/cow-sdk": "7.3.0"; change that dependency
to the latest published release "7.2.13" (or the correct published version you
intend) in package.json, then run your package manager to update lockfiles
(npm/yarn/pnpm) and verify imports/usages of `@cowprotocol/cow-sdk` in your
scripts compile and tests pass; if 7.3.0 was intentional, replace the version
with a published tag (or add a clear comment and registry configuration) and
ensure the registry contains that pre-release before merging.

@Danziger
Copy link
Contributor Author

I have read the CLA Document and I hereby sign the CLA

github-actions bot added a commit that referenced this pull request Jan 28, 2026
Copy link
Contributor

@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: 1

🤖 Fix all issues with AI agents
In @.env.example:
- Line 1: The file ends without a trailing newline; add a single newline
character after the final line so the file ends with a blank line (i.e., ensure
the COINGECKO_API_KEY= line is followed by a newline/linefeed at EOF).

@@ -0,0 +1 @@
COINGECKO_API_KEY= No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Add a trailing newline.

The file is missing a trailing newline at the end. Text files should end with a newline character per POSIX standards to ensure consistent behavior across tools and editors.

📝 Proposed fix
-COINGECKO_API_KEY=
+COINGECKO_API_KEY=
+

(Add a blank line after the last line)

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
COINGECKO_API_KEY=
COINGECKO_API_KEY=
🧰 Tools
🪛 dotenv-linter (4.0.0)

[warning] 1-1: [EndingBlankLine] No blank line at the end of the file

(EndingBlankLine)

🤖 Prompt for AI Agents
In @.env.example at line 1, The file ends without a trailing newline; add a
single newline character after the final line so the file ends with a blank line
(i.e., ensure the COINGECKO_API_KEY= line is followed by a newline/linefeed at
EOF).

Copy link
Contributor

@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: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/ISSUE_TEMPLATE/3-removeTokenForm.yml (1)

24-35: Fix network naming mismatch: template uses GNOSIS_CHAIN, code expects GNOSIS.

The issue templates list GNOSIS_CHAIN as an option, but NETWORK_CONFIG in processRequest.mjs uses the key GNOSIS. When an issue is submitted with GNOSIS_CHAIN, applyNetworkConfig will fail because the lookup NETWORK_CONFIG[values.network] returns undefined, triggering the error "No valid network found."

Align the template options with the NETWORK_CONFIG keys or add a mapping layer to handle the mismatch.

@Danziger Danziger requested review from a team January 29, 2026 14:04
@elena-zh
Copy link
Contributor

hey @Danziger , could you please describe testing steps here?

@alfetopito alfetopito removed the request for review from a team January 29, 2026 16:30
@alfetopito
Copy link
Collaborator

hey @Danziger , could you please describe testing steps here?

No QA needed/applicable here.
You'll see the changes here on CoW Swap once it's merged.

Copy link
Collaborator

@alfetopito alfetopito left a comment

Choose a reason for hiding this comment

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

Looks good, just 2 comments.

Remember to test the issue templates after merging them by adding some ink tokens.
For example, the wrapped native token for the chain.

bridgeContractAddress: OMNIBRIDGE_ADDRESS,
bridgeContractAbi: OMNIBRIDGE_CONTRACT_ABI,
methodName: 'calculateL2TokenAddress',
methodName: 'bridgedTokenAddress',
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this change needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not really, but I just noticed OMNIBRIDGE_CONTRACT_ABI doesn't define a calculateL2TokenAddress method, only bridgedTokenAddress.

Co-authored-by: Leandro <alfetopito@users.noreply.github.com>
@alfetopito alfetopito merged commit 015d344 into main Feb 2, 2026
6 checks passed
@alfetopito alfetopito deleted the feat/cow-163-ink-network-support branch February 2, 2026 11:30
@github-actions github-actions bot locked and limited conversation to collaborators Feb 2, 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.

3 participants