Skip to main content

Local Development

The xyz localnet command provides a complete local blockchain environment for development and testing.

Why Localnet?

What’s Included

When you start localnet, you get:
  • Full XYZ Chain node running locally
  • Pre-funded test accounts (alice, bob)
  • All APIs (RPC, REST, gRPC)
  • WASM contracts enabled for smart contracts

Architecture

Quick Start

Endpoints

Test Accounts

Localnet comes with pre-funded accounts: These accounts are automatically available in your keyring when localnet starts.

Data Directory

Localnet stores data in ~/.xyz-localnet/:

Reset State

To start fresh:

Development Workflow

1. Start Localnet

2. Deploy Contract

3. Interact

4. Iterate

Make changes and redeploy:

5. Reset When Needed

Troubleshooting

Another process is using port 26657, 1317, or 9090:
Try resetting:
Ensure localnet is running:
Test accounts are only available when localnet is active.

Next Steps