Bytecode Metadata Hash Extractor
Free to download on every platform. Comes pre-installed on BotFone, BotPad and BotFlip — with extra free apps included.
About this app
WHAT IT DOES
Bytecode Metadata Hash Extractor is a read-only developer tool that extracts the embedded IPFS or Swarm metadata hash from EVM smart contract bytecode. It scans contract bytecode for the CBOR-encoded metadata marker (a264697066735822), extracts the 32-byte metadata hash, parses the embedded solc version, and reports the marker position within the bytecode. The tool helps developers verify source code authenticity, trace contract compilation origins, and access the full compiler metadata stored off-chain. This is essential for ensuring contract transparency, auditing source code integrity, and debugging compilation-specific issues.
HOW TO USE
Connect your EVM-compatible wallet via the BGWallet bridge and select the network where your contract is deployed. Enter the contract address and click "Extract Metadata Hash". The tool fetches the bytecode, searches for the metadata marker (a264697066735822), extracts the 32-byte hash that follows, and attempts to parse the solc version from the trailing metadata. Results include the extracted metadata hash, hash type (IPFS/Swarm), solc version, marker position, and bytecode size. The tool also provides a visual indication of whether metadata was found or if the contract was compiled without metadata. All analysis is read-only—no signatures or transactions are submitted.
TECHNICAL MECHANISM
The tool uses ethers.js v5.7.2 to fetch contract bytecode via provider.getCode(address), then performs string-based analysis on the hex representation. The Solidity compiler embeds a CBOR-encoded metadata section at the end of the compiled bytecode, which begins with the marker a264697066735822 (the hex representation of the CBOR map key "ipfs" followed by a 32-byte hash). The tool searches for this marker in the bytecode hex string. When found, it extracts the following 64 hex characters (32 bytes) as the metadata hash. It then searches for the solc version marker 64736f6c6343 (hex for "solc" in CBOR) that appears later in the metadata, and extracts the version number encoded as three two-digit hex values (major.minor.patch). The marker position is reported in bytes from the start of the bytecode. The tool also attempts to classify the hash type—typically a 32-byte IPFS CID or Swarm hash—and provides a human-readable summary. The analysis is purely static, does not execute any contract functions, and works on any EVM bytecode that includes metadata.
WHAT IT CANNOT SEE
This tool has fundamental limitations that users must understand. It cannot extract metadata hash from contracts compiled without metadata enabled—if the compiler flag --metadata was not used or metadata was stripped via tools or optimizer settings, the marker will be absent. It cannot verify that the extracted hash actually corresponds to the source code without external resolution—the tool extracts the hash but cannot fetch or validate the actual metadata document from IPFS or Swarm. It cannot detect metadata hashes for contracts where the metadata has been moved or overwritten—some custom compilation pipelines or post-processing tools may relocate or modify the metadata section. It cannot guarantee the metadata hash is present in all compiler versions—older Solidity versions may use different metadata encoding or omit the marker entirely. It cannot resolve IPFS/Swarm hashes to actual source code within the tool—this requires a separate IPFS gateway or Swarm client. It cannot extract metadata from contracts that are not deployed or have no bytecode. It cannot detect metadata that has been obfuscated, compressed, or encoded using non-standard formats. The tool's hash classification is heuristic and may misidentify the type of hash.
PLEASE NOTE
This tool only supports EVM-compatible blockchains (Ethereum, Polygon, BSC, Avalanche C-Chain, Optimism, Arbitrum, and their testnets). Solana, Tron, Starknet, SUI, TON, Aptos, Bitcoin, Cosmos, and XRP are not supported. The tool is free, open-source, requires no API keys, and uses the wallet's native provider for all read operations. Metadata hash extraction is the first step in source verification; use the extracted hash with an IPFS gateway or Swarm client to retrieve the full metadata and source code.