Skip to content

feat: export high market cap assets#320

Draft
its-everdred wants to merge 5 commits intomainfrom
feat/high-marketcap-assets
Draft

feat: export high market cap assets#320
its-everdred wants to merge 5 commits intomainfrom
feat/high-marketcap-assets

Conversation

@its-everdred
Copy link
Collaborator

Closes #210

Summary

  • Add ~40 popular Asset constants to constants/assets.ts (top market cap ERC-20s on Ethereum/L2s + ether.fi ecosystem tokens)
  • Remove SUPPORTED_TOKENS internal allowlist — ActionsConfig.assets.allow is now the sole authority for which assets are active
  • TokenBalance now uses asset: Asset instead of symbol: string, and chains object keyed by chainId instead of chainBalances array
  • Standardize amount naming: Wei suffix → Raw suffix everywhere (amountInWeiamountInRaw, balanceRaw, etc.)
  • Morpho rewards keyed by token address instead of symbol (prevents spoofed-symbol collisions)
  • Wire supportedAssets through all React wallet providers (Dynamic, Privy, Turnkey)

New asset exports

Stablecoins: USDT, DAI, FRAX, USDE, PYUSD, SKY
Wrapped/staked: WBTC, CBBTC, STETH, WSTETH, RETH, CBETH, EETH, WEETH, ETHFI
DeFi: AAVE, UNI, LINK, CRV, SNX, COMP, BAL, SUSHI, ONEINCH, PENDLE, MKR, LDO, RPL, GRT, ENS
L1/L2: OP, ARB, POL, RENDER, WLD, ONDO, ENA
Meme: SHIB, PEPE

Test plan

  • pnpm --filter @eth-optimism/actions-sdk test — 340 tests pass, 0 failures
  • pnpm --filter @eth-optimism/actions-sdk build — clean build
  • pnpm --filter @eth-optimism/actions-service build — clean build
  • pnpm --filter actions-ui build — clean build
  • pnpm --filter @eth-optimism/actions-sdk lint — 0 errors (pre-existing warnings only)

@netlify
Copy link

netlify bot commented Mar 18, 2026

Deploy Preview for actions-ui ready!

Name Link
🔨 Latest commit 2f0abc2
🔍 Latest deploy log https://app.netlify.com/projects/actions-ui/deploys/69bdba4a07500600085996c2
😎 Deploy Preview https://deploy-preview-320--actions-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@its-applekid
Copy link

Review Notes

Architecture:
✅ Removing SUPPORTED_TOKENS internal allowlist is clean — single source of truth via ActionsConfig.assets.allow
✅ Flat named exports are tree-shakeable and ergonomic
✅ All tests pass (340/340)

Breaking Changes:
⚠️ TokenBalance structure change:

  • amountInWeiamountInRaw (standardized naming)
  • chainBalances: Arraychains: Record<chainId, ...> (keyed by chainId)
  • Morpho rewards now keyed by token address (not symbol)

This is a significant API surface change. Consider:

  • Version bump (minor or major?)
  • Migration guide for existing SDK users
  • Changelog highlighting breaking changes

Security:
🔒 Adding 40+ token addresses across multiple chains

  • Each address should be independently verified (CoinGecko + block explorers)
  • Typos could lead to loss of funds
  • Consider adding a verification checklist to PR (or comments with verification sources)

Suggestion:
Add inline comments in constants/assets.ts citing the verification source for each address (e.g., // Verified: etherscan.io/token/0x...)

DRY:
No major duplication spotted — looks clean.

Test Coverage:
✅ Tests updated for new structure
Consider adding explicit tests for:

  • Address correctness (on-chain token symbol/decimals match expectations)
  • Cross-chain consistency (same token, different chains)

Ready for merge?
After address verification + migration notes, yes.

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.

SDK should export high marketcap assets

2 participants