Sample data. Built from the compile survey; nothing on this site is deployed or attested yet.
hyperdriveregistry

How it works

A Starknet contract in this registry makes a narrow, checkable claim: it is the Ethereum contract's source, compiled by hyperdrive. Here is what backs that claim, and where it stops.

Same code

reproducible

The source comes from Sourcify, which matched it to the bytecode on Ethereum. hyperdrive compiles it deterministically: the same source, compiler settings, hyperdrive version and hyperdrive.toml always give the same Starknet class hashes. If they equal the hashes deployed on Starknet, the deployment is that source.

  1. Ethereum bytecode

    Start from the contract deployed on Ethereum, by address.

  2. Sourcify source

    Fetch the source that Sourcify matched to that bytecode, with the exact compiler settings.

  3. Deterministic build

    hyperdrive compiles that source. The same inputs always give the same Starknet class hashes.

  4. Starknet, attested

    The class hashes must equal the deployed ones. The match is recorded in an on-chain registry.

hyperdrive verify <ethereum address> --starknet <starknet address> --network sepolia

An attestation registry on Starknet records who checked and what they got. Anyone running verify can add an attestation; you do not need to trust the first attester.

Proved

Lean 4

Checked by Lean, with no sorry and only standard axioms (hyperdrive prove):

  • The lowering. Every execution of a Yul statement, function or program is matched by its Cairo lowering, for any meaning of the builtins.
  • Word arithmetic. The runtime's 256-bit arithmetic equals the Yellow Paper's definitions.
  • Memory. mload, mstore, mstore8 and the byte copies read and write exactly the EVM's bytes.
  • Storage and hashing. keccak256 hashes exactly the memory bytes; storage behaves as the EVM's word map (assuming Poseidon is collision resistant).
  • Calls. Calldata, returndata, revert data and event data cross a Starknet call unchanged; call frames, rollback, CREATE and CREATE2 addresses and nonces behave as on the EVM.

Tested

revm

Not proved, but compared call by call with a reference EVM (revm): the remaining runtime builtins (precompiles, value transfers), every example contract and the OpenZeppelin tests. On a contract page, "Tested against the EVM" lists the calls that were run for that contract and whether Cairo and the EVM agreed on return data, reverts, events, storage and balances.

Assumed

per contract

Each build lists the assumptions it relies on in its certificate, shown on the contract page. The common ones:

  • A-STORAGE-HASH. hyperdrive's Poseidon hashes have no collisions on the inputs a contract can reach (storage slots and hash caches).
  • A-ALIAS. Contracts are registered with the alias registry, and an unregistered account's low 160 bits are not a registered alias. Two registered addresses never share an alias (that part is proved).
  • A-SLOT-HASH. When mapping slots use Poseidon instead of keccak256, neither hash collides on reachable slots and constant slots stay clear of hashed ones. Off-chain tools that compute a mapping's slot number must use hyperdrive's slot function.
  • A-SLOT-MODE. Code built with Poseidon slots and code built with keccak256 slots never share storage; an upgrade must keep the slot mode.
  • A-SPLIT. A contract split into several classes runs each part with the main contract's storage, caller and address, and the part classes on the network are the ones whose hashes are embedded.
  • Mapped findings and acknowledged divergences. Each mapped behaviour (for example, msg.sender is the caller's 160-bit alias) and each divergence the builder accepted, with their stated reason.

Trusted

not checked here

Some components are trusted rather than proved or tested by hyperdrive:

  • solc, which turns Solidity into Yul. hyperdrive starts from solc's Yul, so a solc bug affects both chains alike.
  • The Yul parser and the Cairo printer in hyperdrive, and the Cairo compiler and Sierra-to-CASM compiler.
  • The Starknet OS, which runs the classes.
  • Sourcify, for the match between the source and the Ethereum bytecode. You can check that match yourself with any Solidity verifier.

Same code, not same state

A Starknet deployment starts with empty storage. Balances, positions, owners and settings on Ethereum do not carry over, and the deployment is not run by the Ethereum protocol's team unless the registry says so. Equivalence here is about behaviour: the same calls on the same state give the same results.

Starknet also differs in ways no compiler can hide: block times, gas units and account contracts. Those show up as findings, below.

Tiers

Every finding has a tier. Divergent findings must be acknowledged with a reason before a build counts; blocked ones stop the build.

exact

proved equivalent, no assumption.

mapped

equivalent under a recorded assumption.

divergent

behaves differently on Starknet.

blocked

cannot be preserved; the source must change.

Diagnostic codes

Generated by hyperdrive explain --markdown. hyperdrive explain HD0151 explains one code in the terminal.

On GitHub
CodeTierMeaningWhat to do
HD0101mappedmsg.sender is the caller's 160-bit aliasno action needed; Ethereum-key accounts keep their Ethereum address
HD0102mappedaddress(this) is this contract's 160-bit aliasno action needed
HD0103mappedtx.origin is the alias of the transaction's account contractavoid tx.origin for authorization; it is mapped but rarely what you want
HD0110mappedmsg.value is an amount of the network's value tokenno action needed; the registry admin sets the value token (ETH or STRK) once per network
HD0111mappedbalance reads the value token balanceno action needed
HD0120exactstorage slot mapped through the hyperdrive storage hash
HD0121mappedtransient storage is scoped by transaction hashno action needed
HD0122exactimmutable stored in a reserved storage slot
HD0130mappedEVM log emitted as a Starknet eventindexers read topics from event keys and data from event data
HD0140mappedcode size check means 'is deployed' on Starknetevery Starknet account is a contract: code-length checks on users are always true
HD0141divergentextcodehash returns a Starknet class hashacknowledge if you only compare against zero
HD0142blockedextcodecopy cannot read EVM bytecode on Starknetremove bytecode introspection
HD0143divergentcode-length check on a user address: every Starknet account is a contractreplace msg.sender.code.length == 0 style checks with an allowlist or an ERC165 check
HD0150divergentgasleft() uses Starknet gas unitsacknowledge, or remove logic that depends on exact gas amounts
HD0151divergentblock.timestamp / block.number follow Starknet block cadenceacknowledge if your logic uses wall-clock windows, not block counts
HD0152mappedblock.chainid is the Starknet chain idno action needed; EIP-712 domains will use the Starknet chain id
HD0153divergentblockhash uses Starknet block hashes, unavailable for the last 10 blocksacknowledge, or avoid blockhash
HD0154divergentfee and coinbase values have no Starknet equivalentacknowledge; these return fixed values
HD0155blockedblock.prevrandao / difficulty has no Starknet equivalentuse an oracle (for example a VRF) instead
HD0160mappedexternal call routed through the alias registrytarget addresses resolve through aliases or link symbols in hyperdrive.toml
HD0161mappeda failing external call returns false with its revert data (Starknet v0.13.4 or later)no action needed; deploy to a network running Starknet v0.13.4 or later
HD0162mappeddelegatecall runs the target's class on this contract's storage (library call)no action needed
HD0163mappednew Contract deploys the child's class declared in the alias registrydeclare each child class once per network: registry.declare(selector(name), class_hash)
HD0164mappedselfdestruct sends the balance and stops (EIP-6780)no action needed, unless the contract self-destructs in the transaction that created it
HD0166mappednew Contract{salt: s} deploys at the EVM's CREATE2 addressdeclare each child class once per network, as for create
HD0167blockedcallcode is deprecated and not supporteduse delegatecall
HD0168blockedthis precompile is not supportedevery precompile of the Osaka EVM (0x01..0x11, 0x100) is supported; this one is from a later fork
HD0170mappedhardcoded address resolved through a linkthe [links] entry in hyperdrive.toml says what the address is on Starknet
HD0171mappedlinked library address resolved through the alias registrydeploy the library first; its alias is registered under the library name
HD0172blockedhardcoded address with no linkadd it to hyperdrive.toml: [links] NAME = { evm = "0x...", translate = "Contract" }
HD0180blockedruntime code introspection (codecopy/codesize/data*) is not supportedmove constant data into storage or calldata
HD0181blockedverbatim bytecode cannot be translatedreplace inline bytecode with Yul