Skip to content

[WIP] ops: deploy HopV2#13

Open
pegahcarter wants to merge 17 commits intomasterfrom
ops/deploy
Open

[WIP] ops: deploy HopV2#13
pegahcarter wants to merge 17 commits intomasterfrom
ops/deploy

Conversation

@pegahcarter
Copy link
Collaborator

@pegahcarter pegahcarter commented Feb 18, 2026

Task to deploy and wire up all RemoteHopV2s to the FraxtalHopV2.

Task: submit tx to wire up currently deployed RemoteHops

  • multisig: [link]
  • Address to call: 0x00000000e18aFc20Afe54d4B2C8688bB60c06B36
  • Function to execute: setRemoteHop(uint32, address)
    • 30110, 0x0000006D38568b00B457580b734e0076C62de659 (Arbitrum)
    • 30106, 0x0000006D38568b00B457580b734e0076C62de659 (Avalanche)
    • 30184, 0x0000006D38568b00B457580b734e0076C62de659 (Base)
    • 30362, 0x0000006D38568b00B457580b734e0076C62de659 (Berachain)
    • 30102, 0x0000006D38568b00B457580b734e0076C62de659 (BSC)
    • 30101, 0x0000006D38568b00B457580b734e0076C62de659 (Ethereum)
    • 30339, 0x0000006D38568b00B457580b734e0076C62de659 (Ink)
    • 30375, 0x0000006D38568b00B457580b734e0076C62de659 (Katana)
    • 30183, 0x0000006D38568b00B457580b734e0076C62de659 (Linea)
    • 30260, 0x0000006D38568b00B457580b734e0076C62de659 (Mode)
    • 30390, 0x0000006D38568b00B457580b734e0076C62de659 (Monad)
    • 30111, 0x0000006D38568b00B457580b734e0076C62de659 (Optimism)
    • 30370, 0x0000006D38568b00B457580b734e0076C62de659 (Plume)
    • 30109, 0x0000006D38568b00B457580b734e0076C62de659 (Polygon)
    • 30214, 0x0000006D38568b00B457580b734e0076C62de659 (Scroll)
    • 30280, 0x0000006D38568b00B457580b734e0076C62de659 (Sei)
    • 30332, 0x0000006D38568b00B457580b734e0076C62de659 (Sonic)
    • 30396, 0x0000006D38568b00B457580b734e0076C62de659 (Stable)
    • 30320, 0x0000006D38568b00B457580b734e0076C62de659 (Unichain)
    • 30319, 0x0000006D38568b00B457580b734e0076C62de659 (Worldchain)

@pegahcarter pegahcarter marked this pull request as ready for review February 24, 2026 22:13
Copilot AI review requested due to automatic review settings February 24, 2026 22:13
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds operational deployment support for HopV2 across additional chains, updates Foundry config for Cancun-targeted builds, and replaces the README with detailed Hop V2 technical documentation and deployed-address references.

Changes:

  • Introduces multiple chain-specific DeployRemoteHopV2*.s.sol scripts that configure per-chain endpoints/admins/EIDs/OFTs.
  • Refactors HopV2 deployment scripts to use forge-std scripting patterns and deterministic CREATE2 deployments (with hardcoded address assertions).
  • Updates foundry.toml (EVM version + Base endpoints) and replaces README.md with expanded protocol documentation and a deployed-address table.

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
src/script/hop/DeployRemoteHopV2Worldchain.s.sol Adds Worldchain remote HopV2 deployment parameters.
src/script/hop/DeployRemoteHopV2Unichain.s.sol Adds Unichain remote HopV2 deployment parameters.
src/script/hop/DeployRemoteHopV2Sonic.s.sol Adds Sonic remote HopV2 deployment parameters.
src/script/hop/DeployRemoteHopV2Sei.s.sol Adds Sei remote HopV2 deployment parameters and custom verifier URL notes.
src/script/hop/DeployRemoteHopV2Scroll.s.sol Adds Scroll remote HopV2 deployment parameters.
src/script/hop/DeployRemoteHopV2Optimism.s.sol Adds Optimism remote HopV2 deployment parameters.
src/script/hop/DeployRemoteHopV2Mode.s.sol Adds Mode remote HopV2 deployment parameters and verification instructions.
src/script/hop/DeployRemoteHopV2Linea.s.sol Adds Linea remote HopV2 deployment parameters.
src/script/hop/DeployRemoteHopV2Katana.s.sol Adds Katana remote HopV2 deployment parameters and verification instructions.
src/script/hop/DeployRemoteHopV2Ink.s.sol Adds Ink remote HopV2 deployment parameters and verification instructions.
src/script/hop/DeployRemoteHopV2Hyperliquid.s.sol Adds Hyperliquid remote HopV2 deployment parameters and Etherscan v2 verify instructions.
src/script/hop/DeployRemoteHopV2Berachain.s.sol Adds Berachain remote HopV2 deployment parameters.
src/script/hop/DeployRemoteHopV2BSC.s.sol Adds BSC remote HopV2 deployment parameters.
src/script/hop/DeployRemoteHopV2Avalanche.s.sol Adds Avalanche remote HopV2 deployment parameters and RouteScan verifier URL.
src/script/hop/DeployRemoteHopV2.s.sol Refactors the shared remote deployment script (Script-based broadcast + deterministic CREATE2 proxy flow + updated constants/validation).
src/script/hop/DeployFraxtalHopV2.s.sol Refactors Fraxtal hub deployment script (Script-based broadcast + deterministic CREATE2 proxy flow).
foundry.toml Pins default evm_version to Cancun; adds Base RPC endpoint + Basescan config.
README.md Replaces README with comprehensive Hop V2 technical documentation and updated deployed addresses table.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

pegahcarter and others added 8 commits February 25, 2026 10:57
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
- DeployRemoteHopV2ZkSync: zkEVM CREATE2 salts mined via create2crunch --zksync
- DeployRemoteHopV2Abstract: same zkEVM salts (identical bytecodeHash)
- DeployRemoteHopV2Hyperliquid: standard EVM CREATE2 (cancun salts)
- All scripts override _deployRemoteHopV2() and _deployRemoteAdmin()
- zkEVM expected addresses: impl 0x00000001Fc41bB036e7e894F70879F7cA8a4adFc,
  proxy 0x0000000175B6B4DDe153c7aE06E4F0b27eEe42DF,
  admin 0x0000000221a0682d34a635ecAa38C98b31EfFc51
- Added NatSpec docs with simulate/broadcast commands
…hyperliquid

deploy zksync abstract hyperliquid
@dhruvinparikh
Copy link

// SPDX-License-Identifier: MIT
pragma solidity 0.8.23;

import { Script } from "forge-std/Script.sol";
import { console } from "forge-std/Script.sol";
import { RemoteHopV2 } from "src/contracts/hop/RemoteHopV2.sol";
import { ITransparentUpgradeableProxy } from "frax-std/FraxUpgradeableProxy.sol";

interface ISendLibrary {
    function treasury() external view returns (address);
}

/// @notice Recovery script to initialize the Sei RemoteHopV2 proxy after failed deployment.
/// @dev Pre-requisite: Sei msig (0x223a681fc5c5522c85C96157c0efA18cd6c5405c) must first call
///      changeAdmin(deployer) on the proxy to give deployer proxy admin back.
///
/// forge script src/script/hop/InitRemoteHopV2Sei.s.sol --rpc-url https://evm-rpc.sei-apis.com --broadcast --gcp --sender 0x54f9b12743a7deec0ea48721683cbebedc6e17bc
contract InitRemoteHopV2Sei is Script {
    // Addresses
    address constant PROXY = 0x0000006D38568b00B457580b734e0076C62de659;
    address constant IMPLEMENTATION = 0x0000000087ED0dD8b999aE6C7c30f95e9707a3C6;
    address constant REMOTE_ADMIN = 0x954286118E93df807aB6f99aE0454f8710f0a8B9;
    address constant PROXY_ADMIN_MSIG = 0x223a681fc5c5522c85C96157c0efA18cd6c5405c;

    // LZ config
    address constant ENDPOINT = 0x1a44076050125825900e736c501f859c50fE728c;
    uint32 constant LOCAL_EID = 30_280;
    address constant FRAXTAL_HOP = 0x00000000e18aFc20Afe54d4B2C8688bB60c06B36;
    address constant EXECUTOR = 0xc097ab8CD7b053326DFe9fB3E3a31a0CCe3B526f;
    address constant DVN = 0x6788f52439ACA6BFF597d3eeC2DC9a44B8FEE842;
    address constant SEND_LIBRARY = 0xC39161c743D0307EB9BCc9FEF03eeb9Dc4802de7;

    // Sei governance msig (for DEFAULT_ADMIN_ROLE)
    address constant SEI_MSIG = 0x0357D02fc95320b990322d3ff69204c3D251171b;

    // Approved OFTs
    address constant frxUsdOft = 0x80Eede496655FB9047dd39d9f418d5483ED600df;
    address constant sfrxUsdOft = 0x5Bff88cA1442c2496f7E475E9e7786383Bc070c0;
    address constant frxEthOft = 0x43eDD7f3831b08FE70B7555ddD373C8bF65a9050;
    address constant sfrxEthOft = 0x3Ec3849C33291a9eF4c5dB86De593EB4A37fDe45;
    address constant wFraxOft = 0x64445f0aecC51E94aD52d8AC56b7190e764E561a;
    address constant fpiOft = 0x90581eCa9469D8D7F5D3B60f4715027aDFCf7927;

    bytes32 constant PAUSER_ROLE = 0x65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a;

    function run() public {
        vm.startBroadcast();

        // --- Phase 1: Proxy admin operations (deployer must be proxy admin) ---

        // Build initialize calldata
        address[] memory approvedOfts = new address[](6);
        approvedOfts[0] = frxUsdOft;
        approvedOfts[1] = sfrxUsdOft;
        approvedOfts[2] = frxEthOft;
        approvedOfts[3] = sfrxEthOft;
        approvedOfts[4] = wFraxOft;
        approvedOfts[5] = fpiOft;

        address TREASURY = ISendLibrary(SEND_LIBRARY).treasury();
        console.log("Treasury:", TREASURY);

        bytes memory initializeArgs = abi.encodeCall(
            RemoteHopV2.initialize,
            (
                LOCAL_EID,
                ENDPOINT,
                bytes32(uint256(uint160(FRAXTAL_HOP))),
                3, // numDVNs
                EXECUTOR,
                DVN,
                TREASURY,
                approvedOfts
            )
        );

        // 1. upgradeToAndCall (requires deployer to be proxy admin)
        ITransparentUpgradeableProxy(PROXY).upgradeToAndCall(IMPLEMENTATION, initializeArgs);
        console.log("upgradeToAndCall: OK");

        // 2. Return proxy admin to msig
        ITransparentUpgradeableProxy(PROXY).changeAdmin(PROXY_ADMIN_MSIG);
        console.log("changeAdmin back to msig: OK");

        // --- Phase 2: Implementation calls (deployer is NOT proxy admin, calls fall through) ---

        RemoteHopV2 remoteHop = RemoteHopV2(payable(PROXY));

        // 3. Set Solana executor options
        remoteHop.setExecutorOptions(
            30_168,
            hex"0100210100000000000000000000000000030D40000000000000000000000000002DC6C0"
        );
        console.log("setExecutorOptions: OK");

        // 4. Grant PAUSER_ROLE to 7 signers
        remoteHop.grantRole(PAUSER_ROLE, 0x54C5Ef136D02b95C4Ff217aF93FA63F9E4119919); // carter
        remoteHop.grantRole(PAUSER_ROLE, 0x17e06ce6914E3969f7BD37D8b2a563890cA1c96e); // sam
        remoteHop.grantRole(PAUSER_ROLE, 0x8d8290d49e88D16d81C6aDf6C8774eD88762274A); // dhruvin
        remoteHop.grantRole(PAUSER_ROLE, 0xcbc616D595D38483e6AdC45C7E426f44bF230928); // travis
        remoteHop.grantRole(PAUSER_ROLE, 0x381e2495e683868F693AA5B1414F712f21d34b40); // thomas
        remoteHop.grantRole(PAUSER_ROLE, 0x6e74053a3798e0fC9a9775F7995316b27f21c4D2); // nader
        remoteHop.grantRole(PAUSER_ROLE, 0xC6EF452b0de9E95Ccb153c2A5A7a90154aab3419); // dennis
        console.log("grantRole PAUSER_ROLE x7: OK");

        // 5. Grant DEFAULT_ADMIN_ROLE to governance msig and RemoteAdmin
        remoteHop.grantRole(bytes32(0), SEI_MSIG);
        remoteHop.grantRole(bytes32(0), REMOTE_ADMIN);
        console.log("grantRole DEFAULT_ADMIN_ROLE to msig & remoteAdmin: OK");

        // 6. Renounce deployer's DEFAULT_ADMIN_ROLE
        remoteHop.renounceRole(bytes32(0), msg.sender);
        console.log("renounceRole DEFAULT_ADMIN_ROLE: OK");

        vm.stopBroadcast();

        console.log("\n=== Sei RemoteHopV2 initialization complete ===");
        console.log("Proxy:", PROXY);
        console.log("Implementation:", IMPLEMENTATION);
        console.log("Proxy Admin:", PROXY_ADMIN_MSIG);
        console.log("RemoteAdmin:", REMOTE_ADMIN);
    }
}

@dhruvinparikh
Copy link

Task to deploy and wire up all RemoteHopV2s to the FraxtalHopV2.

Task: submit tx to wire up currently deployed RemoteHops

  • multisig: [link]

  • Address to call: 0x00000000e18aFc20Afe54d4B2C8688bB60c06B36

  • Function to execute: setRemoteHop(uint32, address)

    • 30110, 0x0000006D38568b00B457580b734e0076C62de659 (Arbitrum)
    • 30106, 0x0000006D38568b00B457580b734e0076C62de659 (Avalanche)
    • 30184, 0x0000006D38568b00B457580b734e0076C62de659 (Base)
    • 30362, 0x0000006D38568b00B457580b734e0076C62de659 (Berachain)
    • 30102, 0x0000006D38568b00B457580b734e0076C62de659 (BSC)
    • 30101, 0x0000006D38568b00B457580b734e0076C62de659 (Ethereum)
    • 30339, 0x0000006D38568b00B457580b734e0076C62de659 (Ink)
    • 30375, 0x0000006D38568b00B457580b734e0076C62de659 (Katana)
    • 30183, 0x0000006D38568b00B457580b734e0076C62de659 (Linea)
    • 30260, 0x0000006D38568b00B457580b734e0076C62de659 (Mode)
    • 30390, 0x0000006D38568b00B457580b734e0076C62de659 (Monad)
    • 30111, 0x0000006D38568b00B457580b734e0076C62de659 (Optimism)
    • 30370, 0x0000006D38568b00B457580b734e0076C62de659 (Plume)
    • 30109, 0x0000006D38568b00B457580b734e0076C62de659 (Polygon)
    • 30214, 0x0000006D38568b00B457580b734e0076C62de659 (Scroll)
    • 30280, 0x0000006D38568b00B457580b734e0076C62de659 (Sei)
    • 30332, 0x0000006D38568b00B457580b734e0076C62de659 (Sonic)
    • 30396, 0x0000006D38568b00B457580b734e0076C62de659 (Stable)
    • 30320, 0x0000006D38568b00B457580b734e0076C62de659 (Unichain)
    • 30319, 0x0000006D38568b00B457580b734e0076C62de659 (Worldchain)

TODO:

  • Deploy to Zk-chains (Abstract, ZkSync)
  • Deployer to HyperEVM
  • Submit tx to wire up aforementioned hops

Aurora is left -- intentional?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants