Skip to content

feat(tokens): add chainId to ResolvedToken, add OUSD on Tempo Moderato - #5488

Merged
tmm merged 2 commits into
mainfrom
feat/resolved-token-chain-id
Nov 11, 2026
Merged

tmm merged 2 commits into
mainfrom
feat/resolved-token-chain-id

Conversation

@brendanjryan

Copy link
Copy Markdown
Collaborator

Summary

  • ResolvedToken now carries chainId. token(chainId) already has it, so a resolved token outside a Client (SDK config, allowlists, asset metadata) no longer loses which chain its address belongs to. ousd(4217).chainId is typed as the literal 4217.
  • The two internal resolveTokenForChain helpers (actions/token/internal.ts, tempo/internal/utils.ts) call token(chainId) instead of copying fields by hand, so every ResolvedToken has the same shape.
  • ousd gains its Tempo Moderato (42431) address. It's the same address as mainnet; on-chain it reports symbol OUSD, 6 decimals, currency USD, name OpenUSD, and the Moderato tokenlist (api.tempo.xyz/v1/tokenlist?chainId=42431) lists it. ousd.ts is hand-authored, so gen:tokenlist never added it.

ResolvedToken is only a return type in Viem, so adding a field doesn't break Viem's own APIs.

Checks

  • pnpm test --run src/tokens and the token type tests pass (snapshots updated for chainId).
  • pnpm check:types: no new errors; the remaining ones are from contracts/generated.js, which needs pnpm contracts:build (Foundry).

@vercel

vercel Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
viem Error Error Nov 11, 2026 7:06pm UTC

Request Review

@changeset-bot

changeset-bot Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c59d1e7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
viem Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-11T18:55:29.280387Z 2e2712c PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Published [email protected] under the pr-5488 dist-tag, which follows this pull request until it closes.

pnpm add viem@pr-5488
pnpm add [email protected]

@tmm
tmm merged commit 5c6a920 into main Nov 11, 2026
39 of 40 checks passed
@tmm
tmm deleted the feat/resolved-token-chain-id branch November 11, 2026 19:21
@github-actions github-actions Bot mentioned this pull request Nov 11, 2026

This branch had an error being deployed

1 failed deployment
Preview — c59d1e79 Deployed Nov 11, 2026 by vercel[bot]
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