Skip to content

feat: viem/tempo#4147

Merged
jxom merged 54 commits intomainfrom
tempo
Dec 16, 2025
Merged

feat: viem/tempo#4147
jxom merged 54 commits intomainfrom
tempo

Conversation

@jxom
Copy link
Copy Markdown
Member

@jxom jxom commented Dec 11, 2025

Added first-class support and extension for Tempo.


Attaching a Tempo chain to your client grants your transaction actions with Tempo superpowers like batched calls and external fee payer capabilities.

import { createClient, http } from 'viem'
import { privateKeyToAccount } from 'viem/accounts'
import { tempoTestnet } from 'viem/chains'

const client = createClient({
  account: privateKeyToAccount('0x…'),
  chain: tempoTestnet.extend({ feeToken: '0x20c00000000000000000000000000000000000fa' }),
  transport: http(),
})

const receipt = client.sendTransactionSync({
  calls: [
    { data: '0x…', to: '0x…' },
    { data: '0x…', to: '0x…' },
    { data: '0x…', to: '0x…' },
  ],
  feePayer: privateKeyToAccount('0x…'),
})

You can also use Tempo Actions to call to enshrined protocol features like the Stablecoin Token Factory:

import { createClient, http } from 'viem'
import { privateKeyToAccount } from 'viem/accounts'
import { tempoTestnet } from 'viem/chains'
import { tempoActions } from 'viem/tempo'

const client = createClient({
  account: privateKeyToAccount('0x…'),
  chain: tempoTestnet,
  transport: http(),
})
  .extend(tempoActions())

const { receipt, token } = await client.token.createSync({
  currency: 'USD',
  name: 'My Company USD',
  symbol: 'CUSD',
})

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Dec 11, 2025

🦋 Changeset detected

Latest commit: 06028d4

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

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

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

@socket-security
Copy link
Copy Markdown

socket-security bot commented Dec 11, 2025

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​vitest/​coverage-v8@​4.0.10 ⏵ 4.0.1599 +11006999100
Updatedvitest@​4.0.10 ⏵ 4.0.1597 -110079 +198 -1100
Addedtestcontainers@​11.10.0961008295100
Updatedprool@​0.0.24 ⏵ 0.2.18510010095 +2100
Updatedvocs@​1.1.0 ⏵ 1.3.189 +110089 +196 +1100
Added@​remix-run/​node-fetch-server@​0.12.010010010092100

View full report

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Dec 11, 2025

Open in StackBlitz

npm i https://pkg.pr.new/viem@4147

commit: 8045732

@jxom jxom marked this pull request as ready for review December 16, 2025 04:54
@jxom jxom merged commit 734d99d into main Dec 16, 2025
38 of 39 checks passed
@jxom jxom deleted the tempo branch December 16, 2025 05:27
@github-actions github-actions bot mentioned this pull request Dec 16, 2025
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.

1 participant