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

Important: If you're encountering any problem declaring contracts, please read the Blake Hash Support information.

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)