Skip to content

NikhilKottoli/Polkadot

Repository files navigation

🌊 Polkaflow - Visual Blockchain Workflow Builder

PolkaVM AssetHub Solidity React AI Powered Telegram Bot

image

Polkaflow is a visual blockchain workflow builder that empowers users to design, generate, and deploy smart contracts for the Polkadot ecosystem with ease. By leveraging PolkaVM, AssetHub, and both AI-driven and manual logic code generation, Polkaflow makes blockchain development accessible for everyoneβ€”from no-code users to advanced developers.

Demo : https://www.youtube.com/watch?v=1wMiRCPWYBE (THis is old video of pahse 1. Many features are added in the hackathon)

πŸš€ What Does Polkaflow Do?

Visual Workflow Design: Build complex blockchain workflows for DeFi, DAOs, cross-chain bridges, and more using an intuitive drag-and-drop interface.

Flexible Flowchart Creation: Choose from three ways to create your workflow:

  • AI Prompt: Describe your process in natural language and let AI generate the flowchart for you.
  • Manual Builder: Construct your workflow step-by-step by adding and connecting nodes.
  • Templates: Start quickly with ready-made templates and customize as needed.

Smart Contract Generation: Convert your visual workflow into optimized Solidity contracts, ready for deployment on PolkaVM and AssetHub.

AssetHub Integration: Directly manage assets, proposals, and governance within your workflows.

✨ Key Features

Three Ways to Build Workflows:

  • AI Flowchart Generation: Enter a prompt and instantly create a visual workflow using AI.
  • Manual Node Editing: Drag, drop, and connect nodes to build your logic visually.
  • Workflow Templates: Use and customize pre-built templates for common blockchain scenarios.

Two Code Generation Options:

  • AI-Powered Code Generation: Let AI produce Solidity code from your workflow or prompt.
  • Custom Logic Engine: Use our hand-crafted logic engine to generate contracts from your designed flowchartβ€”giving you more control and transparency.
  • Gas Estimation: High complexity functions are highlighted and offered to deploy in Rust

🧠 Hybrid Contract Optimization & Telegram Integration

  • Polkaflow analyzes generated Solidity contracts to detect gas inefficiencies.
  • For gas-heavy functions, the system can auto-generate an equivalent Rust contract.
  • The Rust contract is embedded into the Solidity flow for optimal execution.
  • A built-in dual-mode code editor allows developers to:
    • View, edit, and compile both Rust and Solidity contracts in one place.
  • Telegram API integration enables:
    • Adding a Telegram bot as a node in the workflow.
    • Receiving real-time compile and deploy notifications, including:
      • βœ… Contract address
      • πŸ” Transaction hash
      • β›½ Gas usage

Additional Features:

  • PolkaVM Optimized: Supports larger contracts (up to 100KB), faster compilation, and native Solidity execution.
  • AssetHub Native: Create, manage, freeze/unfreeze, and track assets directly from your workflow.
  • One-Click Deployment: Instantly deploy generated contracts to AssetHub via PolkaVM.

πŸ§‘β€πŸ’» Prerequisites

To compile and deploy contracts using Polkaflow, you must have the following compilers installed locally:

solc (Solidity compiler)

Required for compiling standard Solidity contracts.

resolc (PolkaVM Solidity compiler)

Required for compiling contracts specifically for PolkaVM.

Download and install resolc, solc from the official PolkaVM resources or releases.

Important: Make sure both solc and resolc are available in your system's PATH so Polkaflow can invoke them for contract compilation.

Assethub Deployments

AssetStorage

Contract Address : 0xab6393232CbB3D3B38f6f1D33728f1de275E098b
Transaction Hash : 0xa245dc3b00368b3e71f14dddb5166b8541542a8c475a0b3356d4eb00b3a754c8

AssetHubManager

Contract Address : 0xA99f2E62578B6adAaEaE585751D99d84111211Dd
Transaction Hash : 0xd97d77a9ff9b656af5085c4709a1a1129771e0c8473b9f545b7d85ccc5f8770e

πŸ› οΈ Technical Architecture

Frontend:

  • React 18
  • React Flow for visual editing
  • Tailwind CSS for styling

Backend:

  • Express.js
  • PolkaVM compiler (resolc.exe) integration
  • AssetHub RPC for blockchain interaction
  • Google Gemini AI for AI-powered features

Blockchain Layer:

  • Deploys contracts to PolkaVM
  • Manages assets on AssetHub
  • Cross-chain capabilities via Polkadot

πŸ—οΈ Project Structure

polkaflow/
β”œβ”€β”€ frontend/           # Visual workflow builder and UI
β”œβ”€β”€ backend/           # API, AI integration, PolkaVM interface
β”‚   └── xcm-compiler/  # XCM compilation tools
└── docs/              # Documentation

πŸš€ Quick Start

1. Clone and Install Dependencies

git clone https://github.com/your-username/polkaflow
cd polkaflow

# Install frontend dependencies
cd frontend
npm install

# Install backend dependencies
cd ../backend
npm install

# Install XCM compiler dependencies
cd xcm-compiler
npm install
cd ..

2. Set up Environment Variables

Add your gemini API key and other configuration as needed.

3. Ensure Local Compilers

solc and resolc must be available in your PATH for contract compilation.

4. Run the Servers

Start the backend server:

cd backend
node server.js

Start the frontend development server:

cd frontend
npm run dev

The frontend will typically be available at http://localhost:5173 and the backend at http://localhost:3000.

5. Get Started

Use the dashboard to create, build, and deploy your first workflow.

πŸ’‘ Innovation Highlights

  • First visual builder for PolkaVM and AssetHub workflows
  • AI-driven and manual logic options for both flowchart creation and code generation
  • Zero external dependencies for generated contracts
  • Designed for both developers and non-developers to rapidly prototype and deploy blockchain applications

Deployment

Deployed By: 0x8a84e3d8fa00075ffa69010949da38f63b7f5fb8

Contract Address: 0x4E2cDE8Cc8DD1A21DB769548dDE62EC273bb45ac

Transaction Hash: 0xd153843abf1fe67976c697962cfd1b518d63d5a7782cecabcf3224f3c2add84a

image

image

image

image

image

image

image

image

image

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •