-
Notifications
You must be signed in to change notification settings - Fork 32
feat: use aws for token and chain images #724
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughToken/logo asset URLs were migrated from GitHub raw URLs to files.cow.fi; one exported constant ( Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (4)
🧰 Additional context used🧠 Learnings (1)📚 Learning: 2025-11-06T11:26:21.337ZApplied to files:
🧬 Code graph analysis (4)packages/bridging/src/providers/mock/HookMockBridgeProvider.ts (1)
packages/bridging/src/providers/mock/ReceiverAccountMockBridgeProvider.ts (1)
packages/bridging/src/providers/mock/BaseMockBridgeProvider.ts (1)
packages/bridging/src/const.ts (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
🔇 Additional comments (4)
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. Comment |
📦 GitHub Packages PublishedLast updated: Dec 3, 2025, 01:07:51 PM UTC The following packages have been published to GitHub Packages with pre-release version
InstallationThese packages require authentication to install from GitHub Packages. First, create a # 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" >> .npmrcTo get your GitHub token:
Then install any of the packages above, either by exact version (i.e. # Yarn
yarn add npm:@cowprotocol/cow-sdk@pr-724
# pnpm
pnpm install npm:@cowprotocol/cow-sdk@pr-724
# NPM
npm install npm:@cowprotocol/cow-sdk@pr-724Update 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-sdkView PackagesYou can view the published packages at: https://github.com/cowprotocol/cow-sdk/packages |
There was a problem hiding this 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
🧹 Nitpick comments (3)
examples/react/viem/src/components/SwapForm/index.tsx (1)
18-25: USDC_SEPOLIA logo URL migration looks consistent with new token-list hostThe new
logoUrlpoints to thefiles.cow.fi/token-lists/images/...path, which matches the pattern used inTOKEN_LIST_IMAGES_PATH-derived URLs elsewhere. As an optional cleanup, you could centralize the base URL (if exported from@cowprotocol/cow-sdk) to avoid future drift between examples and config constants.examples/react/ethers5/src/components/SwapForm/index.tsx (1)
17-25: Aligns with shared token-list image base; consider avoiding hard‑coded baseThis
logoUrlnow matches thefiles.cow.fi/token-lists/images/...pattern used in config, which is good for consistency. Optionally, ifTOKEN_LIST_IMAGES_PATH(or similar) is available from@cowprotocol/cow-sdk, you could build this URL from that constant to reduce duplication across the different SwapForm examples.examples/react/ethers6/src/components/SwapForm/index.tsx (1)
17-25: Consistent USDC_SEPOLIA logo URL across all SwapForm variantsThis
logoUrlnow matches thefiles.cow.fi/token-lists/images/...pattern and is consistent with the viem and ethers5 examples. Optionally, to avoid three hard‑coded copies of the same base URL, you could derive this from a shared constant (if exported) to keep examples in sync with config.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
examples/react/ethers5/src/components/SwapForm/index.tsx(1 hunks)examples/react/ethers6/src/components/SwapForm/index.tsx(1 hunks)examples/react/viem/src/components/SwapForm/index.tsx(1 hunks)packages/config/src/constants/path.ts(0 hunks)packages/config/src/constants/paths.ts(1 hunks)packages/config/src/constants/tokens.ts(1 hunks)
💤 Files with no reviewable changes (1)
- packages/config/src/constants/path.ts
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-08-12T09:15:28.459Z
Learnt from: alfetopito
Repo: cowprotocol/cow-sdk PR: 391
File: src/trading/getEthFlowTransaction.ts:80-85
Timestamp: 2025-08-12T09:15:28.459Z
Learning: In the CoW SDK codebase, ETH_FLOW_ADDRESSES and BARN_ETH_FLOW_ADDRESSES are typed as Record<SupportedChainId, string>, which requires all SupportedChainId enum values to have corresponding string entries. TypeScript compilation will fail if any chainId is missing from these mappings, making runtime guards for missing addresses unnecessary in these specific cases.
Applied to files:
packages/config/src/constants/tokens.ts
📚 Learning: 2025-11-06T11:26:21.337Z
Learnt from: shoom3301
Repo: cowprotocol/cow-sdk PR: 642
File: packages/bridging/src/BridgingSdk/BridgingSdk.ts:124-144
Timestamp: 2025-11-06T11:26:21.337Z
Learning: In the cow-sdk bridging module (packages/bridging/), all bridge providers return ChainInfo objects that are singleton instances imported from cowprotocol/sdk-config. The chain objects (mainnet, arbitrumOne, base, optimism, polygon, avalanche, gnosisChain, etc.) are exported as constants from packages/config/src/chains/details/ and are shared across all providers. This singleton pattern makes object reference comparison (e.g., with Array.includes()) safe for deduplicating networks returned by multiple providers, as the same chain will always be represented by the same object reference.
<!--
Applied to files:
packages/config/src/constants/paths.ts
🔇 Additional comments (1)
packages/config/src/constants/tokens.ts (1)
4-6: TOKEN_LIST_IMAGES_PATH host switch is consistent; bucket layout verifiedSwitching
TOKEN_LIST_IMAGES_PATHtohttps://files.cow.fi/token-lists/imageskeeps the same${chainId}/${address.toLowerCase()}/logo.pngpattern. The new bucket structure is verified—WETH, USDC, and native currency logos all resolve correctly on mainnet.
shoom3301
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checked the new URLs, everyting is valid
Summary
This change removes all references to
raw.githubusercontent.comand replaces them withfiles.cow.fi/cow-sdkBlocked by #723
Testing
Background
This PR is part of https://linear.app/cowswap/issue/COW-136/token-lists-cdn
Moving away from our reliance on github CDN.
This is no longer viable as Github recently changed their rate limiting policy for non-logged in users.
Related PRs:
cowprotocol/cowswap#6591
#723
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.