> For the complete documentation index, see [llms.txt](https://soroban-cost-estimator.gitbook.io/soroban-cost_estimator-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://soroban-cost-estimator.gitbook.io/soroban-cost_estimator-docs/config-snapshot.md).

# config snapshot

Fetch all six `ConfigSetting` ledger entries, decode them via XDR, timestamp them, and save to disk.

## Flags

```
Usage: soroban-cost-estimator config snapshot [OPTIONS]

Options:
      --network <NETWORK>  Network to fetch config from [default: testnet]
      --out <OUT>          Explicit output path (defaults to ~/.soroban-cost-estimator/snapshots/)
      --json               Print the snapshot as JSON instead of the summary lines
  -h, --help               Print help
```

## Behavior

* Fetches all six `ConfigSetting*` entries in **one batched** `getLedgerEntries` RPC call.
* Decodes each entry's XDR (`stellar-xdr` 27.x, big-endian) into a typed snapshot model.
* Saves the snapshot as `~/.soroban-cost-estimator/snapshots/{network}-{timestamp}.json` — the timestamp makes every snapshot a versioned artifact.
* `--json` also prints the full snapshot as JSON (it still saves it).
* `--out` writes to an explicit path instead of the default directory.

## Example

```bash
soroban-cost-estimator config snapshot --network testnet
```

Actual output from a live testnet run:

```
Config snapshot saved to: /home/you/.soroban-cost-estimator/snapshots/testnet-2026-08-04T07-15-38.487702259+00-00.json
Network: testnet
Ledger:  3470630
Time:    2026-08-04T07:15:38.487702259+00:00
```

The printed `Ledger` is the last ledger at which the config entries were modified on-chain — it is *not* the network's current ledger, and that is intentional: it is the ledger against which stale-cache checks are made.

## What you get

The snapshot JSON contains the decoded values of all six settings, including the fee rates used by `estimate` (see [Resource Fees](/soroban-cost_estimator-docs/resource-fees.md)):

* `contract_compute` — `fee_rate_per_instructions_increment`, memory limits
* `contract_ledger_cost` — read/write entry fees, per-KB disk fees, rent rates
* `contract_historical_data` — `fee_historical1_kb`
* `contract_events` — `fee_contract_events1_kb`
* `contract_bandwidth` — `fee_tx_size1_kb`
* `state_archival` — TTLs, rent-rate denominators, eviction policy

Take a fresh snapshot after every protocol vote and keep them around: [`config diff`](/soroban-cost_estimator-docs/config-diff.md) compares the current configuration against your most recent snapshot.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://soroban-cost-estimator.gitbook.io/soroban-cost_estimator-docs/config-snapshot.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
