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

declare

fn declare(contract: ByteArray) -> Result<DeclareResult, Array<felt252>>

Declares a contract for later deployment.

The contract argument accepts either a contract name (e.g. MyContract), an absolute module tree path (e.g. my_package::module::MyContract) or a partial module tree path (e.g. module::MyContract). Use the full module path to disambiguate when multiple contracts share the same name.

Returns the DeclareResult.