---
eip: 8152
label: ERC-8152
title: Content-Addressable Logic Modules (CALM)
status: Review
type: Standards Track
category: ERC
created: 2026-01-18
official: https://eips.ethereum.org/EIPS/eip-8152
source: https://github.com/ethereum/ERCs/blob/master/ERCS/erc-8152.md
canonical: https://eips.huatuo.xyz/eip-8152/
lang: en
tldr: Defines constructor-free, immutable-free, selfdestruct-free logic modules for proxies and diamonds whose deployment address depends only on their runtime bytecode, so the same logic lives at the same address on every EVM chain.
tags: [proxy, diamonds, deployment, multichain, modules]
---

# ERC-8152: Content-Addressable Logic Modules (CALM)

> Content-addressable logic modules for proxy architectures. Multichain consistent and permissionlessly replicable, leading to gas-efficiency.

**TL;DR:** Defines constructor-free, immutable-free, selfdestruct-free logic modules for proxies and diamonds whose deployment address depends only on their runtime bytecode, so the same logic lives at the same address on every EVM chain.

## What problem does it solve?

Proxy architectures such as Diamonds ([ERC-2535](/eip-2535/)), UUPS and Modular Dispatch Proxies ([ERC-8167](/eip-8167/)) `delegatecall` into separate logic contracts (facets, libraries, implementations). Today the same logic gets deployed over and over, at different addresses on each chain, because constructors, immutables and deployer-specific details change the address. That makes cross-chain verification and reuse painful.

CALM (Content-Addressable Logic Modules) sets rules so that a logic module's address is a pure commitment to its runtime bytecode: "runtime bytecode is identity". Anyone can redeploy the same module to a new chain and it lands at the same address.

## How it works

**Deployment rules**

- No constructor logic: the initcode only returns the runtime bytecode (the spec gives the 11-byte micro-constructor `600B380380600B3D393DF3` as an example).
- No immutables, since they would change the bytecode per deployment.
- The address must be a function of public constants and the runtime bytecode only (e.g. a known permissionless deployer, salt 0, the fixed micro-constructor), and redeployment on other chains must be permissionless.

**Runtime rules**

- No `SELFDESTRUCT`, and no delegatecall into code that has it, so proxies can rely on the module forever.
- The module never touches its own storage; it works on the calling proxy's storage, preferably at namespaced locations ([ERC-7201](/eip-7201/) or [ERC-8042](/eip-8042/)). Legacy slot-0 layouts are allowed only for backwards compatibility and should be disclosed.

**Signalling.** Source should carry a "Capability and Impact Manifest" (e.g. in NatSpec) listing storage touched, external calls and required opcodes/precompiles (such as PUSH0). It is an unverified claim; tooling should check the bytecode itself.

**Two dispatch models.** *Multi-method* modules have a normal selector dispatcher. *Atomic-logic* modules contain only a `fallback()`, so a diamond maps one selector straight to them and skips the second dispatch.

## Sample code

The spec's single-function facet for `decimals()` returning 18 (compiled without CBOR metadata it becomes `0x60125f5260205ff3`):

```solidity
// SPDX-License-Identifier: MIT
pragma solidity 0.8.33;

/// @custom:CALM-manifest Storage: none. External calls: none. Requires EIP-3855 (PUSH0).
contract Decimals_Const18_Optimized {
    fallback() external payable {
        assembly {
            mstore(0x00, 0x12)
            return(0x00, 0x20)
        }
    }
}
```

Predicting the module address from runtime code alone (ethers v6; `deployer` is whichever permissionless CREATE2 deployer the ecosystem standardises on):

```ts
import { concat, getCreate2Address, keccak256, ZeroHash } from "ethers";

const MICRO_CONSTRUCTOR = "0x600B380380600B3D393DF3";
const runtime = "0x60125f5260205ff3";

const initCode = concat([MICRO_CONSTRUCTOR, runtime]);
const calmAddress = getCreate2Address(deployer, ZeroHash, keccak256(initCode));
```

## Things to know

- Status is **Review**.
- Compiler metadata (the CBOR footer) is part of the bytecode, so a changed comment changes the address. Strip it (`bytecode_hash = "none"`, `cbor_metadata = false`) for logic-only identity, or keep it so audited source and comments are bound to the address. The spec recommends keeping it for complex, security-critical modules.
- Treat manifests as claims, not facts; verify storage access and opcode support with static analysis.
- Mixing modules that use different storage conventions (7201 vs 8042) in one proxy will cause bugs.
- The spec argues shared canonical modules would benefit from block-level warming ([EIP-7863](/eip-7863/), Draft) and from client bytecode caches.


---

This is an unofficial plain-language summary. Read the full specification: https://eips.ethereum.org/EIPS/eip-8152
