Agents - Complete deployment guide and troubleshooting reference for agents
1. Quick Start with kitdot
Who This Guide Is For
Developers with solid programming skills but no Web3/Polkadot experience.
Key Goal
Deploy working smart contracts on Polkadot testnet and build a functional frontend within hackathon timeframes.
Start Your Project with kitdot
Recommended: Use kitdot@latest for proper network configuration and project setup:
or
Why kitdot? Ensures proper network settings, correct dependencies, and battle-tested configurations. Skip setup headaches and start building immediately.
Web2 Experience on Web3: kitdot's default setup initializes a complete frontend project that provides a familiar Web2 user experience for Web3 applications. Users interact with your dApp without needing to understand blockchain complexity.
Existing Project? Start fresh with kitdot@latest and copy your files over. This prevents configuration conflicts and network connection issues.
2. Pre-Built Contract Libraries
Leverage Existing Code
Before building from scratch, explore these battle-tested contract libraries:
Getting ABI for Frontend Projects: After compiling contracts in Remix:
Go to Solidity Compiler tab
Click on your contract name under compilation artifacts
Copy the ABI array from the compilation details
Use in frontend projects:
Path 2: Manual Hardhat Setup (Not Recommended)
Use kitdot@latest instead for automated setup, but if you must set up manually:
IMPORTANT: Always use @parity/hardhat-polkadot instead of standard hardhat. This plugin provides essential PolkaVM compatibility and network configurations required for Polkadot deployment.
kitdot@latest handles this automatically with proper network configurations.
Path 3: Local Development Network
For local testing without connecting to testnets:
Note: This runs a standard Ethereum local testnet, not a PolkaVM-compatible network. Use for initial development and testing before deploying to Paseo.
Create hardhat.config.js:
Setup Wallet:
Test Setup:
4. Smart Contract Development
Critical Constraints
Maximum bytecode: ~100KB
Solidity version: ^0.8.28
Test Contract
Minimal ERC20
Deployment Strategy
5. Wallet Setup (If not using default template from kitdot)
Enable Testnets on Your Wallet
MetaMask:
Open MetaMask extension
Click on your profile icon (top right)
Go to Settings → Advanced
Enable Show test networks
Your network dropdown will now show testnet options
Comprehensive P2P Sharing Economy Catalog: Extensive catalog of peer-to-peer sharing economy platforms across various sectors with implemented applications and "Possible Ideas" for unexplored categories. Perfect for identifying market gaps and building decentralized alternatives.
Polkadot Smart Contract Basic Guide: If you want to start from scratch and need more in-depth documentation on Polkadot smart contracts, such as a 101 for beginners, we suggest checking out this guide.
npm install -g kitdot@latest
kitdot init my-polkadot-project
cd my-polkadot-project
// Save ABI as contractABI.json or import directly
import { ethers } from "ethers";
const contractABI = [
/* paste ABI array here */
];
const contract = new ethers.Contract(contractAddress, contractABI, signer);
# Run local generic testnet (NOT a PolkaVM testnet)
npx hardhat node
# In another terminal, deploy to local network
npx hardhat ignition deploy ./ignition/modules/YourModule.js --network localhost
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.28;
contract Test {
uint256 public value = 42;
function setValue(uint256 _value) external { value = _value; }
}
contract SimpleToken {
mapping(address => uint256) public balanceOf;
uint256 public totalSupply;
string public name;
string public symbol;
constructor(string memory _name, string memory _symbol, uint256 _supply) {
name = _name; symbol = _symbol; totalSupply = _supply;
balanceOf[msg.sender] = _supply;
}
function transfer(address to, uint256 amount) external returns (bool) {
require(balanceOf[msg.sender] >= amount, "Insufficient balance");
balanceOf[msg.sender] -= amount;
balanceOf[to] += amount;
return true;
}
}