githubEditar

Polkadot Hackathon Development Guide

For Developers New to Web3

Documentation Overview

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:

Thirdweb Contracts

  • Best for: NFTs, tokens, marketplaces, governance

  • Advantage: Production-ready, gas-optimized implementations

  • Note: May need size optimization for Polkadot's 100KB limit

Polkadot-Optimized OpenZeppelin Contracts

Strategy

  1. Browse existing contracts for inspiration

  2. Copy core logic patterns

  3. Simplify by removing unnecessary features

  4. Test contract size with npx hardhat compile

3. Development Environment Setup

Choose Your Path

Development Path Flowchart
Factor
Remix IDE
Hardhat

Setup Time

Quick

Moderate

Experience Needed

None

JavaScript/Node.js

Best For

Simple contracts

Complex dApps

Path 1: Remix IDE

  1. Get testnet tokens from faucetarrow-up-right

  2. Start coding in browser

Getting ABI for Frontend Projects: After compiling contracts in Remix:

  1. Go to Solidity Compiler tab

  2. Click on your contract name under compilation artifacts

  3. Copy the ABI array from the compilation details

  4. Use in frontend projects:

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:

  1. Open MetaMask extension

  2. Click on your profile icon (top right)

  3. Go to SettingsAdvanced

  4. Enable Show test networks

  5. Your network dropdown will now show testnet options

Talisman:

  1. Open Talisman extension

  2. Go to SettingsNetworks & Tokens

  3. Enable Show test networks

  4. Testnet networks will appear in your network list

Add Paseo Network to MetaMask

Quick Method (Recommended):

  1. Find "Polkadot Asset Hub Testnet"

  2. Click Connect Wallet and Add to MetaMask

  3. Approve the network addition in MetaMask

Manual Method:

6. Frontend Integration

Connect to Polkadot Network

Contract Interaction (Ethers.js)

Template Projects

Project Management Template

For effective hackathon project management and team collaboration:

6. Troubleshooting

Emergency Commands

7. Project Ideas

Proven Simple Ideas:

Comprehensive P2P Sharing Economy Ideas:

  • Comprehensive P2P Sharing Economy Catalogarrow-up-right: 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.

8. Network Details

  • Chain ID: 420420422

  • RPC: https://testnet-passet-hub-eth-rpc.polkadot.io

  • Explorer: https://blockscout-passet-hub.parity-testnet.parity.io

  • Faucet: https://faucet.polkadot.io/?parachain=1111

9. Security Best Practices

  • Keep contracts under 100KB

  • Validate all inputs

  • Use minimal implementations instead of heavy libraries

Simple Reentrancy Guard

10. Demo Preparation

Essential Components:

  1. Deployed contract on block explorer

  2. Frontend connecting to wallet

  3. Core functionality working

  4. Clear value demonstration

Demo Script:

  • Brief: Problem statement

  • Core: Live demo of solution

  • Wrap: Technical highlights & future vision

11. Resources & Tools

Essential Documentation

Development Environments:

Libraries:

Detailed References:

  • Writing Guidelines: Use writing-guidelines.md when creating documentation

  • Agents Context Setup: Agents.md

  • Network Details: docs/seed-content/configs.md

  • Tools Overview: docs/polkadot-development-tools.md

Video Tutorials:

Start with kitdot

Use kitdot@latest init -y for proper project setup with verified network configurations. Alternative templates available.

You're building on Polkadot using familiar Ethereum tools. Focus on working functionality over perfect code.

Última actualización