Skip to main content
Builder for creating FheTestEnv with custom configuration.
use privora_sdk_testing::prelude::*;

let env = FheTestEnv::builder()
    .heap_size(2 * 1024 * 1024)
    .build();

Constructor

new

pub fn new() -> Self
Create builder with defaults.

Methods

heap_size

pub fn heap_size(mut self, size: u32) -> Self
Set heap size for the SVM. Default: 1048560 (~1MB)

seed

pub fn seed(mut self, seed: u64) -> Self
Set seed for key generation (placeholder).

build

pub fn build(self) -> FheTestEnv
Build the test environment.

Example

#[test]
fn test_with_large_heap() {
    let mut env = FheTestEnv::builder()
        .heap_size(2 * 1024 * 1024)  // 2MB heap
        .build();

    env.deploy_program(PROGRAM_ID, include_bytes!("../program.so"));
    // ...
}

Constants

/// Default heap size
pub const DEFAULT_FHE_HEAP_SIZE: u32 = 1048560;