feat(ev-deployer): part 2 - add Hyperlane contract support#181
feat(ev-deployer): part 2 - add Hyperlane contract support#181randygrok wants to merge 8 commits intoev-deployer-part1-corefrom
Conversation
…e patching Add Hyperlane monorepo as git submodule pinned to @hyperlane-xyz/[email protected]. Implement bytecode patching utility for Solidity immutable variables and MerkleTreeHook genesis alloc generation with mailbox/localDomain/deployedBlock patching. This is the foundation for embedding Hyperlane contracts at genesis.
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Claude finished @randygrok's task —— View job PR Review: Hyperlane Contract SupportI've completed a thorough review of this PR. Here's my comprehensive feedback: Todo List:
✅ Strengths
🔍 Detailed AnalysisBytecode Patching (
|
…deployer-merkle-tree-hook
The MerkleTreeHook bytecode test needs OpenZeppelin dependencies from the Hyperlane monorepo, which are managed by soldeer.
Verify bytecode, storage slots, and patched immutables (mailbox, localDomain, deployedBlock) for the MerkleTreeHook contract via RPC.
Rustdoc interprets [644], [578], and [32] as intra-doc links, causing the docs CI job to fail with -D warnings.
…racts Add three Hyperlane core contracts to ev-deployer so the full messaging stack can be embedded at genesis without post-deploy transactions. - Mailbox: core messaging hub with localDomain/deployedBlock immutables - NoopIsm: stateless ISM that accepts all messages (for devnet) - ProtocolFee: post-dispatch hook with MAX_PROTOCOL_FEE immutable
…lean ci build The embedded bytecodes were compiled with --extra-output storageLayout which subtly altered the output. Regenerated from a clean ci profile build to match what forge produces without extra flags.
…s validation Merge ev-deployer-part1-core into ev-deployer-merkle-tree-hook, resolving config.rs conflicts by keeping both the MerkleTreeHook/ProtocolFee validations and the new duplicate-address check between AdminProxy and FeeVault.
Part of #119
Summary
@hyperlane-xyz/[email protected]immutables.rs) for Solidity immutable variables embedded in runtime bytecodeMerkleTreeHookgenesis alloc generation withmailbox,localDomain, anddeployedBlockimmutable patchingMerkleTreeHookConfiginto config parsing, genesis builder, address manifest, and compute-address CLIDetails
Immutable patching: Solidity
immutablevalues are compiled into bytecode, not storage. The newimmutables.rsmodule patches zero-placeholder bytecodes at known byte offsets with actual values from the deploy config at genesis time.MerkleTreeHook (Hyperlane required hook): Maintains an incremental Merkle tree of dispatched message IDs. Storage is minimal at genesis (slot 0:
_initialized=1, slot 51:_owner). Three immutables patched in bytecode:mailbox(address, 2 refs),localDomain(uint32),deployedBlock(uint256, set to 0).Bytecode source: Compiled with Hyperlane v11.0.3, solc 0.8.22, Foundry
ciprofile (cbor_metadata=false,bytecode_hash="none").