Skip to content

feat(tempo): add simulateBlocks with TIP-20 token metadata#4473

Closed
decofe wants to merge 1 commit intowevm:mainfrom
tempoxyz:georgios/tempo-simulate-v1
Closed

feat(tempo): add simulateBlocks with TIP-20 token metadata#4473
decofe wants to merge 1 commit intowevm:mainfrom
tempoxyz:georgios/tempo-simulate-v1

Conversation

@decofe
Copy link
Copy Markdown
Contributor

@decofe decofe commented Apr 8, 2026

Adds a Tempo-specific simulateBlocks action that calls tempo_simulateV1 instead of eth_simulateV1. Returns the standard simulation result plus a tokenMetadata map with TIP-20 token info (name, symbol, decimals, currency) for all tokens in Transfer logs — single roundtrip instead of two.

Available via client.simulateBlocks() when using tempoActions() or directly as Actions.simulate.simulateBlocks().

const client = createClient({
  chain: tempo(),
  transport: http(),
}).extend(tempoActions())

const result = await client.simulateBlocks({
  blocks: [{ calls: [{ to: tokenAddr, data: '0x...' }] }],
  traceTransfers: true,
})

result.tokenMetadata['0x20c0...']
// => { name: 'Path USD', symbol: 'pUSD', decimals: 6, currency: 'USD' }

Server-side implementation: tempoxyz/tempo#3449

Prompted by: georgios

Adds a Tempo-specific `simulateBlocks` action that calls
`tempo_simulateV1` instead of `eth_simulateV1`. Returns the
standard simulation result plus a `tokenMetadata` map with TIP-20
token info (name, symbol, decimals, currency) for all tokens in
Transfer logs — single roundtrip.

Available via `client.simulateBlocks()` when using `tempoActions()`
or directly as `Actions.simulate.simulateBlocks()`.

Co-Authored-By: Georgios Konstantopoulos <17802178+gakonst@users.noreply.github.com>
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 8, 2026

@decofe is attempting to deploy a commit to the Wevm Team on Vercel.

A member of the Team first needs to authorize it.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 8, 2026

⚠️ No Changeset found

Latest commit: be9b196

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 8, 2026

Open in StackBlitz

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

commit: be9b196

@jxom jxom closed this Apr 10, 2026
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