ERC-8152 Content Addressable Logic Module (CALM) (Content-Addressable Logic Modules (CALM))

Review · Other · created 2026-01-18

A standard for deploying a logic contract, built without a constructor or immutables, so that its address is determined solely by its runtime bytecode. The same logic lands at the same address on every EVM chain, and anyone can redeploy it.

Why it is needed

Today, shared logic such as libraries and diamond facets ends up duplicated across multiple addresses even within a single chain, and reusing the same address on a different chain is nearly impossible. This happens because constructor code or values injected at deployment time (immutables) alter the resulting bytecode and address. As a result, projects serving multiple chains must deploy and verify logic separately on each chain, adding operational overhead for cross-chain verification and logic reuse. This standard bans constructors, immutables, and selfdestruct, and defines an atomic format in which the deployment address is a function solely of public constants and the runtime bytecode. This enables a global library of logic modules that live at the same address on every chain, and permissionless redeployment to other chains.

In depth

Deployment constraint: constructors and immutables are prohibited

initcode must not (MUST NOT) execute any logic other than deploying runtime bytecode. Custom constructors are not reflected when redeploying to another chain. Variables injected at deployment time (immutables) are also prohibited, because they change the bytecode hash and break address determinism. The address must take the form address = function(<publicly known constants>, runtimeBytecode); examples of public constants include salt = 0, a fixed micro-constructor bytecode (600B_38_03_80_600B_3D_39_3D_f3), and a deployer address that can be deployed to the same address on any chain. The source language can be anything (Solidity, Vyper, Huff, Yul, etc.), since the standard only looks at the resulting bytecode.

Runtime constraints: prohibition of SELFDESTRUCT and stateless execution

A contract must not include the SELFDESTRUCT (0xFF) opcode, nor delegatecall into a contract that has it. This is so that the logic the proxy depends on remains permanently in place, even on chains where SELFDESTRUCT-related changes such as EIP-6049 and EIP-6780 have not been applied. CALM must also not directly access its own storage. The premise is that the logic operates only within the storage context of the calling proxy.

Storage rule: only touch proxy storage

To prevent storage collisions, CALM must (MUST) handle proxy state using deterministic storage offsets. Following ERC-7201 (namespaced storage), ERC-8042 (diamond storage), or a future storage-separation standard is recommended (SHOULD). As an exception, for backward compatibility with already-deployed proxies, a legacy layout starting at slot 0 may be used, but such use is recommended to be explicitly disclosed in the manifest. There is no requirement to enforce checks preventing the contract from having or initializing its own storage.

Capability and Impact Manifest signaling

To aid integration and static analysis, it is recommended (SHOULD) to include a Capability and Impact Manifest in the source code header (e.g., NatSpec). It covers three things. First, storage impact, such as the storage namespace (ERC-7201) and slots (ERC-8042) it is designed to touch. Second, pre-deployment infrastructure dependencies, such as external contract calls, DELEGATECALL requirements, and deterministic factories. Third, EVM compatibility, i.e. required opcode extensions (e.g. EIP-3855 for PUSH0, EIP-7939 for CLZ) and required precompiles (ecRecover, modExp, etc.). This signal is considered optimistic and unverified, and tools are expected to independently verify it through static analysis of the runtime bytecode. The formal schema will be defined by a separate standard.

Two dispatch models

The Multi-Method (standard) model has an internal dispatcher that locates the function from the first 4 bytes of calldata (msg.sig), and fits diamond facets that contain several related functions. The Atomic-Logic (fallback) model has no dispatcher and puts all logic into a single fallback(), used as a Single Function Facet where the diamond proxy maps a specific selector directly to this module. In an ordinary diamond, a second dispatch happens inside the facet after the proxy's delegatecall, but for a single-function facet this is a waste of gas, so the design omits it. The reference implementation is a module that returns 18 from decimals(), with runtime bytecode 0x60125f5260205ff3; deploying it via the HashCarve factory (0x9c8D020b832Ee8AAF92cB555819Dc8a0c1097F56) yields the address 0xB1fDF38E7ae86bf190654b212bD7e53B542DE958 on every EVM chain.

The CBOR metadata dilemma

By default, compilers append CBOR metadata containing the source hash and other data after the runtime bytecode. In CALM, changing even a single comment changes this metadata, which changes the deployment address. Stripping the metadata with Solidity's --no-cbor-metadata, or with foundry.toml's bytecode_hash = "none" and cbor_metadata = false, produces a Logic-only Identity, where identity is determined by the logic alone. Keeping it produces a Full-Source Identity, where comments and the compilation environment are also bound to the address. Both are valid CALM. If the metadata is stripped, getting Full verification on a platform like Sourcify requires handling metadata.json manually, but both Full and Partial verification remain possible. Once verified on one chain, a tool such as CarbonCopy can automatically replicate the verification to other chains that have the same bytecode.

Rationale for gas and cache efficiency

If the proposed EIP-7863 (block-level warming) is adopted, once the first transaction in a block calls a standard CALM address, other transactions in the same block benefit from a discounted gas cost. As the community converges on standard CALM addresses, this creates an economic incentive to reduce cold access costs. Even before EIP-7863, execution clients such as Geth and Reth keep frequently used bytecode in an in-memory LRU cache, so convergence on standard addresses keeps this logic resident in node memory, reducing the network's I/O burden and effectively increasing processing speed. In addition, because the address itself attests to the logic, it forms a Registry-less Registry structure that can be verified without a central registry, reducing redundant audits.

Proposal status: Review

This proposal is still in Review status. It is a stage where content may change during community review, and the formal schema for the manifest will also be defined by a separate future standard.

Things to watch out for

Original ERC · ← ERCs