runtimeERC20BalanceOf
Inject the ERC-20 token balance of an address at execution time.Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
tokenAddress | Address | Yes | Token contract address |
targetAddress | Address | Yes | Address to check balance of |
constraints | Constraint[] | No | Execution constraints |
Returns
RuntimeValue - Can be used as argument in buildComposable
Example
runtimeNativeBalanceOf
Inject the native token (ETH) balance of an address at execution time.Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
targetAddress | Address | Yes | Address to check balance of |
constraints | Constraint[] | No | Execution constraints |
Example
runtimeERC20AllowanceOf
Inject the ERC-20 allowance between two addresses at execution time.Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
owner | Address | Yes | Token owner address |
spender | Address | Yes | Spender address |
tokenAddress | Address | Yes | Token contract address |
constraints | Constraint[] | No | Execution constraints |
Example
runtimeParamViaCustomStaticCall
Inject any return value from a view function (up to 32 bytes).Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
targetContractAddress | Address | Yes | Contract to call |
functionAbi | Abi | Yes | ABI containing function |
functionName | string | Yes | Function name |
args | any[] | Yes | Function arguments |
Example
Constraints
Constraints control when instructions execute and protect against bad values.greaterThanOrEqualTo
lessThanOrEqualTo
equalTo
Constraint Behavior
Constraints determine execution order in multi-step flows:- MEE attempts to execute deposit
- Constraint not satisfied (no WETH yet)
- MEE waits and retries
- Swap completes, WETH arrives
- Constraint satisfied → deposit executes
MEE Version Requirements
| Function | Minimum Version |
|---|---|
runtimeERC20BalanceOf | MEE v1.0.0 |
runtimeERC20AllowanceOf | MEE v1.0.0 |
runtimeNativeBalanceOf | MEE v2.2.0 |
runtimeParamViaCustomStaticCall | MEE v2.2.0 |