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

constructor

Constructor function for initializing the Obscura contract.This function sets up the initial state of the privacy system, including the Merkle tree and system parameters. # Arguments * levels - The depth of the Merkle tree (number of levels) * maximum_deposit_amount - The maximum amount allowed for deposits # Initialization Steps 1. Sets the contract owner to the caller 2. Initializes the Merkle tree with the specified depth 3. Configures the maximum deposit amount # Security - Only callable during contract deployment - Sets up the foundational privacy infrastructure

Fully qualified path: obscura::obscura::Obscura::constructor

pub fn constructor(ref self: ContractState, levels: u32, maximum_deposit_amount: u256)