Skip to main content
HDP exposes four capability groups in your Cairo module:
  • hdp.evm for EVM data
  • hdp.starknet for Starknet data
  • hdp.injected_state for injected trie state
  • hdp.unconstrained helpers for unconstrained reads
It also exposes execute_eth_call for provable EVM contract calls at a chosen historical block.

HDP object in your module

1) hdp.evm (EVM memorizer)

Reads verified EVM data for a specific (chain_id, block_number, ...) key. Chain constants:
  • ETHEREUM_MAINNET_CHAIN_ID
  • ETHEREUM_TESTNET_CHAIN_ID
  • OPTIMISM_MAINNET_CHAIN_ID
  • OPTIMISM_TESTNET_CHAIN_ID

Header fields

Input key for all methods below: HeaderKey { chain_id, block_number }

Account fields

Input key for all methods below: AccountKey { chain_id, block_number, address }

Storage

Block transactions

Input key for all methods below: BlockTxKey { chain_id, block_number, transaction_index }

Block receipts

Input key for all methods below: BlockReceiptKey { chain_id, block_number, transaction_index }

Logs

Input key for all methods below: LogKey { chain_id, block_number, transaction_index, log_index }

2) hdp.starknet (Starknet memorizer)

Reads verified Starknet data for a specific (chain_id, block_number, ...) key. Chain constants:
  • STARKNET_MAINNET_CHAIN_ID
  • STARKNET_TESTNET_CHAIN_ID

Header fields

Input key for all methods below: HeaderKey { chain_id, block_number }

Storage

3) hdp.injected_state (InjectedState memorizer)

Works with labeled trie-like injected state you provide for a run.

4) hdp.unconstrained / unconstrained helpers

5) execute_eth_call (provable EVM call)

execute_eth_call lets you perform a provable EVM contract call at a chosen historical block. See the dedicated page for details and patterns: