Full Development Setup for ATS
Complete guide for setting up the Asset Tokenization Studio development environment.
Overview
This guide walks you through cloning the repo, building all components, deploying the smart contracts, and running the web application.
Prerequisites
- Node.js: v20.19.4 or newer
- npm: v10.9.0 or newer
- Git: For cloning the repository
- Hedera Account: Testnet or mainnet account with HBAR
- Code Editor: VS Code recommended with Solidity extensions
Step 1: Clone and Install
# Clone the repository
git clone https://github.com/hashgraph/asset-tokenization-studio.git
cd asset-tokenization-studio
# Install all dependencies
npm ci
Step 2: Build All ATS Components
Build contracts, SDK, and web application in order:
# Build everything with one command
npm run ats:build
# Or build individually
npm run ats:contracts:build
npm run ats:sdk:build
npm run ats:web:build
Step 3: Smart Contracts Setup
Configure Environment
Navigate to the contracts directory:
cd packages/ats/contracts
Create .env file:
cp .env.example .env
Edit .env with your private key and endpoints. See packages/ats/contracts/.env.example for all available variables, or the Contract Deployment Guide for a minimal testnet example.
Deploy Contracts
From packages/ats/contracts/:
# Example for testnet, replace with your target network
npm run deploy:hedera:testnet
If everything goes well you could see this message:
...
[INFO] ---
[SUCCESS] ✅ Deployment completed successfully!
INFO] ---
...
Step 4: Web Application Setup
Configure the web application:
cd apps/ats/web
cp .env.example .env
Edit .env with your deployed contract IDs and endpoints. See apps/ats/web/.env.example for all available variables (preconfigured for testnet).
Network Configuration
# Hedera Mirror Node
REACT_APP_MIRROR_NODE=https://testnet.mirrornode.hedera.com/api/v1/
# Hedera JSON-RPC Relay
REACT_APP_RPC_NODE=https://testnet.hashio.io/api
WalletConnect Configuration (Optional)
Required only if using HashPack, Blade, or other non-MetaMask wallets:
# Get your project ID from https://cloud.walletconnect.com
REACT_APP_PROJECT_ID=your_project_id_here
Note: MetaMask connects directly and does not require WalletConnect configuration.
Contract Addresses
You can find the address of your deployed contracts in hedera testnet at package/ats/contracts/deployments/hedera-testnet/newBlr-<DATE>.json
For REACT_APP_RPC_RESOLVER use infrastructure/blr/proxyContractId address
For REACT_APP_RPC_FACTORY use infrastructure/factory/proxyContractId address
# Business Logic Resolver Contract ID
REACT_APP_RPC_RESOLVER=0.0.12345678
# Factory Contract ID
REACT_APP_RPC_FACTORY=0.0.87654321
Note: Replace the contract IDs with your deployed contract addresses. See the Deployed Addresses for testnet/mainnet addresses, or the Deployment Guide for instructions on deploying your own contracts.
Optional Configuration
# Show cookie disclaimer popup
REACT_APP_SHOW_DISCLAIMER=true
Run the development server:
npm run dev
# Or from root: npm run ats:web:dev
Troubleshooting
Build Fails
# Clean build artifacts
npm run ats:clean
# Remove node_modules and reinstall
npm run clean:deps
npm ci
# Rebuild
npm run ats:build
TypeChain Errors
TypeChain generates TypeScript bindings from Solidity contracts. If you get errors:
cd packages/ats/contracts
npm run clean
npm run compile
Port Already in Use
# Kill process on port 5173
lsof -ti:5173 | xargs kill -9
# Or change port in vite.config.ts
Version Mismatches
Ensure all packages use compatible versions:
# Check package versions
npm list @hashgraph/asset-tokenization-contracts
npm list @hashgraph/asset-tokenization-sdk
Contract Not Found
- Verify contract IDs in
.envare correct - Ensure contracts are deployed to the network you're using
- Check that the Business Logic Resolver and Factory are properly configured
Next Steps
- Developer Guides - Learn about architecture and patterns
- Contract Development - Deploy and customize contracts
- SDK Integration - Integrate ATS into your project
- API Documentation - Technical reference