You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore(e2e): make the harness portable to any EVM chain in DEFAULT_STABLECOINS
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 #2242.
0 commit comments