Skip to main content

Type Definition

Object representing Solidity compiler metadata embedded in contract bytecode. Encoded in CBOR format and appended to deployed bytecode.

Quick Reference

API Methods

Constructors

Processing

Usage Patterns

Extracting Compiler Information

Contract Verification

Creating Custom Metadata

Metadata Format

Solidity appends CBOR-encoded metadata to bytecode:
The CBOR map contains:
  • ipfs: IPFS hash of source metadata JSON (32 bytes)
  • bzzr0/bzzr1: Swarm hashes (legacy, 32 bytes)
  • solc: Compiler version string
  • experimental: Boolean flag
Example bytecode ending:

Specification