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
| Tool | Purpose | Recommended version |
|---|---|---|
| Node.js | JavaScript runtime for Hardhat and SDKs | 18 or newer |
| npm (or pnpm / yarn) | Package manager | Comes with Node.js |
| Hardhat or Foundry | Solidity build / test / deploy toolchain | Latest stable |
| Git | Version control | Any recent version |
| A code editor | VS Code recommended | - |
You do not need Rust, Go, or any special OXN-specific toolchain to develop dApps.
Recommended VS Code extensions
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:
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
- Compiling Contracts — critical compiler settings
- Deploy Your First Contract (Hardhat) — end-to-end walkthrough