Arbitrum Local Development Compatibility Matrix

Executive Summary

This matrix analyzes the compatibility of core Arbitrum features (ArbSys, ArbGasInfo precompiles, and transaction type 0x7e deposits) with local development environments Hardhat Network and Foundry Anvil. All target features are currently unsupported, requiring testnet deployment for validation of Arbitrum-specific functionality.

Methodology

Analysis based on:

  • Arbitrum precompiles reference documentation
  • Foundry Anvil implementation using revm EVM in Rust
  • Hardhat Network EVM implementation
  • Review of existing plugin architectures
  • Probe testing results from both Hardhat and Foundry environments

Compatibility Matrix

ArbSys Precompile (0x0000000000000000000000000000000000000064)

FeatureSubfeature/FunctionAddress/TypeHardhat SupportFoundry/Anvil SupportEvidenceProposed FixPriorityNotes
Basic Chain InfoarbBlockNumber()0x64Not SupportedNot Supportedprobes/hardhat/test/arb-probes.ts - CALL_EXCEPTION with empty dataEmulate with block.numberP0Returns current L2 block number
Basic Chain InfoarbChainID()0x64Not SupportedNot Supportedprobes/hardhat/test/arb-probes.ts - CALL_EXCEPTION with empty dataEmulate with configurable chain IDP0Returns Arbitrum chain ID (42161)
Block HistoryarbBlockHash(uint256)0x64Not SupportedNot SupportedNot tested in probesEmulate with block hash mappingP1Range: currentBlockNum-256 to currentBlockNum
System VersionarbOSVersion()0x64Not SupportedNot SupportedNot tested in probesEmulate with configurable versionP1Returns current ArbOS version
Address AliasingisL1ContractAddressAliased()0x64Not SupportedNot SupportedNot tested in probesEmulate with address mappingP1Check if caller is L1 contract alias
Address AliasingmapL1SenderContractAddressToL2Alias()0x64Not SupportedNot SupportedNot tested in probesEmulate with address mappingP1Map L1 contract to L2 alias
L1→L2 MessagingwithdrawEth(address)0x64Not SupportedNot SupportedNot tested in probesEmulate with event emissionP1Initiate ETH withdrawal to L1
L1→L2 MessagingsendTxToL1(address,bytes)0x64Not SupportedNot SupportedNot tested in probesEmulate with event emissionP1Send message from L2 to L1
Legacy FunctionsisTopLevelCall()0x64Not SupportedNot SupportedNot tested in probesEmulate with call stack depthP2DEPRECATED - may be removed
Legacy FunctionsgetStorageGasAvailable()0x64Not SupportedNot SupportedNot tested in probesAlways return 0P2Always returns 0 in Nitro

ArbGasInfo Precompile (0x000000000000000000000000000000000000006C)

FeatureSubfeature/FunctionAddress/TypeHardhat SupportFoundry/Anvil SupportEvidenceProposed FixPriorityNotes
Gas PricinggetPricesInWei()0x6CNot SupportedNot Supportedprobes/hardhat/test/arb-probes.ts - CALL_EXCEPTION with empty dataEmulate with mock pricingP0Returns 5-tuple of gas components
L1 Cost EstimationgetL1BaseFeeEstimate()0x6CNot SupportedNot SupportedNot tested in probesEmulate with configurable L1 feeP0Get estimated L1 base fee
Aggregator PricinggetPricesInWeiWithAggregator(address)0x6CNot SupportedNot SupportedNot tested in probesEmulate with mock aggregatorP0Returns 6-tuple for specific aggregator
ArbGas PricinggetPricesInArbGas()0x6CNot SupportedNot SupportedNot tested in probesEmulate with mock pricingP1Returns 3-tuple in ArbGas units
Aggregator ArbGasgetPricesInArbGasWithAggregator(address)0x6CNot SupportedNot SupportedNot tested in probesEmulate with mock aggregatorP1Returns 3-tuple for specific aggregator
Transaction FeesgetCurrentTxL1GasFees()0x6CNot SupportedNot Supportedprobes/hardhat/test/arb-probes.ts - CALL_EXCEPTION with empty dataEmulate with calldata calculationP1Get L1 gas fees for current tx
System ParametersgetGasAccountingParams()0x6CNot SupportedNot SupportedNot tested in probesEmulate with configurable paramsP2Get gas accounting parameters
System ParametersgetGasBacklog()0x6CNot SupportedNot SupportedNot tested in probesEmulate with mock backlogP2Get current gas backlog
System ParametersgetPricingInertia()0x6CNot SupportedNot SupportedNot tested in probesEmulate with configurable inertiaP2Get pricing inertia parameter
System ParametersgetL1PricingSurplus()0x6CNot SupportedNot SupportedNot tested in probesEmulate with mock surplusP2Get L1 pricing surplus/deficit

Transaction Type 0x7e (Deposit Transactions)

FeatureSubfeature/FunctionAddress/TypeHardhat SupportFoundry/Anvil SupportEvidenceProposed FixPriorityNotes
Transaction ParsingRLP Decoding0x7ePartialNot Supportedprobes/hardhat/scripts/probe-0x7e.ts - Transaction accepted but may not have proper semanticsImplement proper 0x7e parserP0Hardhat accepts but may not process correctly
Transaction ExecutionDeposit Processing0x7eNot SupportedNot SupportedNot tested in probesImplement deposit transaction handlerP0Execute with L1→L2 address resolution
Signature ValidationECDSA Verification0x7eNot SupportedNot SupportedNot tested in probesImplement signature validationP0Validate ECDSA signature for deposit
RPC Supporteth_sendRawTransaction0x7ePartialNot Supportedprobes/hardhat/scripts/probe-0x7e.ts - Transaction sent successfullyExtend RPC to handle 0x7eP0Hardhat accepts but may not process correctly
Receipt GenerationTransaction Receipt0x7eNot SupportedNot SupportedNot tested in probesGenerate proper receipt formatP1Include deposit-specific fields
Transaction Detailseth_getTransactionByHash0x7eNot SupportedNot SupportedNot tested in probesReturn deposit transaction detailsP1Include all deposit fields

Evidence Summary

Hardhat Probe Results

  • ArbSys Precompiles: All calls return CALL_EXCEPTION with empty data (0x)
    • arbChainId(): CALL_EXCEPTION, data: "0x"
    • arbBlockNumber(): CALL_EXCEPTION, data: "0x"
  • ArbGasInfo Precompiles: All calls return CALL_EXCEPTION with empty data (0x)
    • getCurrentTxL1GasFees(): CALL_EXCEPTION, data: "0x"
  • 0x7e Transactions: Unexpected Success - Transaction sent successfully
    • Hash: 0xae75d9ef9997836b0f3c0aa027a55531494df6573a72d0f802435a2efd7977cf
    • Note: This suggests Hardhat Network is more permissive than expected

Foundry Probe Results

  • ArbSys Precompiles: All calls fail gracefully as expected
    • testGetArbChainId(): Expected failure logged
    • testGetArbBlockNumber(): Expected failure logged
  • ArbGasInfo Precompiles: All calls fail gracefully as expected
    • testGetCurrentTxL1GasFees(): Expected failure logged
  • 0x7e Transactions: Not tested due to script compilation issues

Implementation Priority Matrix

P0 (Critical - Must Implement First)

  • arbChainID() - Basic chain identification
  • arbBlockNumber() - Basic block information
  • getPricesInWei() - Core gas pricing
  • getL1BaseFeeEstimate() - L1 cost estimation
  • Transaction type 0x7e parsing and execution
  • RPC support for 0x7e transactions

P1 (Important - Implement After P0)

  • arbBlockHash() - Block history support
  • arbOSVersion() - System version info
  • Address aliasing functions
  • L1→L2 messaging functions
  • Aggregator-specific gas pricing
  • Transaction receipt generation

P2 (Optional - Implement Last)

  • Legacy/deprecated functions
  • Advanced system parameters
  • Gas accounting details
  • Performance optimization features

Implementation Strategy

Phase 1: Foundation (P0 Features)

  1. Precompile Registration: Register ArbSys and ArbGasInfo at addresses 0x64 and 0x6C
  2. Basic Methods: Implement arbChainID(), arbBlockNumber(), getPricesInWei()
  3. Transaction Parsing: Add 0x7e support to RLP decoder
  4. RPC Extension: Extend eth_sendRawTransaction for 0x7e

Phase 2: Enhanced Features (P1 Features)

  1. Address Aliasing: Implement L1→L2 address mapping
  2. L1 Messaging: Add withdrawEth() and sendTxToL1() emulation
  3. Gas Aggregators: Support custom gas price aggregators
  4. Transaction Receipts: Generate proper deposit transaction receipts

Phase 3: Advanced Features (P2 Features)

  1. System Parameters: Implement advanced gas accounting
  2. Performance: Optimize precompile execution
  3. Monitoring: Add debugging and monitoring capabilities

Technical Considerations

Hardhat Implementation

  • Plugin Architecture: Extend Hardhat Network's EVM implementation
  • Precompile Injection: Hook into precompile registration system
  • Transaction Processing: Extend transaction pipeline for 0x7e

Foundry Implementation

  • revm Extension: Extend precompile map with Arbitrum precompiles
  • Transaction Types: Add 0x7e support to transaction enum
  • Gas Logic: Implement custom gas calculation algorithms

Cross-Platform Consistency

  • API Compatibility: Ensure consistent behavior between Hardhat and Anvil
  • Configuration: Support similar configuration schemas
  • Testing: Maintain compatibility with existing test suites

Generated: 2025-08-19
Sources: Arbitrum Documentation, Probe Testing Results, Hardhat/Foundry Implementation Analysis