ERC-8211 is an Ethereum standard for composable execution on smart accounts: a batch encoding where each parameter declares how to obtain its value at execution time, and what conditions that value must satisfy. The audited reference implementation was developed by the Ethereum Foundation and Biconomy and ships with the MEE v2.2.2 contract release. Two SDKs work together end-to-end:Documentation Index
Fetch the complete documentation index at: https://docs.biconomy.io/llms.txt
Use this file to discover all available pages before exploring further.
@biconomy/smart-batching
Builds the ERC-8211 calldata. Type-safe, viem-style API for runtime values, constraints, and storage captures. No infrastructure dependencies — produces standalone
ComposableCall[] payloads.@biconomy/abstractjs
Executes the calldata through Biconomy’s Modular Execution Environment (MEE) — handles gas abstraction, sponsorship, cross-chain orchestration, and signing. The recommended execution layer for any ERC-8211 batch.
@biconomy/smart-batching and hand the resulting calls to any smart account that can dispatch an executeComposable call — ERC-7579 executor modules, ERC-6900 plugins, ERC-7702-delegated EOAs, or native smart-account implementations all work. Pairing with @biconomy/abstractjs gives you sponsored gas, multichain dispatch, and a single signed payload out of the box.
What ERC-8211 solves
Traditional batched transactions freeze every parameter at signing time. If anything changes between signing and execution — a swap returns fewer tokens than expected, a balance shifts, a bridge delivers late — the batch reverts. Until ERC-8211, the only workaround was deploying a custom contract for every flow. ERC-8211 fixes this with three primitives baked into a single signed batch:- Runtime values — a parameter can be a placeholder that resolves on-chain at execution time. The live ERC-20 balance, allowance, or any view function output flows into the next call automatically.
- On-chain constraints —
eq,gte,lte,gteSigned,lteSigned,or. Attach bounds to a resolved value and the entire batch reverts atomically if any constraint fails. Acts as a slippage guard, balance floor, or exact-match check. - Pre- and post-conditions — plain
checkcalls placed before or after a write assert the world is in the expected state. If a pre-condition fails the write never happens; if a post-condition fails the whole batch reverts and the user pays no gas.
0x0000821108B5C9F3fe17E40811bE5b66DaF8f0e7 (module) and 0x00008211dea1Aca67ac55fc44AE3bF88CF41281d (storage) on every supported chain.
Install
v2.2.0 and above) — the basic primitives (eq, gte, lte, runtime values, output capture) are available across the line. MEE v2.2.2 adds the audited reference implementation plus the new constraint types shipped with that audit: gteSigned, lteSigned, or. Pass version: getMEEVersion(MEEVersion.V2_2_2) to @biconomy/abstractjs to opt in to the full feature set; older v2.2.x versions stay supported for accounts that haven’t migrated.
Quickstart — sweep an ERC-20 balance with a constraint
A common pattern: transfer the live USDC balance of an address to a recipient at execution time, but only if it’s at least some minimum. The amount is unknown at signing time — only the constraint is.@biconomy/smart-batchingbuilt threeComposableCallentries: a pre-conditioncheck, awritewith a runtime-resolved balance, and a post-conditioncheck.batch.toCalls()serialised them into the ABI shape the audited composability module decodes on-chain.@biconomy/abstractjspackaged the calls into a single MEE supertransaction (paying fee in USDC, optionally sponsored), and the MEE network simulated, signed, and executed it.
Core primitives
Three building blocks cover most flows. Full reference and edge cases are in the SDK README.Runtime values
A placeholder argument resolved on-chain at execution time. Three sources are supported:write call and the composability module fills in the actual value at execution time.
On-chain constraints
Attach a constraint to a runtime value or acheck call. The module evaluates it before using the value, and reverts the whole batch if it fails.
| Constraint | Comparison | Description |
|---|---|---|
{ eq: value } | unsigned | Resolved value must equal value exactly |
{ gte: value } | unsigned | Resolved value must be ≥ value |
{ lte: value } | unsigned | Resolved value must be ≤ value |
{ gteSigned: value } | signed (int256) | Two’s-complement comparison; supports negative values |
{ lteSigned: value } | signed (int256) | Two’s-complement comparison; supports negative values |
{ or: [...] } | — | Passes if any one child constraint passes |
Output capture — chain one call’s output into the next
Capture the return value of a call into namespace storage, then read it as a runtime value later in the same batch.Where to go next
Quickstart repo
Clone-and-run sponsored testnet example — no funding, no env vars, MEEScan link in seconds.
Examples gallery
12 real-world DeFi flows: leverage loops, MEV-protected swaps, cross-chain deposits, stop-loss/take-profit, output captures, and more.
SDK reference
Full
@biconomy/smart-batching API documentation — every method, parameter, and edge case.ERC-8211 standard
The standard’s project page, with the audited reference implementation and EIP discussion.
Supported chains
MEE v2.2.2 (the ERC-8211 release) deployment list — 16 mainnets and 13 testnets.