Goal
Define a source/executable semantics for external calls against a stateful external world, so Verity can reason about calls to contracts that maintain their own state.
Motivation
Current external calls and ECMs are useful compiler boundaries, but they are not yet a clean semantic model of interacting contracts. Morpho-style verification needs to state assumptions about oracles, tokens, callbacks, and protocol peers in one place, while distinguishing caller state, callee state, returndata, reverts, and staticcall restrictions.
Proposed shape
Introduce an ExternalWorld indexed by address and interface summary. A summary should describe:
- selector and mutability (
call vs staticcall);
- precondition on caller state, calldata, value, and external world;
- post-state relation for caller-visible effects and callee/external-world effects;
- returndata relation;
- revert relation and returndata bubbling.
view/staticcall summaries must not mutate external world state.
Acceptance criteria
Goal
Define a source/executable semantics for external calls against a stateful external world, so Verity can reason about calls to contracts that maintain their own state.
Motivation
Current external calls and ECMs are useful compiler boundaries, but they are not yet a clean semantic model of interacting contracts. Morpho-style verification needs to state assumptions about oracles, tokens, callbacks, and protocol peers in one place, while distinguishing caller state, callee state, returndata, reverts, and
staticcallrestrictions.Proposed shape
Introduce an
ExternalWorldindexed by address and interface summary. A summary should describe:callvsstaticcall);view/staticcallsummaries must not mutate external world state.Acceptance criteria