> ## Documentation Index
> Fetch the complete documentation index at: https://solana.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> This page is part of the Solana developer documentation at https://solana.com/developers/docs. Append `.md` to any docs URL, or send `Accept: text/markdown`, to get the page as Markdown.
> Index of all pages: https://solana.com/llms.txt. Per-section indexes such as https://solana.com/developers/docs/payments/llms.txt are smaller; prefer them when working on one task.
> Coding agents: install the official Solana skill for current APIs and conventions with `npx skills add https://github.com/solana-foundation/solana-dev-skill` (also served at https://solana.com/SKILL.md).
> Code in the cookbook and task pages comes from tested example files. Prefer it over writing API calls from memory.

# Ortam Yapılandırması

> LiteSVM test ortamlarını yapılandırmak için builder deseni yöntemleri

Tüm yapılandırma yöntemleri, `LiteSVM::new()` üzerinde zincirleme çağrılan builder yöntemleridir.

<Warning>
  `LiteSVM::default()` ile başlamayın. Bu yöntem; sysvar, program veya airdrop
  hesabı içermeyen boş bir örnek oluşturur, bu yüzden `airdrop` panic verir ve
  işlemler başarısız olur. `LiteSVM::new()` ise tamamen kurulmuş bir örnek
  döndürür; bunu aşağıdaki yöntemlerle özelleştirebilirsiniz.
</Warning>

## with_compute_budget

```rust
pub fn with_compute_budget(self, compute_budget: ComputeBudget) -> Self
```

Hesaplama birimi limitlerini ve heap boyutunu ayarlayın.

```rust
use solana_compute_budget::compute_budget::ComputeBudget;

let mut svm = LiteSVM::new()
    .with_compute_budget(ComputeBudget {
        compute_unit_limit: 1_400_000,
        heap_size: 256 * 1024,
        ..ComputeBudget::new_with_defaults(true)
    });
```

## with_sigverify

```rust
pub fn with_sigverify(self, sigverify: bool) -> Self
```

İmza doğrulamasını etkinleştirin veya devre dışı bırakın. Varsayılan: `true`.

```rust
// Disable for faster tests
let mut svm = LiteSVM::new()
    .with_sigverify(false);
```

## with_blockhash_check

```rust
pub fn with_blockhash_check(self, check: bool) -> Self
```

Blockhash doğrulamasını etkinleştirin veya devre dışı bırakın. Varsayılan: `true`.

```rust
// Disable to use any blockhash
let mut svm = LiteSVM::new()
    .with_blockhash_check(false);
```

## with_transaction_history

```rust
pub fn with_transaction_history(self, capacity: usize) -> Self
```

Geçmişte tutulacak işlem sayısını ayarlayın. Varsayılan: `32`. `0` verildiğinde
işlem geçmişi devre dışı kalır; bu durum aynı (özdeş) işlemlerin yeniden
gönderilmesine de olanak tanır.

```rust
// Keep last 100 transactions
let mut svm = LiteSVM::new()
    .with_transaction_history(100);

// Disable history and allow duplicate transactions
let mut svm = LiteSVM::new()
    .with_transaction_history(0);
```

<Note>
  litesvm 0.18'de 32 veya daha küçük herhangi bir değer, `0` gibi geçmişi sessizce
  devre dışı bırakır: `get_transaction` `None` döndürür ve yinelenen işlemler
  kabul edilir. Geçmişi korumak için 100 gibi 32'den büyük bir değer kullanın.
  32'nin üzerindeki değerler tamponu büyütür, ancak tutulan işlem sayısı verdiğiniz
  değerden biraz farklı olabilir.
</Note>

## with_log_bytes_limit

```rust
pub fn with_log_bytes_limit(self, limit: Option<usize>) -> Self
```

İşlem logları için maksimum bayt sayısını ayarlayın. Varsayılan: `Some(10_000)`.

```rust
// Unlimited logs
let mut svm = LiteSVM::new()
    .with_log_bytes_limit(None);

// Custom limit (50KB)
let mut svm = LiteSVM::new()
    .with_log_bytes_limit(Some(50_000));
```

## with_lamports

```rust
pub fn with_lamports(self, lamports: u64) -> Self
```

`airdrop` çağrılarını finanse eden LiteSVM airdrop (faucet) hesabının başlangıç
bakiyesini ayarlayın. Varsayılan: `1_000_000_000_000_000` (1e15 lamports).

```rust
let mut svm = LiteSVM::new()
    .with_lamports(10_000_000_000);
```

## with_default_programs

```rust
pub fn with_default_programs(self) -> Self
```

Varsayılan SPL programlarını (Token, Associated Token vb.) dahil edin.

```rust
let mut svm = LiteSVM::new()
    .with_default_programs();
```

## with_sysvars

```rust
pub fn with_sysvars(self) -> Self
```

Varsayılan sysvar'ları (Clock, Rent, EpochSchedule, SlotHashes, StakeHistory
vb.) dahil eder.

```rust
let mut svm = LiteSVM::new()
    .with_sysvars();
```

## with_feature_set

```rust
pub fn with_feature_set(self, feature_set: FeatureSet) -> Self
```

Belirli çalışma zamanı özelliklerini test etmek için Solana özellik kümesini yapılandırın.

```rust
use agave_feature_set::FeatureSet;
use solana_sdk::native_token::LAMPORTS_PER_SOL;

let mut svm = LiteSVM::default()
    .with_feature_set(FeatureSet::all_enabled())
    .with_builtins()
    .with_lamports(1_000_000 * LAMPORTS_PER_SOL)
    .with_sysvars()
    .with_feature_accounts()
    .with_default_programs()
    .with_sigverify(true)
    .with_blockhash_check(true);
```

Özellik kümesini önce `LiteSVM::default()` üzerinde ayarlayın: bundan sonra
eklenen builtin'ler, sysvar'lar ve özellik hesapları bu kümeyi izler.
`with_feature_set` yöntemini `LiteSVM::new()` üzerine zincirlemek, `new()`
tarafından mainnet özellikleri için kurulan Rent sysvar'ını ve özellik
hesaplarını korur.

## with_precompiles

```rust
#[cfg(feature = "precompiles")]
pub fn with_precompiles(self) -> Self
```

Standart precompile programlarını (ed25519, secp256k1, secp256r1) dahil eder.
`precompiles` özelliği etkinleştirilmedikçe `LiteSVM::new()` kapsamında
bulunmazlar.

```rust
let mut svm = LiteSVM::new()
    .with_precompiles();
```

<Info>
  `precompiles` özellik bayrağı gerekir:

```toml
[dev-dependencies]
litesvm = { version = "0.18", features = ["precompiles"] }
```

</Info>

## with_feature_accounts

```rust
pub fn with_feature_accounts(self) -> Self
```

Özellik geçidi (feature gate) hesaplarını test ortamına dahil edin. Bu, özellik
bayrağına bağlı Solana çalışma zamanı davranışının testlerinize doğru şekilde
yansımasını sağlar.

```rust
let mut svm = LiteSVM::new()
    .with_feature_accounts();
```

## register-tracing özelliği

`register-tracing` özelliği, işlem yürütme sırasında ayrıntılı SBF register
izlemeyi etkinleştirir. `invocation-inspect-callback` özelliğini de kapsar.

```toml
[dev-dependencies]
litesvm = { version = "0.18", features = ["register-tracing"] }
```

Register izlemenin etkin olduğu bir örnek oluşturmak için
`LiteSVM::new_debuggable(true)` kullanın:

```rust
#[cfg(feature = "register-tracing")]
let mut svm = LiteSVM::new_debuggable(true);
```

Etkinleştirildiğinde, register izlerinin yanı sıra disassembly çıktısını da
almak için `SBF_TRACE_DISASSEMBLE` ortam değişkenini ayarlayın:

```bash
SBF_TRACE_DISASSEMBLE=1 cargo test
```

## set_invocation_inspect_callback

```rust
pub fn set_invocation_inspect_callback<C: InvocationInspectCallback + 'static>(&mut self, callback: C)
```

Her program çağrısından önce ve sonra tetiklenen bir callback kaydedin.
`invocation-inspect-callback` özelliği gerekir.

```toml
[dev-dependencies]
litesvm = { version = "0.18", features = ["invocation-inspect-callback"] }
solana-program-runtime = "4"
solana-transaction = "4"
```

```rust
use litesvm::{InvocationInspectCallback, LiteSVM};
use solana_program_runtime::invoke_context::InvokeContext;
use solana_transaction::sanitized::SanitizedTransaction;

struct MyInspector;

impl InvocationInspectCallback for MyInspector {
    fn before_invocation(
        &self,
        _svm: &LiteSVM,
        _tx: &SanitizedTransaction,
        _program_indices: &[u16],
        _invoke_context: &mut InvokeContext,
        _enable_register_tracing: bool,
    ) {
        println!("Before program invocation");
    }

    fn after_invocation(
        &self,
        _svm: &LiteSVM,
        _tx: &SanitizedTransaction,
        _program_indices: &[u16],
        _invoke_context: &InvokeContext,
        _enable_register_tracing: bool,
    ) {
        println!("After program invocation");
    }
}

let mut svm = LiteSVM::new();
svm.set_invocation_inspect_callback(MyInspector);
```
