A Next.js-based development stack for building decentralized applications on XRPL with smart contracts. Built with Turborepo, inspired by Scaffold-ETH-2.
- Next.js 14 - Modern React framework with App Router
- Turborepo - High-performance build system for monorepos
- XRPL Integration - Full XRPL client with WebSocket support
- Multi-Wallet Support - Connect with Xaman, Crossmark, GemWallet, or manual address
- Network Switching - Easy switching between AlphaNet, Testnet, and Devnet
- Smart Contract Tools - Deploy and interact with XRPL smart contracts
- Faucet Integration - Request test XRP directly from the UI
- Transaction History - View your transaction history with explorer links
- Debug Panel - Execute custom XRPL commands and view network info
- Sample Contract - Counter contract example in Rust
- Node.js 18+ and pnpm 8+
- Rust (optional, for building contracts)
# Clone the repository
git clone https://github.com/yourusername/scaffold-xrp.git
cd scaffold-xrp
# Install dependencies
pnpm install
# Start the development server
pnpm dev
The app will be available at http://localhost:3000
scaffold-xrp/
├── apps/
│ └── web/ # Next.js application
│ ├── app/ # Next.js App Router
│ ├── components/ # React components
│ └── lib/ # Utilities and configurations
├── packages/
│ └── bedrock/ # Smart contracts (Rust)
│ ├── src/
│ │ └── lib.rs # Counter contract example
│ └── Cargo.toml
├── package.json
├── pnpm-workspace.yaml
└── turbo.json
- Click "Connect Wallet" in the header
- Choose your wallet (Xaman, Crossmark, GemWallet) or enter address manually
- Approve the connection in your wallet extension
- Connect your wallet
- Go to the "Faucet" section
- Click "Request Test XRP"
- Wait for the transaction to complete
- Build your contract (see Building Contracts)
- Go to "Deploy Contract"
- Upload your
.wasmfile - Confirm the transaction (requires 100 XRP fee)
- Copy the contract address from the confirmation
- Go to "Interact with Contract"
- Enter the contract address
- Enter the function name (e.g.,
increment) - Add arguments if needed
- Click "Call Contract Function"
- Confirm the transaction in your wallet
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup target add wasm32-unknown-unknown
cd packages/bedrock
cargo build --target wasm32-unknown-unknown --release
The compiled WASM file will be at:
target/wasm32-unknown-unknown/release/counter.wasm
See packages/bedrock/README.md for more details.
pnpm dev # Start development server
pnpm build # Build all packages
pnpm lint # Lint all packages
pnpm format # Format code with Prettier
pnpm clean # Clean build artifacts
Create a .env.local file in apps/web/:
# Optional: Configure default network
NEXT_PUBLIC_DEFAULT_NETWORK=alphanet
- WebSocket: wss://alphanet.nerdnest.xyz
- Network ID: 21465
- Faucet: https://alphanet.faucet.nerdnest.xyz/accounts
- Explorer: https://alphanet.xrpl.org
- WebSocket: wss://s.altnet.rippletest.net:51233
- Network ID: 1
- Faucet: https://faucet.altnet.rippletest.net/accounts
- Explorer: https://testnet.xrpl.org
- WebSocket: wss://s.devnet.rippletest.net:51233
- Network ID: 2
- Faucet: https://faucet.devnet.rippletest.net/accounts
- Explorer: https://devnet.xrpl.org
- Header - Navigation with wallet connection and network switching
- AccountInfo - Display wallet address and balance
- FaucetRequest - Request test XRP from network faucet
- ContractDeployment - Upload and deploy WASM contracts
- ContractInteraction - Call contract functions
- TransactionHistory - View transaction history
- DebugPanel - Execute custom XRPL commands
- XRPLProvider - Global state for XRPL connection, wallet, and network
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - see LICENSE file for details
- Inspired by Scaffold-ETH-2
- Built for the XRPL community
- Uses Bedrock for smart contract development