Skip to main content

Overview

Dokrypt’s bridge simulator lets you test cross-chain workflows locally. It simulates token transfers between local chains by modifying balances directly — no actual cross-chain messaging protocol is involved. This is useful for:
  • Testing multi-chain dApps
  • Simulating L1↔L2 bridges
  • Testing cross-chain token transfers
  • Developing bridge aggregators

Setup

To use the bridge, your dokrypt.yaml needs multiple chains:
Start the environment:

Sending Transfers

Simulate a cross-chain transfer:
With options:

How It Works

  1. Resolves RPC endpoints for both chains
  2. Sends a transaction to the bridge contract (0x...B12D) on the source chain
  3. Mines a block on the source chain
  4. Reads the recipient’s current balance on the destination chain
  5. Adds the bridged amount to the balance on the destination chain

Bridge Status

Check the status of bridge queues:

Relay Messages

Force relay pending bridge messages by mining confirmation blocks:
This mines blocks on each chain and triggers the bridge service relay endpoint.

Bridge Configuration

View the full bridge configuration:

Configuration in dokrypt.yaml

Multi-Bridge Setup

You can configure multiple bridges for complex multi-chain scenarios:
The bridge simulator directly modifies destination chain balances. It does not deploy or interact with actual bridge smart contracts. For testing real bridge protocol implementations, deploy the bridge contracts as part of your project.