ERCs

ERC-1577 — ENS Content Hash

eips.ethereum.org/EIPS/eip-1577

The standard for storing content addresses (IPFS, Swarm, Arweave) in an ENS resolver. The resolver records a content hash, dapps decode it back into a URL.

import { content_hash } from "@ethernauta/erc/1577";

const hash = await content_hash({ node: namehash("vitalik.eth") })(
  contract({ chain_id: eip155_1.chain_id, contract: resolver_address }),
);
// → e.g. "ipfs://bafybeih..."

Surface

MethodShapePurpose
content_hash({ node })Callable<Bytes>Read the content hash record.
set_content_hash({ node, hash })Signable<Hash32>Set the record.

The hash bytes follow the multicodec format — 0xe301 prefix for IPFS, 0xe40101 for Swarm, etc. Decoders live in @ethernauta/ens and run during get_ens_avatar.

See also