Usage
dokrypt bridge <subcommand> [flags]
Subcommands
| Subcommand | Description |
|---|
send | Simulate a cross-chain transfer |
status | Show bridge queue status |
relay | Force relay pending messages |
config | Show bridge configuration |
send
Simulate a cross-chain bridge transfer between two local chains.
dokrypt bridge send <from-chain> <to-chain> <amount> [flags]
Arguments
| Argument | Required | Description |
|---|
from-chain | Yes | Source chain name |
to-chain | Yes | Destination chain name |
amount | Yes | Amount in ETH |
Flags
| Flag | Type | Default | Description |
|---|
--token | string | native ETH | Token symbol to bridge |
--from | string | account[0] | Sender address |
How It Works
- Resolves RPC endpoints for both chains from
dokrypt.yaml
- Determines the sender address (from
--from flag or first account on source chain)
- 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 via
anvil_setBalance
Examples
# Bridge 100 ETH from ethereum to polygon
dokrypt bridge send ethereum polygon 100
# Bridge with a specific sender
dokrypt bridge send ethereum arbitrum 50.5 --from 0x1234...abcd
# Bridge tokens
dokrypt bridge send polygon bsc 1000 --token USDC
This is a simulated bridge for local development. It directly modifies balances on the destination chain — no actual cross-chain messaging occurs.
status
Show the bridge queue status from the configuration.
Queries bridge service endpoints for pending messages and displays:
- Service name and connected chains
- Relay delay and confirmation requirements
- Queue status (pending/completed messages)
Example Output
Bridge Chains Relay Delay Confirmations Queue
eth-polygon ethereum → polygon 30s 12 0 pending
polygon-arb polygon → arbitrum 15s 64 2 pending
relay
Force relay all pending bridge messages by mining confirmation blocks.
dokrypt bridge relay [flags]
Flags
| Flag | Type | Default | Description |
|---|
--blocks | int | max from config | Number of blocks to mine |
How It Works
- Determines block count from
--blocks flag or from the maximum confirmation_blocks in bridge config
- Mines blocks on each chain referenced by bridge services
- Triggers bridge service relay endpoints
- Reports the number of relayed messages
Examples
# Relay with default block count
dokrypt bridge relay
# Mine 5 blocks and relay
dokrypt bridge relay --blocks 5
config
Show the detailed bridge configuration from dokrypt.yaml.
Displays each bridge’s configuration including connected chains, engine, chain IDs, and block times.
Example Output
Bridge: eth-polygon
Chain A: ethereum (anvil, chain_id=31337, block_time=2s)
Chain B: polygon (anvil, chain_id=137, block_time=2s)
Relay Delay: 30s
Confirmations: 12