Skip to content

feat: add client.experimental_blockTag + chain.experimental_preconfirmationTime #3810

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Jul 20, 2025

Conversation

jxom
Copy link
Member

@jxom jxom commented Jul 20, 2025

Brings back 530f0f1 via a Client option (client.experimental_blockTag), and a chain.experimental_preconfirmationTime for chains that support preconfirmations (e.g. "Flashblocks").

Copy link

changeset-bot bot commented Jul 20, 2025

🦋 Changeset detected

Latest commit: dc54b78

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

Copy link

vercel bot commented Jul 20, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
viem ❌ Failed (Inspect) Jul 20, 2025 1:59pm

@jxom jxom changed the title feat: add client.blockTag feat: add client.blockTag + chain.preconfirmationTime Jul 20, 2025
@jxom jxom marked this pull request as ready for review July 20, 2025 09:00
@jxom jxom changed the title feat: add client.blockTag + chain.preconfirmationTime feat(experimental): add client.blockTag + chain.preconfirmationTime Jul 20, 2025
@jxom jxom changed the title feat(experimental): add client.blockTag + chain.preconfirmationTime feat: add client.experimental_blockTag + chain.experimental_preconfirmationTime Jul 20, 2025
Copy link
Contributor

github-actions bot commented Jul 20, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
import * from 'viem' (esm) 70.96 KB (0%) 1.5 s (0%) 2.6 s (+33.84% 🔺) 4 s
const viem = require('viem') (cjs) 87.8 KB (0%) 1.8 s (0%) 3.7 s (+35.71% 🔺) 5.5 s
import { createClient, http } from 'viem' 4.62 KB (0%) 93 ms (0%) 172 ms (-49.15% 🔽) 264 ms
import * from 'viem/account-abstraction' 53.2 KB (0%) 1.1 s (0%) 1.1 s (-1.65% 🔽) 2.2 s
import * from 'viem/accounts' 82.47 KB (0%) 1.7 s (0%) 1.2 s (+36.22% 🔺) 2.8 s
import { privateKeyToAccount } from 'viem/accounts' 21.04 KB (0%) 421 ms (0%) 646 ms (+45.71% 🔺) 1.1 s
import { mnemonicToAccount } from 'viem/accounts' 27.34 KB (0%) 547 ms (0%) 657 ms (-5.21% 🔽) 1.3 s
import * from 'viem/actions' 55.71 KB (0%) 1.2 s (0%) 1.4 s (-19.91% 🔽) 2.5 s
import { getBlockNumber } from 'viem/actions' 318 B (0%) 10 ms (0%) 107 ms (+2232.9% 🔺) 117 ms
import * from 'viem/chains' 48.03 KB (0%) 961 ms (0%) 1.2 s (-47.9% 🔽) 2.1 s
import { mainnet } from 'viem/chains' 325 B (0%) 10 ms (0%) 5 ms (-4.52% 🔽) 15 ms
import * from 'viem/chains/utils' 1.08 KB (0%) 22 ms (0%) 34 ms (-1.52% 🔽) 55 ms
import * from 'viem/ens' 47.87 KB (0%) 958 ms (0%) 722 ms (-16.19% 🔽) 1.7 s
import { getEnsAvatar } from 'viem/ens' 24.06 KB (0%) 482 ms (0%) 693 ms (-12.04% 🔽) 1.2 s
import * from 'viem/siwe' 33.14 KB (0%) 663 ms (0%) 1.2 s (+12.63% 🔺) 1.8 s
import { verifySiweMessage } from 'viem/siwe' 32.05 KB (0%) 641 ms (0%) 1.5 s (+77.21% 🔺) 2.2 s

@jxom jxom merged commit d02d1fa into main Jul 20, 2025
11 of 26 checks passed
@jxom jxom deleted the jxom/default-block-tag branch July 20, 2025 13:56
@github-actions github-actions bot mentioned this pull request Jul 19, 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