Skip to content

sim:expect

Assert that a condition is true.

sim:expect <condition>
Name Type Description
condition bool Boolean condition to assert
# Assert a simple condition
sim:expect true
# Assert with variables
set $a 42
sim:expect @bool($a == 42)
  • If the condition is false, the script halts with an assertion error
  • Typically used inside sim:fork blocks to verify simulated outcomes
  • fork — simulate on a forked chain
  • @bool — boolean expressions