Bridging between Holesky and the mev-commit chain is a crucial step for users engaging with cross-chain functionalities. This guide outlines the process using the CLI tool. A user-friendly frontend with wallet integrations is under development and will be launched shortly.

Testing the Bridge CLI

For a quick test using a pre-funded account on Holesky, execute the following one-liner:

curl -s https://raw.githubusercontent.com/primevprotocol/scripts/v0.1.0/bridge.sh | bash

This command simplifies the bridging process, allowing you to quickly experience cross-chain operations.

Setting Up for Bridging

  1. Clone and Build:

Start by cloning the mev-commit-bridge and build the user CLI for your machine from the standard/bridge-v1 directory:

make user_cli

Or use a pre-built binary from the releases tab in mev-commit-bridge.

  1. Configure Environment Variables:

Set the necessary environment variables for a cross-chain transfer. Replace the values below with your own details:

export PRIVATE_KEY="0xe82a054e06f89598485134b4f2ce8a612ce7f7f7e14e650f9f20b30efddd0e57"
export LOG_LEVEL="debug"
export L1_RPC_URL="https://ethereum-holesky.publicnode.com"
export SETTLEMENT_RPC_URL="https://chainrpc.testnet.mev-commit.xyz"
export L1_CHAIN_ID="17000"
export SETTLEMENT_CHAIN_ID="17864"
export L1_CONTRACT_ADDR="0xceff0a364f63f621ff6a8b5ce56569ec6f3c6220"
export SETTLEMENT_CONTRACT_ADDR="0xf60f8e762a3fe90fd4d8c005872b6f6e12eda8ca"

Note the above contract addresses are correct for the current deployment of the mev-commit testnet. Constant ENS addresses will be available soon.

  1. Bridging to mev-commit Chain:

To bridge ether from Holesky to the mev-commit chain, specify the amount in wei and the destination address:

./bin/user_cli bridge-to-settlement --amount $AMOUNT_IN_WEI --dest-addr $DEST_ADDR

Ensure your PRIVATE_KEY corresponds to a funded account on Holesky.

  1. Bridging Back to Holesky:

To return ether to Holesky from the mev-commit chain, use:

./bin/user_cli bridge-to-l1 --amount $AMOUNT_IN_WEI --dest-addr $DEST_ADDR

Here, thePRIVATE_KEY should match an account with funds on the mev-commit chain.