feat(tokens): add USDT token definition#4836
Open
viral-sangani wants to merge 1 commit into
Open
Conversation
Adds a multi-chain `usdt` token definition to `viem/tokens`, mirroring the existing `usdc` definition. Covers native Tether USD (6 decimals) on mainnet, optimism, base, celo, avalanche, linea, and scroll. All addresses verified on-chain (name/symbol/decimals) before inclusion. Chains where the canonical deployment is USDT0 or a bridged variant, or uses non-6 decimals (e.g. BSC at 18), are intentionally excluded.
🦋 Changeset detectedLatest commit: 703361e The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
|
@viral-sangani is attempting to deploy a commit to the Wevm Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a multi-chain
usdttoken definition toviem/tokens, mirroring the existingusdcdefinition. This lets consumers reference Tether USD through the first-class tokens API (import { usdt } from 'viem/tokens') instead of hand-rolling their own token types.What's included
usdtcovers native Tether USD (6 decimals) on the following chains:0xdAC17F958D2ee523a2206206994597C13D831ec70x94b008aA00579c1307B0EF2c499aD98a8ce58e580xfde4C96c8593536E31F229EA8f37b2ADa2699bb20x48065fbBE25f71C9282ddf5e1cD6D6A887483D5e0x9702230A8Ea53601f5cD2dc00fDBc13d4dF4A8c70xA219439258ca9da29E9Cc4cE5596924745e12B930xf55BEC9cafDbE8730f096Aa55dad6D22d44099DfVerification
Every address was checked on-chain (
name()/symbol()/decimals()) before inclusion. Chains were intentionally excluded where the canonical deployment is not native 6-decimal Tether USD:defineToken's singledecimalsfield.usdt0definition), not native Tether.USDT.kava(bridged), not native Tether.Kept conservative on purpose; happy to add more chains if maintainers prefer broader coverage.
Notes
usdc.ts(no generated banner, sopnpm gen:tokenlistleaves it untouched).popular: true, matching USDC.patch).Checklist
pnpm vitest run src/tokens/) — includes theindex.tsexports snapshot updated forusdt.biome check).tsc --noEmit).