Advanced

Designing Bridges — Hands-on lab

Understand cross-chain architecture.

Developer Advanced
6/8 — Designing Bridges — Hands-on lab

Sim firstHash sample messages, flip chain IDs, and confirm hashes change. Try replaying the same payload twice and ensure the second fails.

InstrumentEmit events with message IDs so you can mirror them across chains in tests.

Steps
  1. Hash a message with:Source/target IDs; change one byte and confirm different hash.
  2. Call lock twice with:Same nonce; assert the second reverts.
  3. Try release on target:With wrong chain IDs in the proof; expect revert.
  4. Simulate verifier rotation; new:Signer should work, old signer should fail.
  5. Pause the bridge and:Assert release/lock fail while read paths work.
← Previous section
Next section →