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 upgrading snforge to version 0.48.0 or later, please read the 0.48.0 Migration Guide.

Library Reference

ℹ️ Info Full documentation for the snforge library can be found here.

  • declare - declares a contract and returns a ContractClass which can be interacted with later
  • get_call_trace - gets current test call trace (with contracts interactions included)
  • fs - module containing functions for interacting with the filesystem
  • env - module containing functions for interacting with the system environment
  • signature - module containing struct and trait for creating ecdsa signatures

ℹ️ Info To use cheatcodes you need to add snforge_std package as a development dependency in your Scarb.toml using the appropriate version.

[dev-dependencies]
snforge_std = "0.33.0"