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, yourdokrypt.yaml needs multiple chains:
Sending Transfers
Simulate a cross-chain transfer:How It Works
- Resolves RPC endpoints for both chains
- Sends a transaction to the bridge contract (
0x...B12D) on the source chain - Mines a block on the source chain
- Reads the recipient’s current balance on the destination chain
- 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:Bridge Configuration
View the full bridge configuration:Configuration in dokrypt.yaml
| Field | Type | Default | Description |
|---|---|---|---|
chains | string[] | required | Connected chains |
confirmation_blocks | int | 12 | Blocks before relay |
relay_delay | duration | 30s | Delay before relay |
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.