Skip to content
Lattice

ModularAccount6900

Git Source

Inherits: Lattice

Title: ModularAccount6900

Authors: David Dada <daveproxy80@gmail.com> (https://github.com/dadadave80), Modified from ERC-6900 reference implementation (https://github.com/erc6900/reference-implementation)

An EIP-2535 Diamond whose fallback adds ERC-6900 execution-module dispatch LAYERED UNDER the facet map (#74): a selector the diamond owns is delegatecalled to its facet exactly as before; an otherwise unhandled selector is dispatched to the installed ERC-6900 execution MODULE that owns it — via CALL (the module runs in its OWN storage context, not the account's), wrapped by the account's runtime authorization and pre/post execution hooks. A selector neither a facet nor an installed execution function owns reverts IERC6900Executor.UnrecognizedFunction.

The two dispatch regimes are disjoint by design: facet selectors → DELEGATECALL (shared Diamond storage, diamondCut authority); ERC-6900 execution-module selectors → external CALL to the module (separate storage). This is the 6900 analogue of AccountDiamond and the proxy a 6900-flavored account blueprint deploys.

Functions

fallback

Fallback function that delegates calls to the appropriate facet based on function selector

Reads the facet address from diamond storage and performs a delegatecall; reverts if selector is not found

fallback() external payable virtual override;