chore: bump viem floor to ^2.48.11 across monorepo + refresh lockfiles#2242
Merged
phdargen merged 1 commit intox402-foundation:mainfrom May 8, 2026
Merged
Conversation
Tightens the viem floor in every package.json that lists viem (41 refs across 40 files), refreshes all three lockfiles so every direct viem resolution reads 2.48.11, and regenerates the paywall bundled templates so the EVM/SVM/AVM bundles match the new viem chain database. ## Why floor-tightening matters PR x402-foundation#2013 bumped lockfiles to 2.47.14, but later PRs (x402-foundation#2061, x402-foundation#2197, ...) added sub-packages with ^2.39.x / ^2.43.x floors. pnpm re-resolved on subsequent installs and the solver picked the lowest acceptable version across constraints. ^-ranges with low floors do NOT preserve a bump -- lockfile refreshes erode the floor. This PR fixes that incomplete tightening from x402-foundation#2013 by raising every floor to ^2.48.11. The same regression will recur if any future PR adds a viem-using sub-package with a lower floor. Gate criterion: new packages must use ^2.48.11 (or tighter) for viem. ## Acceptance verification - pnpm install --frozen-lockfile clean across typescript/, examples/typescript/, and e2e/. - pnpm format:check, lint:check, build, test green for typescript/. - pnpm format:check, lint:check green for examples/typescript/. - All direct viem resolutions read 2.48.11 in all three workspaces. - Paywall bundled templates regenerated via pnpm --filter @x402/paywall run build:paywall.
|
@ryanRfox is attempting to deploy a commit to the Coinbase Team on Vercel. A member of the Team first needs to authorize it. |
ryanRfox
added a commit
to ryanRfox/x402
that referenced
this pull request
May 8, 2026
…BLECOINS
Makes the e2e harness portable to any EVM chain in the SDK's
DEFAULT_STABLECOINS catalog. The visible knob is --evm-network=<caip2>;
the rest is the plumbing that makes the knob actually work.
Four interlocking pieces:
1. CLI override - --evm-network=<caip2> selects the EVM chain for a run.
Mode-default behavior preserved when the flag is omitted.
2. SDK-imported chain registry - EVM_NETWORK_CONFIGS is derived from
DEFAULT_STABLECOINS at module load via Object.fromEntries(...), replacing
the prior 10-entry hand-curated table. New SDK chains propagate after
pnpm install with no harness edit.
3. Removes Base Sepolia hardcodes - EIP-712 token names in the four EVM
resource servers (express, fastify, hono, next/proxy) move to a per-server
EVM_PERMIT2_ASSET_NAMES lookup keyed by EVM_NETWORK. The Permit2 approval
script reads its target from the resolved network config. The mock
facilitator advertises the full scheme set (exact, upto, batch-settlement)
and gates non-EVM kinds on env presence.
4. EVM-only credential gating - an EVM-only run (--families=evm) no longer
requires Solana, Aptos, Hedera, or Stellar wallets. The harness's
existing requiredEnvByFamily post-filter check (test.ts line ~660)
handles this uniformly across all five families; the unconditional
EVM+SVM gate that fired before scenario filtering and over-required both
families is removed.
resolveViemChain(caip2) looks up viem's chain database; for chains viem
hasn't packaged it falls through to defineChain({ name: 'EVM <id>',
rpcUrls: { default: { http: [] } } }) and the caller supplies EVM_RPC_URL.
With the viem floor at ^2.48.11, every chain currently in DEFAULT_STABLECOINS
is in viem's catalog, so the fallback is for forward-compatibility with
future SDK chains that out-pace viem.
evmRpcUrl(caip2) resolves in three tiers: EVM_RPC_URL env override -> viem
chain default -> ''. getNetworkSet(mode, evmCaip2?) accepts an optional
CAIP-2 EVM override that overlays the mode default's EVM slot from
EVM_NETWORK_CONFIGS.
Migration: CI configurations that set per-chain RPC URL env vars (e.g.,
BASE_SEPOLIA_RPC_URL) must migrate to the unified EVM_RPC_URL. The harness
selects the chain via --evm-network=<caip2> (or the mode default) and reads
RPC override from EVM_RPC_URL only. No impact on SDK consumers using the
published packages.
The complementary monorepo-wide viem floor bump is in x402-foundation#2242.
4 tasks
ryanRfox
added a commit
to ryanRfox/x402
that referenced
this pull request
May 8, 2026
…BLECOINS
Makes the e2e harness portable to any EVM chain in the SDK's
DEFAULT_STABLECOINS catalog. The visible knob is --evm-network=<caip2>;
the rest is the plumbing that makes the knob actually work.
Four interlocking pieces:
1. CLI override - --evm-network=<caip2> selects the EVM chain for a run.
Mode-default behavior preserved when the flag is omitted.
2. SDK-imported chain registry - EVM_NETWORK_CONFIGS is derived from
DEFAULT_STABLECOINS at module load via Object.fromEntries(...), replacing
the prior 10-entry hand-curated table. New SDK chains propagate after
pnpm install with no harness edit.
3. Removes Base Sepolia hardcodes - EIP-712 token names in the four EVM
resource servers (express, fastify, hono, next/proxy) move to a per-server
EVM_PERMIT2_ASSET_NAMES lookup keyed by EVM_NETWORK. The Permit2 approval
script reads its target from the resolved network config. The mock
facilitator advertises the full scheme set (exact, upto, batch-settlement)
and gates non-EVM kinds on env presence.
4. EVM-only credential gating - an EVM-only run (--families=evm) no longer
requires Solana, Aptos, Hedera, or Stellar wallets. The harness's
existing requiredEnvByFamily post-filter check (test.ts line ~660)
handles this uniformly across all five families; the unconditional
EVM+SVM gate that fired before scenario filtering and over-required both
families is removed.
resolveViemChain(caip2) looks up viem's chain database; for chains viem
hasn't packaged it falls through to defineChain({ name: 'EVM <id>',
rpcUrls: { default: { http: [] } } }) and the caller supplies EVM_RPC_URL.
With the viem floor at ^2.48.11, every chain currently in DEFAULT_STABLECOINS
is in viem's catalog, so the fallback is for forward-compatibility with
future SDK chains that out-pace viem.
evmRpcUrl(caip2) resolves in three tiers: EVM_RPC_URL env override -> viem
chain default -> ''. getNetworkSet(mode, evmCaip2?) accepts an optional
CAIP-2 EVM override that overlays the mode default's EVM slot from
EVM_NETWORK_CONFIGS.
Migration: CI configurations that set per-chain RPC URL env vars (e.g.,
BASE_SEPOLIA_RPC_URL) must migrate to the unified EVM_RPC_URL. The harness
selects the chain via --evm-network=<caip2> (or the mode default) and reads
RPC override from EVM_RPC_URL only. No impact on SDK consumers using the
published packages.
The complementary monorepo-wide viem floor bump is in x402-foundation#2242.
ryanRfox
added a commit
to ryanRfox/x402
that referenced
this pull request
May 8, 2026
…BLECOINS
Makes the e2e harness portable to any EVM chain in the SDK's
DEFAULT_STABLECOINS catalog. The visible knob is --evm-network=<caip2>;
the rest is the plumbing that makes the knob actually work.
Four interlocking pieces:
1. CLI override - --evm-network=<caip2> selects the EVM chain for a run.
Mode-default behavior preserved when the flag is omitted.
2. SDK-imported chain registry - EVM_NETWORK_CONFIGS is derived from
DEFAULT_STABLECOINS at module load via Object.fromEntries(...), replacing
the prior 10-entry hand-curated table. New SDK chains propagate after
pnpm install with no harness edit.
3. Removes Base Sepolia hardcodes - EIP-712 token names in the four EVM
resource servers (express, fastify, hono, next/proxy) move to a per-server
EVM_PERMIT2_ASSET_NAMES lookup keyed by EVM_NETWORK. The Permit2 approval
script reads its target from the resolved network config. The mock
facilitator advertises the full scheme set (exact, upto, batch-settlement)
and gates non-EVM kinds on env presence.
4. EVM-only credential gating - an EVM-only run (--families=evm) no longer
requires Solana, Aptos, Hedera, or Stellar wallets. The harness's
existing requiredEnvByFamily post-filter check (test.ts line ~660)
handles this uniformly across all five families; the unconditional
EVM+SVM gate that fired before scenario filtering and over-required both
families is removed.
resolveViemChain(caip2) looks up viem's chain database; for chains viem
hasn't packaged it falls through to defineChain({ name: 'EVM <id>',
rpcUrls: { default: { http: [] } } }) and the caller supplies EVM_RPC_URL.
With the viem floor at ^2.48.11, every chain currently in DEFAULT_STABLECOINS
is in viem's catalog, so the fallback is for forward-compatibility with
future SDK chains that out-pace viem.
evmRpcUrl(caip2) resolves in three tiers: EVM_RPC_URL env override -> viem
chain default -> ''. getNetworkSet(mode, evmCaip2?) accepts an optional
CAIP-2 EVM override that overlays the mode default's EVM slot from
EVM_NETWORK_CONFIGS.
Migration: CI configurations that set per-chain RPC URL env vars (e.g.,
BASE_SEPOLIA_RPC_URL) must migrate to the unified EVM_RPC_URL. The harness
selects the chain via --evm-network=<caip2> (or the mode default) and reads
RPC override from EVM_RPC_URL only. No impact on SDK consumers using the
published packages.
The complementary monorepo-wide viem floor bump is in x402-foundation#2242.
ryanRfox
added a commit
to ryanRfox/x402
that referenced
this pull request
May 8, 2026
…BLECOINS
Makes the e2e harness portable to any EVM chain in the SDK's
DEFAULT_STABLECOINS catalog. The visible knob is --evm-network=<caip2>;
the rest is the plumbing that makes the knob actually work.
Four interlocking pieces:
1. CLI override - --evm-network=<caip2> selects the EVM chain for a run.
Mode-default behavior preserved when the flag is omitted.
2. SDK-imported chain registry - EVM_NETWORK_CONFIGS is derived from
DEFAULT_STABLECOINS at module load via Object.fromEntries(...), replacing
the prior 10-entry hand-curated table. New SDK chains propagate after
pnpm install with no harness edit.
3. Removes Base Sepolia hardcodes - EIP-712 token names in the four EVM
resource servers (express, fastify, hono, next/proxy) move to a per-server
EVM_PERMIT2_ASSET_NAMES lookup keyed by EVM_NETWORK. The Permit2 approval
script reads its target from the resolved network config. The mock
facilitator advertises the full scheme set (exact, upto, batch-settlement)
and gates non-EVM kinds on env presence.
4. EVM-only credential gating - an EVM-only run (--families=evm) no longer
requires Solana, Aptos, Hedera, or Stellar wallets. The harness's
existing requiredEnvByFamily post-filter check (test.ts line ~660)
handles this uniformly across all five families; the unconditional
EVM+SVM gate that fired before scenario filtering and over-required both
families is removed.
resolveViemChain(caip2) looks up viem's chain database; for chains viem
hasn't packaged it falls through to defineChain({ name: 'EVM <id>',
rpcUrls: { default: { http: [] } } }) and the caller supplies EVM_RPC_URL.
With the viem floor at ^2.48.11, every chain currently in DEFAULT_STABLECOINS
is in viem's catalog, so the fallback is for forward-compatibility with
future SDK chains that out-pace viem.
evmRpcUrl(caip2) resolves in three tiers: EVM_RPC_URL env override -> viem
chain default -> ''. getNetworkSet(mode, evmCaip2?) accepts an optional
CAIP-2 EVM override that overlays the mode default's EVM slot from
EVM_NETWORK_CONFIGS.
Migration: CI configurations that set per-chain RPC URL env vars (e.g.,
BASE_SEPOLIA_RPC_URL) must migrate to the unified EVM_RPC_URL. The harness
selects the chain via --evm-network=<caip2> (or the mode default) and reads
RPC override from EVM_RPC_URL only. No impact on SDK consumers using the
published packages.
The complementary monorepo-wide viem floor bump is in x402-foundation#2242.
ryanRfox
added a commit
to ryanRfox/x402
that referenced
this pull request
May 8, 2026
…BLECOINS
Makes the e2e harness portable to any EVM chain in the SDK's
DEFAULT_STABLECOINS catalog. The visible knob is --evm-network=<caip2>;
the rest is the plumbing that makes the knob actually work.
Four interlocking pieces:
1. CLI override - --evm-network=<caip2> selects the EVM chain for a run.
Mode-default behavior preserved when the flag is omitted.
2. SDK-imported chain registry - EVM_NETWORK_CONFIGS is derived from
DEFAULT_STABLECOINS at module load via Object.fromEntries(...), replacing
the prior 10-entry hand-curated table. New SDK chains propagate after
pnpm install with no harness edit.
3. Removes Base Sepolia hardcodes - EIP-712 token names in the four EVM
resource servers (express, fastify, hono, next/proxy) move to a per-server
EVM_PERMIT2_ASSET_NAMES lookup keyed by EVM_NETWORK. The Permit2 approval
script reads its target from the resolved network config. The mock
facilitator advertises the full scheme set (exact, upto, batch-settlement)
and gates non-EVM kinds on env presence.
4. EVM-only credential gating - an EVM-only run (--families=evm) no longer
requires Solana, Aptos, Hedera, or Stellar wallets. The harness's
existing requiredEnvByFamily post-filter check (test.ts line ~660)
handles this uniformly across all five families; the unconditional
EVM+SVM gate that fired before scenario filtering and over-required both
families is removed.
resolveViemChain(caip2) looks up viem's chain database; for chains viem
hasn't packaged it falls through to defineChain({ name: 'EVM <id>',
rpcUrls: { default: { http: [] } } }) and the caller supplies EVM_RPC_URL.
With the viem floor at ^2.48.11, every chain currently in DEFAULT_STABLECOINS
is in viem's catalog, so the fallback is for forward-compatibility with
future SDK chains that out-pace viem.
evmRpcUrl(caip2) resolves in three tiers: EVM_RPC_URL env override -> viem
chain default -> ''. getNetworkSet(mode, evmCaip2?) accepts an optional
CAIP-2 EVM override that overlays the mode default's EVM slot from
EVM_NETWORK_CONFIGS.
Migration: CI configurations that set per-chain RPC URL env vars (e.g.,
BASE_SEPOLIA_RPC_URL) must migrate to the unified EVM_RPC_URL. The harness
selects the chain via --evm-network=<caip2> (or the mode default) and reads
RPC override from EVM_RPC_URL only. No impact on SDK consumers using the
published packages.
The complementary monorepo-wide viem floor bump is in x402-foundation#2242.
ryanRfox
added a commit
to ryanRfox/x402
that referenced
this pull request
May 8, 2026
…BLECOINS
Makes the e2e harness portable to any EVM chain in the SDK's
DEFAULT_STABLECOINS catalog. The visible knob is --evm-network=<caip2>;
the rest is the plumbing that makes the knob actually work.
Four interlocking pieces:
1. CLI override - --evm-network=<caip2> selects the EVM chain for a run.
Mode-default behavior preserved when the flag is omitted.
2. SDK-imported chain registry - EVM_NETWORK_CONFIGS is derived from
DEFAULT_STABLECOINS at module load via Object.fromEntries(...), replacing
the prior 10-entry hand-curated table. New SDK chains propagate after
pnpm install with no harness edit.
3. Removes Base Sepolia hardcodes - EIP-712 token names in the four EVM
resource servers (express, fastify, hono, next/proxy) move to a per-server
EVM_PERMIT2_ASSET_NAMES lookup keyed by EVM_NETWORK. The Permit2 approval
script reads its target from the resolved network config. The mock
facilitator advertises the full scheme set (exact, upto, batch-settlement)
and gates non-EVM kinds on env presence.
4. EVM-only credential gating - an EVM-only run (--families=evm) no longer
requires Solana, Aptos, Hedera, or Stellar wallets. The harness's
existing requiredEnvByFamily post-filter check (test.ts line ~660)
handles this uniformly across all five families; the unconditional
EVM+SVM gate that fired before scenario filtering and over-required both
families is removed.
resolveViemChain(caip2) looks up viem's chain database; for chains viem
hasn't packaged it falls through to defineChain({ name: 'EVM <id>',
rpcUrls: { default: { http: [] } } }) and the caller supplies EVM_RPC_URL.
With the viem floor at ^2.48.11, every chain currently in DEFAULT_STABLECOINS
is in viem's catalog, so the fallback is for forward-compatibility with
future SDK chains that out-pace viem.
evmRpcUrl(caip2) resolves in three tiers: EVM_RPC_URL env override -> viem
chain default -> ''. getNetworkSet(mode, evmCaip2?) accepts an optional
CAIP-2 EVM override that overlays the mode default's EVM slot from
EVM_NETWORK_CONFIGS.
Migration: CI configurations that set per-chain RPC URL env vars (e.g.,
BASE_SEPOLIA_RPC_URL) must migrate to the unified EVM_RPC_URL. The harness
selects the chain via --evm-network=<caip2> (or the mode default) and reads
RPC override from EVM_RPC_URL only. No impact on SDK consumers using the
published packages.
The complementary monorepo-wide viem floor bump is in x402-foundation#2242.
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.
Description
Closes #2241
Tightens the
viemfloor in everypackage.jsonthat lists viem (41 refs across 40 files), refreshes all three lockfiles so every direct viem resolution reads2.48.11, and regenerates the paywall bundled templates so the EVM/SVM/AVM bundles match the new viem chain database.Why floor-tightening matters
PR #2013 bumped lockfiles to
2.47.14, but later PRs (#2061, #2197, others) added sub-packages with^2.39.x/^2.43.xfloors.pnpmre-resolved on subsequent installs and the solver picked the lowest acceptable version across constraints.^-ranges with low floors don't preserve a bump — lockfile refreshes erode the floor.This PR fixes that incomplete tightening from #2013 by raising every floor to
^2.48.11.Gate criterion for future PRs: new viem-using
package.jsonfiles must use^2.48.11(or tighter). Without a tight floor, the same regression recurs.Lockfile state
typescript/2.47.122.48.11examples/typescript/2.40.3,2.43.52.48.11e2e/2.31.6,2.40.3,2.45.12.48.11Transitive viem from
@walletconnect/utils(2.23.2) is unaffected and remains pinned by walletconnect's own constraints.Files changed
package.jsonin the monorepo that listsviemas a direct dep — 40 files, 41 refs.typescript/pnpm-lock.yaml,examples/typescript/pnpm-lock.yaml,e2e/pnpm-lock.yaml.pnpm --filter @x402/paywall run build:paywall(3 each for EVM/SVM/AVM in TS, Python, and Go).typescript/.changeset/.Related
/typescriptviem updates. Complementary freshness layer; does not tightenpackage.jsonfloors.Tests
pnpm install --frozen-lockfileclean acrosstypescript/,examples/typescript/, ande2e/.pnpm format:check,lint:check,build,testgreen fortypescript/(23/23 tasks each).pnpm format:checkandlint:checkgreen forexamples/typescript/(42/42 tasks each).examples/typescript/build clean for all viem-using packages. Pre-existing build failures in@x402/next-exampleand@x402/miniapp-exampleare unrelated to viem and tracked separately.2.48.11.pnpm --filter @x402/paywall run build:paywall; CI'scheck-paywall-templateregen-and-diff gate passes.Checklist
AI disclosure
This PR used an agentic coding workflow and was reviewed by Ryan R. Fox (an actual human) before posting.