This ERC defines a minimal interface for smart contracts that host third-party runtime apps. A compliant host exposes local app enablement and a permissionless execution entry point for enabled apps.
Runtime app execution MUST occur in the host’s context rather than as a plain external call into app-owned state.
Motivation
Smart contracts, especially smart accounts, increasingly host long-lived behavior such as inheritance rules, settlement flows, recurring payments, treasury policies, and trading logic. These features often need to run as extensions of the host, using host authority and host-owned state, rather than as unrelated external dapps.
-
Runtime host: a smart contract that implements this ERC and hosts one or more runtime apps.
-
Runtime app: an application contract that a runtime host executes through
executeRuntimeApp. -
Host-context execution: execution in which app code runs with the host’s authority and, when persistent state is written by app code, against host-owned storage.
-
Shared-storage runtime: a host-context runtime in which app code may read or write persistent state at the runtime host’s storage address, such as through `delegatecall`, facet dispatch, or an equivalent mechanism.
Interfaces
Runtime hosts MUST implement:
pragma solidity ^0.8.23;
interface IERCRuntimeAppHost {
event AppEnabled(address indexed host, address indexed app);
event AppDisabled(address indexed host, address indexed app);
function executeRuntimeApp(address app, bytes calldata data) external payable returns (bytes memory result);
function enableApp(address app) external;
function disableApp(address app) external;
function isAppEnabled(address app) external view returns (bool);
}