Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

How Contracts Are Collected

snforge supports two mechanisms for collecting contracts used in tests.

Differences Between Collection Mechanisms

FeatureOld MechanismOptimised Mechanism
Using contracts from /src✅✅
Using contracts from /tests❌✅
Using contracts from modules marked with #[cfg(test)]❌✅
Using contracts from dependencies✅✅
Contracts more closely resemble ones from real network✅❌
Less compilation steps required (faster compilation)❌✅
Additional compilation step required (scarb build)✅❌