# Dev environment

You'll build and run `svpchaind` — a Cosmos SDK app with EVM execution — and boot a single-node devnet locally. The local chain uses chain-id `localsvp-1`, native denom `asvp`, and address prefix `svp`.

### Prereqs

* **Go 1.23.8+** (1.23.x) — [go.dev/dl](https://go.dev/dl/) or `brew install go@1.23`
* **git** with a GitHub SSH key (the `proto` submodule is fetched over SSH)
* **make**
* Docker is **not** required for this path.

### Set up a local node

{% stepper %}
{% step %}

### 1) Clone with submodules

```sh
git clone --recurse-submodules git@github.com:svpchain/protocol.git
cd protocol
```

{% endstep %}

{% step %}

### 2) Build and install the binary

This puts `svpchaind` on your `PATH`.

```sh
export PATH="$(go env GOPATH)/bin:$PATH"   # add to your shell profile
make install
```

{% endstep %}

{% step %}

### 3) Boot a single-node devnet

Starts a node with the EVM JSON-RPC enabled.

```sh
./scripts/local_node_evm.sh -y
```

This initializes a fresh node home at `~/.svpchain`, wires up genesis, and starts producing blocks.
{% endstep %}
{% endstepper %}

### Local endpoints

| Surface      | Endpoint          |
| ------------ | ----------------- |
| CometBFT RPC | `localhost:26657` |
| Cosmos REST  | `localhost:1317`  |
| Cosmos gRPC  | `localhost:9090`  |
| EVM JSON-RPC | `localhost:8545`  |

### Verify

In a second terminal, confirm the chain is up on both surfaces:

```sh
# Cosmos side — block height should be rising
curl -s localhost:26657/status | jq '.result.sync_info.latest_block_height'

# EVM side — should return a rising block number
curl -s -X POST localhost:8545 \
  -H 'Content-Type: application/json' \
  --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
```

Both responding means the chain is producing blocks.

### Going further

* Run the tests: `make test`.
* Multi-validator Docker localnet with the full trading genesis: `make localnet-start`.

### Next steps

<table data-view="cards"><thead><tr><th>Build</th><th data-card-target data-type="content-ref">Link</th></tr></thead><tbody><tr><td>Deploy a contract</td><td><a href="/pages/jhwQeKXQn4fckrkrItgY">/pages/jhwQeKXQn4fckrkrItgY</a></td></tr><tr><td>Connect to public testnet</td><td><a href="/pages/cpwIVJW4kpzWipe3n6ff">/pages/cpwIVJW4kpzWipe3n6ff</a></td></tr><tr><td>Run a full node or validator</td><td><a href="/pages/p9rWsd496Uzo8t7l798F">/pages/p9rWsd496Uzo8t7l798F</a></td></tr><tr><td>Integrate via APIs</td><td><a href="/pages/Szj1UEiT5Yq0LhF5m7PB">/pages/Szj1UEiT5Yq0LhF5m7PB</a></td></tr></tbody></table>


---

# 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:

```
GET https://svpchain.gitbook.io/svpchain-docs/build/dev-environment.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
