Why It Matters
Traditional transaction batching is rigid:- You must hardcode every parameter
- You can’t adapt to bridges, swaps, or slippage
- You often over- or under-estimate received amounts
- Use actual token balances at the moment of execution
- Protect users with constraints (e.g. slippage limits)
- Compose flows across chains with fewer assumptions
Basic Usage
Available Runtime Functions
⚠️ To access latest functions, please use according MEE Version as described here.
Please refer to the Supported Chains page to learn where MEE 2.2.0 is currently supported.
runtimeERC20BalanceOf
Inject the token balance of an address — most often your orchestrator address — at the time of execution.runtimeNativeBalanceOf
Inject the native token balance of an address — most often your orchestrator address — at the time of execution.runtimeERC20AllowanceOf
Inject the ERC20 token allowance between two addresses at the time of execution. This is useful when you need to check or use allowances dynamically.runtimeParamViaCustomStaticCall
Allows to execute an arbitrary READ (static) call on-chain, and use the return of this call as an input argument. Return data should be up to 32 bytes:address, bytes32, uintXXX Solidity types are expected.
Constraints = Execution Control
Constraints ensure that runtime-injected values meet specific criteria. If constraints are not met, the instruction will not execute. But even more importantly — they determine when instructions will execute. This is key for cross-chain orchestration.Transaction Ordering
When a runtime value is used, the orchestration system will wait until all constraints are satisfied before executing. This means constraints enforce dependency:nexusAddress has a non-zero balance of USDC.
In multi-chain orchestration, this is the mechanism that controls execution sequencing.
Handling Slippage
Safety Nets
Constraints act like assert statements. If the value isn’t good — don’t execute.Cross-Chain Example
- MEE simulates the swap instruction
- Simulation fails (no tokens yet)
- MEE waits and retries
- Bridge completes
- Constraints satisfied → transaction proceeds
Best Practices
Use runtime injection when values are unknown ahead of time
Always apply constraints to protect users and define execution rules
Use with transfer instructions to sweep remaining balances
Design for graceful failure if constraints aren’t met
How It Works
AbstractJS builds orchestration callData with placeholders. During execution:- The smart account receives
executeComposable() - The fallback handler reads blockchain state
- Runtime values are injected into calldata
- The final transaction executes with those resolved parameters
Summary
Runtime injection turns your orchestration flows into state-aware, auto-sequencing logic that adapts to bridge results, swap outputs, slippage conditions, and more. Use it when:- You’re building cross-chain workflows
- You can’t predict output values
- You want fewer failures and better UX