Skip to content

AIQUANT-Tech/CardanoPyC

Repository files navigation

CardanoPyC Pycharm Plugin

Version Downloads Rating

IntelliJ Platform Plugin Template CardanoPyC Plugin

official JetBrains project Twitter Follow Build Slack

CardanoPyC is a powerful IntelliJ-based plugin that provides seamless support for Haskell and Plutus development with deep integration to the Cardano blockchain. It enhances developer productivity by offering:

  • Advanced Haskell Support: Syntax highlighting, code completion, and file creation for Haskell files (.hs)
  • Cardano Blockchain Integration: Direct access to Cardano API data through the Run menu
  • Real-time Blockchain Data: Fetch latest blocks, network state, transactions, pool information, and more
  • Deployment Utilities: Generate addresses
  • Wallet Management: Integrated wallet management capabilities
  • Diagnostics: Highlight errors in editor and show proper suggestions for Haskell files (.hs)
  • Debug Tools: Show errors on debug console if code is not correct

This plugin is perfect for developers building on the Cardano blockchain, enabling smooth and efficient smart contract development within the IntelliJ ecosystem.


πŸ“₯ Installation

Install Plugin from JetBrains Marketplace or Pycharm IDE

CardanoPyC is a powerful IntelliJ-based plugin designed to provide seamless support for Haskell and Plutus development with deep integration into the Cardano blockchain.

It is built to enhance developer productivity by combining blockchain utilities, smart contract development features, and rich Haskell language support directly within the IntelliJ ecosystem.

JetBrains Marketplace Link - https://plugins.jetbrains.com/plugin/26301-cardanopyc

Marketplace

πŸ“¦ Version

Current release: 3.0.9

Installation (From JetBrains Marketplace .zip)

If you downloaded the plugin from JetBrains Marketplace, it will come as a .zip file.
To install it in PyCharm, follow these steps:

  1. Open PyCharm IDE
  2. Go to Settings β†’ Plugins
  3. Click the βš™οΈ (settings icon) in the top-right corner
  4. Select Install Plugin from Disk
  5. Upload the downloaded .zip file
  6. Click OK
  7. Restart your IDE to activate the plugin

Version

Installation (From PyCharm IDE)

If you want to install the plugin directly from PyCharm IDE, follow these steps:

  1. Open PyCharm IDE
  2. Go to Settings β†’ Plugins
  3. In the Marketplace tab, search for "CardanoPyC"
  4. Click Install
  5. Restart your IDE to activate the plugin

Version

πŸ“₯ Installation from Source

  1. Clone the repository:
    git clone https://github.com/AIQUANT-Tech/CardanoPyC
    cd CardanoPyC
    
  2. Debug the extension by clicking the Intellij IDE debug icon.

πŸ—οΈ Development

✨ Key Features

🎯 Haskell Language Support

  • File type recognition for .hs files
  • Advanced syntax highlighting for Haskell and Plutus code
  • Intelligent code completion
  • Custom parser definition for Haskell syntax

Syntax_highlighting

Code_completion

πŸ”— Cardano API Integration (Run Menu > CardanoAPI)

  • Blockchain Data: Latest block details, network state, protocol parameters
  • Address & Transactions: Address balances, transaction details, transaction lists by address
  • Stake Pools: Pool details, status, lists, expiring/expired pools
  • Governance: Committee members, DRep information, governance actions
  • Assets & Policies: Asset details, policy information, assets by address
  • Stake Keys: Address associations with stake keys

Cardano API UI

API Data UI

πŸ’Ό Wallet Management

  • The plugin includes integrated wallet management tools for handling Cardano wallets directly inside your IDE.
  • CardanoPyC provides built-in wallet support for Plutus developers.

✨ Wallet Features

  • Create and manage local Cardano wallets.
  • Import wallet via mnemonic or keys.
  • Display wallet balance in real time.
  • Export addresses for transactions or testing.

πŸ› οΈUsage

  1. Go to Run Menuctrl + shift + a β†’ Wallet β†’ This opens the Wallet Management User Interface

  2. Choose an action:

    • Create Wallet β†’ Generates a new wallet with mnemonic and saves it securely.
    • Import Wallet β†’ Paste your mnemonic/private key to load an existing wallet.
    • View Balance β†’ Fetches live balance from the connected Cardano node.
    • Export Address β†’ Copies wallet address for transactions or deployment.

Wallet_image

Wallet Management Demo

Deployment Tools

πŸ”Ή Generate Plutus Script Address

The plugin provides an easy way to generate Cardano addresses from your Plutus scripts:

  • πŸ“‹ Access the Tool:

    • Run Menu ctrl + shift + a> Deployment > Generate Address
    • Right-click in the editor β†’ Generate Plutus Address
  • 🎯 Configure Parameters:

    • Enter the path to your Plutus script file (without the .plutus extension)
    • Select the network: Preview, Preprod, or Mainnet
    • Click OK
  • 🎯 Output:

    • A .addr file with the same name as your script will be generated
    • A success notification shows the generated address and file location

πŸ‘‰ Example: If your script is myscript.plutus, the address file will be myscript.addr.


Deployment

πŸ› οΈ Usage

Installation

cabal

For Linux, run this in a terminal:

curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
 
ghcup tui
 
ghcid
$ cabal update
$ cabal install ghcid

Diagnostics feature

  • Real-time diagnostics with error highlighting in the editor for Haskell files (.hs)
  • Provides intelligent suggestions for fixing issues Diagnostic_feature

Error Highlighting

Diagnostics

Error Suggestion

Error Suggestion

Debug Tools

  • Display compilation/runtime errors in the Debug Console with detailed information
  • Helps developers quickly identify and resolve problems Debug_tools

Debug Button

Debug Button

Debug Error(If any error)

Debug Error

Fetch UTXO

To fetch UTXO details using the plugin:

  1. Press Ctrl + Shift + A
  2. Search for Fetch UTXO
  3. Enter your Script Address
  4. Click OK

Fetch UTXO

⚠️ Ensure that your network connection is properly set (preprod / preview / mainnet).

πŸ“‹ Prerequisites

  • For generating addresses β†’ cardano-node & cardano-cli must be installed (but node doesn’t need to be running).
  • For diagnostics β†’ ghcid must be installed
  • For debugging β†’ .cabal file must be present in root directory

Development Environment

  • IntelliJ IDEA version 231.x or higher
  • Java 17+ runtime environment
  • Minimum 4GB RAM recommended

βœ… Running Tests

Run Test

πŸ—οΈ Project Structure

CardanoPyC/
β”œβ”€β”€ images/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ main/
β”‚   β”‚   β”œβ”€β”€ java/
β”‚   β”‚   β”‚   └── org/intellij/sdk/language/
β”‚   β”‚   β”‚       β”œβ”€β”€ actions/                 # Menu actions and handlers
β”‚   β”‚   β”‚       β”œβ”€β”€ cardanoApi/              # Cardano API integration
β”‚   β”‚   β”‚       β”‚   β”œβ”€β”€ actions/             # API action classes
β”‚   β”‚   β”‚       β”‚   β”œβ”€β”€ CardanoScanApiClient.java
β”‚   β”‚   β”‚       β”‚   └── CardanoScanFetcher.java
β”‚   β”‚   β”‚       β”œβ”€β”€ deployment/              # Node deployment utilities
β”‚   β”‚   β”‚       β”‚   └── CardanoCliAction
β”‚   β”‚   β”‚       β”‚   
β”‚   β”‚   β”‚       β”œβ”€β”€ grammars/                # Language grammar definitions
β”‚   β”‚   β”‚       β”œβ”€β”€ highlighter/             # Syntax highlighting
β”‚   β”‚   β”‚       β”œβ”€β”€ icons/                   # Plugin icons
β”‚   β”‚   β”‚       β”œβ”€β”€ parser/                  # Language parsing
β”‚   β”‚   β”‚       β”œβ”€β”€ psi/                     # PSI tree elements
β”‚   β”‚   β”‚       β”œβ”€β”€ utils/                   # Utility classes
β”‚   β”‚   β”‚       β”œβ”€β”€ wallet/                  # Wallet management
β”‚   β”‚   β”‚       β”œβ”€β”€ diagnostics 
β”‚   β”‚   β”‚       └── debug_tools
β”‚   β”‚   └── resources/
β”‚   β”‚       β”œβ”€β”€ icons/                       # Image resources
β”‚   β”‚       β”‚   β”œβ”€β”€ cardano.svg
β”‚   β”‚       β”‚   β”œβ”€β”€ plugin-hs-Icon.svg
β”‚   β”‚       β”‚   └── background.jpg
β”‚   β”‚       └── META-INF/
β”‚   β”‚           └── plugin.xml              # Plugin configuration
β”‚   └── test/                               # Test classes
β”œβ”€β”€ build.gradle.kts                        # Gradle build configuration
β”œβ”€β”€ gradle.properties                       # Project properties
β”œβ”€β”€ settings.gradle.kts                     # Gradle settings
└── README.md                               # This file           # Plugin icons

πŸ› οΈ Build Configuration

The project uses Gradle with the IntelliJ Platform Plugin. Key configuration files:

  • build.gradle.kts - Gradle build configuration
  • gradle.properties - Project properties and versions
  • plugin.xml - Plugin manifest and extension points

🎨 Icons

  • Custom icons located in /icons/ directory
  • Main plugin icon: plugin-hs-Icon.svg
  • Cardano-specific icons: cardano.svg

🀝 Contributing

We welcome contributions! Please feel free to submit pull requests or open issues for bugs and feature requests.

πŸ†˜ Support

For issues or questions related to the CardanoPyC plugin, please contact AIQUANT TECHNOLOGIES support through the plugin's GitHub repository.

πŸ“„ License

This project is licensed under the Apache License - see the LICENSE file for details.


Note: This plugin requires IntelliJ IDEA version 231.x or higher and Java 17+ for optimal performance.

About

A code repository for CardanoPY

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •