> 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/installation.md).

# Installation

## Prerequisites

* **Rust 1.85+** — the crate declares `rust-version = "1.85"` (edition 2024).
* **`wasm32v1-none` target** — only needed if you also want to *build* Soroban contracts (the fixture contract, for example). The estimator itself reads pre-compiled `.wasm` files and does not need the target.
* **Network access** to a Soroban RPC endpoint. The tool defaults to the well-known endpoints below; override any of them with `--rpc-url`.

| Network     | Endpoint                              |
| ----------- | ------------------------------------- |
| `testnet`   | `https://soroban-testnet.stellar.org` |
| `mainnet`   | `https://soroban.stellar.org`         |
| `futurenet` | `https://rpc-futurenet.stellar.org`   |

`--rpc-url` overrides network-based resolution for every command, so you can point at a private or local RPC:

```bash
soroban-cost-estimator estimate \
  --wasm contract.wasm \
  --rpc-url https://custom-rpc.example.com
```

## From crates.io

```bash
cargo install soroban-cost-estimator
```

This installs the `soroban-cost-estimator` binary (and the developer-only `gen_test_wasm` helper) into `~/.cargo/bin`.

## From source

```bash
git clone https://github.com/aigbagbobila/soroban-cost-estimator.git
cd soroban-cost-estimator
cargo install --path .
```

## Verify the install

```console
$ soroban-cost-estimator --help
Estimate Soroban contract costs & track network pricing changes

Usage: soroban-cost-estimator <COMMAND>

Commands:
  estimate      Simulate a single contract invocation and print the cost report
  estimate-all  Enumerate all public contract functions and estimate each one
  config        Fetch and store a snapshot of the network's resource-pricing configuration
  watch         Poll network config on an interval and print diffs when they appear
  help          Print this message or the help of the given subcommand(s)

Options:
  -h, --help  Print help
```

All commands write their state to `~/.soroban-cost-estimator/` — snapshots under `snapshots/` and past estimate results under `cache/`. No database is required. See [Caching](/soroban-cost_estimator-docs/caching.md) for the cache layout.


---

# 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/installation.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.
