Skip to main content

Development Environment Setup

Before writing your first line of Solidity, get the environment right. This page lists what to install and how to configure it for OXN.

Required tools

ToolPurposeRecommended version
Node.jsJavaScript runtime for Hardhat and SDKs18 or newer
npm (or pnpm / yarn)Package managerComes with Node.js
Hardhat or FoundrySolidity build / test / deploy toolchainLatest stable
GitVersion controlAny recent version
A code editorVS Code recommended-

You do not need Rust, Go, or any special OXN-specific toolchain to develop dApps.

For Solidity development:

  • Solidity (JuanBlanco.solidity) — syntax highlighting, linting, compiler integration
  • Prettier - Code formatter — consistent formatting
  • ESLint — JavaScript / TypeScript linting for scripts

Environment variables

Most dApp projects use a .env file for secrets and endpoint URLs. Recommended contents:

.env
PRIVATE_KEY=0x... # your funded testnet account
OXN_RPC_URL=https://rpc.bout.network
OXN_CHAIN_ID=186

Never commit .env — add it to .gitignore. For CI, use encrypted secrets rather than committed files.

Directory layout

For a standard Hardhat project:

my-oxn-dapp/
├── contracts/ # Solidity source
├── scripts/ # deployment and interaction scripts
├── test/ # tests
├── hardhat.config.js # Hardhat configuration
├── package.json
├── .env # secrets (do not commit)
└── .gitignore

For Foundry:

my-oxn-foundry/
├── src/ # Solidity source
├── test/ # Solidity tests
├── script/ # deployment scripts
├── lib/ # dependencies (git submodules)
├── foundry.toml
├── remappings.txt
└── .gitignore

OXN-specific packages

For confidential contract interaction from JavaScript, you'll want:

npm install --save @oasisprotocol/sapphire-ethers-v6

For Hardhat integration:

npm install --save-dev @oasisprotocol/sapphire-hardhat

See Quickstart: Hardhat for the complete setup walkthrough, or SDKs: TypeScript / JavaScript for the SDK reference.

Sanity checks

Run these before starting development to confirm your environment is correct:

node --version # >= 18
npm --version # any recent
git --version # any recent
curl -s https://rpc.bout.network -X POST \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","method":"eth_chainId","id":1}' | grep '"0xba"'

The last check confirms the OXN RPC is reachable and returning the expected chain ID.

Next steps