call materialiser sets a flow input’s amount to what a contract call produces, for example “claim rewards from staking contract X, then deposit them into vault Y”. At execution, the transaction calls target with your calldata from the execution proxy and measures the proxy’s balance of the input token before and after. The difference is the input amount.
msg.sender is the proxy, so a claimRewards() call claims the proxy’s rewards, not the signer’s. The position must belong to the proxy.
Unlike the
core.call op, which ABI-encodes a function signature for you, the call materialiser takes pre-encoded 0x calldata. Encode it yourself, for example with viem’s encodeFunctionData.Plan with assumptions
Passassumptions with an estimated amount for the input, in base units, so Composer can plan the downstream ops before the real amount exists. Guard the ops that consume it, for example with slippage.
Example
Claim reward tokens from a staking contract and deposit the claimed amount into a vault:lifi.zap to deposit it; see Protocols and chains.
