A modern full-stack dApp development boilerplate for building on Polkadot. This project combines Polkadot and EVM connectivity, enabling developers to interact with native Substrate pallets, precompiles, and deploy Solidity smart contracts.
| Wallet Type | Supported Wallets |
|---|---|
| Polkadot | Polkadot.js Extension, Talisman, SubWallet |
| EVM | MetaMask, Talisman, WalletConnect v2 |
- Interact with native Substrate pallets using connected polkadot wallet.
- Real-time chain state queries
- Integrated Hardhat environment with Polkadot plugin
- Automatic UI generation from contract ABIs
- Interact with EVM smart contracts using connected EVM wallet.
- Modern React + TypeScript + Vite setup
- Styled with Tailwind CSS and shadcn/ui
Before you begin, make sure you have:
- Node.js (v18 or higher)
- npm or yarn
- A Polkadot wallet extension installed
- An EVM wallet (MetaMask recommended)
git clone https://github.com/NevvDevvLabs/Dot-Starter-Kit
cd Dot-Starter-Kit
npm iGo to polkadot faucet and claim tokens to your dev wallet:
- Select Passet Hub: smart contracts testnet
- Enter your wallet address and request tokens
# Navigate to hardhat directory
cd hardhat
# Set your deployment private key
npx hardhat vars set DEPLOYER_PK
# Enter your wallet private key when prompted
# Install specific Solidity version (if needed)
npm install --save-dev [email protected]
# Compile contracts
npx hardhat compile
# Deploy to Paseo Asset Hub testnet
npx hardhat ignition deploy ./ignition/modules/MyToken.ts --network passetHub
# Prepare contract data for frontend
node prepare-contracts.ts# Navigate to webapp directory
cd ./webapp
# Setup Polkadot API chains
npx papi add paseo_asset_hub -n paseo_asset_hub
npx papi add paseo -n paseo
npx papi generate
# Create environment file
cp .env.example .envEdit .env file:
VITE_WALLET_CONNECT=your_wallet_connect_project_id_here# Start development server
npm run devHow It Works:
- The
prepare-contracts.tsscript should be executed before web app development or build processes after Solidity contracts were compiled and redeployed - It reads
deployed_addresses.jsonfrom your Hardhat Ignition deployments - It matches these with the corresponding ABIs in the artifacts directory
- It generates a single
contracts-data.jsonfile in your/webapp/src/datadirectory - The React components import this file directly, avoiding runtime loading issues
# Generate contract data for development chain
node prepareContracts.ts
# Generate contract data for a specific chain
node prepareContracts.ts chain-420420421When you deploy new contracts:
- After deployment, your contract artifacts will be in
hardhat/ignition/deployments/chain-[chainId]/ - Run the prepare-contracts.ts script for your environment
- The React app will automatically use the updated contract data
The starter kit is configured for:
- Passet Hub: Smart Contracts (Testnet)
Testnet details:
* Network name: Passet Hub
* Chain ID: 420420421
* RPC URL: https://testnet-passet-hub-eth-rpc.polkadot.io
* Block Explorer URL: https://blockscout-passet-hub.parity-testnet.parity.io/DEPLOYER_PK=your_private_key_hereVITE_WALLET_CONNECT=your_wallet_connect_project_idIf you see "No deployed contracts found" in the UI:
- Check that the
prepareContracts.tsscript ran successfully - Verify that your
deployed_addresses.jsonfile exists and is correct - Check that the
contracts-data.jsonfile was properly generated in the/webapp/src/data/directory - Make sure the import path in your React component matches the location of the generated file
We welcome contributions from all Web3 developers. Here's how you can help:
- 🐛 Bug Reports
- 💡 Feature Requests
- 📝 Documentation
- 🧪 Testing
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Add new feature: Test your code before moving to the next part of the process to make sure it works properly
- Submit a pull request: In the description include overview of the changes that were made and new features that were added
