HARDHAT COMPILER FIX: Resolve mcopy function not found error
Issue Fixed:
❌ DeclarationError: Function mcopy not found
❌ OpenZeppelin contracts using mcopy opcode
❌ Compilation failing with HH600 error
❌ EVM version too old for mcopy support
Root Cause:
- OpenZeppelin v5.0.2 uses mcopy function for gas optimization
- mcopy requires Shanghai EVM version or later
- Default EVM version didn't support mcopy opcode
- Hardhat config missing evmVersion setting
Solution Applied:
✅ Set evmVersion to shanghai in Hardhat config
✅ Shanghai EVM supports mcopy and other new opcodes
✅ Maintains Solidity 0.8.24 compiler version
✅ Keeps optimizer settings for gas efficiency
Configuration Changes:
- Added evmVersion: shanghai to solidity settings
- Maintains version: 0.8.24 for compiler
- Preserves optimizer settings
- Compatible with OpenZeppelin v5.0.2
Impact:
- OpenZeppelin contracts now compile successfully
- mcopy function is supported
- No more HH600 compilation errors
- Modern EVM features available
- Gas optimizations from OpenZeppelin work
This resolves the compilation issue that was preventing
Hardhat from compiling contracts due to missing mcopy support.
- Change file mode from 644 to 755 for all project files
- Add chain_id parameter to get_balance RPC endpoint with default "ait-devnet"
- Rename Miner.extra_meta_data to extra_metadata for consistency