Skip to content

Your complete toolkit for building on Hedera - from smart contracts to SDK development, all within VS Code.

License

Notifications You must be signed in to change notification settings

tolgayayci/hedera-vscode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

13 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Hedera VSCode Extension

Your complete toolkit for building on Hedera - from smart contracts to SDK development, all within VS Code.

Version License


What is this?

The Hedera VSCode Extension brings the entire Hedera development experience into your editor. Whether you're writing smart contracts, integrating SDKs across 8 languages, or exploring the Mirror Node API - it's all here, without switching contexts.

Perfect for:

  • Smart contract developers using Hardhat or Foundry
  • SDK developers working with Hedera's multi-language SDKs
  • Teams building dApps that need quick network testing
  • Anyone tired of jumping between tools to deploy, debug, and verify

πŸš€ Project Setup & Templates

  • One-click project creation from official Hedera templates (Hardhat, Foundry, React DApp, Upgradeable Contracts)
  • Instant scaffolding with working examples, latest dependencies, and network configs
  • Auto-detection of existing Hardhat/Foundry projects

πŸ’Ό Account & Network Management

  • Secure account storage with ECDSA/ED25519 support
  • Quick network switching (testnet, mainnet, previewnet, custom)
  • Live balance refresh and EVM address display
  • One-click operator account setup
  • Auto-sync to .env files for seamless CI/CD

πŸ“¦ Smart Contract Development

  • Compile contracts directly from the sidebar (Hardhat/Foundry detection)
  • Deploy with one click - choose network, customize gas, track deployments
  • Verify on HashScan automatically or manually
  • Deployment history with timestamps, networks, and direct explorer links
  • Gas estimation with inline CodeLens (see estimated gas above functions)

πŸ’» SDK Development Support (8 Languages!)

  • Rich autocomplete for JavaScript, TypeScript, Java, Go, Rust, C++, Swift, Python
  • Hover documentation - see SDK docs by hovering over classes and methods
  • Code snippets - hedera-* templates for accounts, tokens, contracts, topics
  • Direct links to official Hedera documentation

πŸ” Debugging & Inspection

  • Contract Debug Panel - compile, test read/write functions, see gas estimates
  • ABI Encode/Decode - convert between calldata and readable parameters
  • Transaction inspection - full receipts with status, gas used, error details
  • Dedicated debug output with timestamps and formatted results
  • Smart error interpretation (no more cryptic blockchain errors)

🌐 Mirror Node Explorer

  • Visual API builder - construct REST queries from official OpenAPI spec
  • Instant code generation - copy as cURL, Fetch, or Node.js snippets
  • Query accounts, transactions, tokens, topics, and contracts
  • Test endpoints and see formatted JSON responses

βš™οΈ Developer Experience

  • Inline links - hover 0.0.123 β†’ jump to HashScan or copy
  • Hedera-specific diagnostics - highlights unsupported Solidity patterns (selfdestruct, delegatecall)
  • MCP integration - preconfigured servers for AI tools (Cursor, Windsurf, Claude)
  • Syntax highlighting and semantic tokens for Solidity/Vyper

πŸ“¦ Installation

From VS Code Marketplace

  1. Open VS Code
  2. Go to Extensions (Ctrl+Shift+X / Cmd+Shift+X)
  3. Search for "Hedera"
  4. Click Install

Requirements

  • VS Code 1.85.0 or higher
  • Node.js 16+ (for project templates and compilation)
  • Git (for cloning templates)

πŸš€ Quick Start

1. Create Your First Project

Cmd/Ctrl+Shift+P β†’ "Hedera: Create New Project"
  • Choose a template (Hardhat, Foundry, React DApp, or Upgradeable)
  • Extension clones official Hedera repo and installs dependencies
  • Open the new project and you're ready to code

2. Import or Create an Account

From the sidebar:

  • Click "+" in Hedera Accounts view
  • Choose "Import Account" (paste account ID + private key)
  • Or "Create Account" to generate new keys
  • Set as operator for signing transactions

3. Deploy Your First Contract

From the Smart Contracts view:

  • Expand your project in the sidebar
  • Find your contract β†’ Click Deploy button (cloud upload icon)
  • Select network (testnet recommended)
  • Review gas settings β†’ Deploy
  • Extension logs transaction, saves deployment, and links to HashScan

4. Test with Debug Panel

From the Smart Contracts view:

  • Click Debug Panel button (beaker icon) on any contract
  • Choose an action:
    • Compile - run Hardhat/Foundry compiler
    • Read function - test view/pure functions with gas estimates
    • Write function - send transactions with dynamic gas calculation
    • View logs - see formatted results in debug output

πŸ’‘ Tip: All contract actions (Deploy, Compile, Verify, Debug) appear as inline buttons in the Smart Contracts sidebar. No need to right-click!


πŸ“– Common Workflows

πŸ—οΈ Create a Hardhat Project and Deploy

  1. Hedera: Create New Project β†’ Select "Hardhat Official Example"
  2. Import your testnet account (or create new one)
  3. In Hedera Accounts view, right-click account β†’ "Set as Operator"
  4. Open "Smart Contracts" view in sidebar
  5. Expand your project β†’ Find contract β†’ Click Deploy button
  6. Choose testnet β†’ Confirm β†’ See deployment in HashScan

πŸ” Debug a Contract Function

  1. Open "Smart Contracts" view in sidebar
  2. Find your contract β†’ Click Debug Panel button (beaker icon)
  3. Select "Read function (call)" from the menu
  4. Choose function from ABI
  5. Input arguments β†’ Extension shows gas estimate and return value
  6. Copy result or view in debug output channel

🌐 Query Mirror Node API

  1. Hedera: Build Mirror Node Endpoint
  2. Select network (testnet/mainnet)
  3. Choose API endpoint (e.g., /api/v1/accounts/{id})
  4. Fill in parameters
  5. Click "Send Request" β†’ See JSON response
  6. Copy as cURL, Fetch, or Node.js code

πŸ’¬ Use SDK Autocomplete

  1. Create a .js file in your project
  2. Start typing: Client. β†’ Extension shows forTestnet(), forMainnet(), setOperator()
  3. Hover over any SDK class β†’ See full documentation with examples
  4. Use snippets: type hedera-transfer β†’ Get complete transfer transaction template

βœ… Verify Contract on HashScan

  1. After deployment, click "Verify on HashScan" prompt
  2. Or in Smart Contracts view, expand contract β†’ Click Verify button (checkmark icon) on deployment
  3. Extension auto-fills constructor args, compiler version
  4. Submit β†’ See verification status
  5. Contract source now visible on HashScan

🎨 Screenshots

Account Management Panel

Manage Hedera accounts, view balances, and switch networks from the sidebar.

Account Panel

Smart Contracts View

Deploy, compile, and debug contracts with inline action buttons. Track deployment history.

Contracts Panel

SDK Hover Documentation

Hover over SDK classes and methods to see rich documentation with code examples across all 8 supported languages.

Hover Documentation

Gas Estimation CodeLens

Inline gas estimates appear above Solidity functions with color-coded indicators (🟒 low, 🟑 medium, πŸ”΄ high).

Gas Estimation

Mirror Node API Explorer

Build REST queries from OpenAPI spec, test endpoints, and generate code snippets for cURL, Fetch, or Node.js.

Welcome Builder Results
Welcome screen Endpoint builder with parameters Query results with code generation

Network Configuration

Add custom networks via Hedera: Manage Networks:

  • Node URL (JSON-RPC endpoint)
  • Mirror Node URL (REST API)
  • Chain ID
  • Network name

❓ FAQ & Troubleshooting

Extension not detecting my contracts?

  • Ensure you have hardhat.config.js or foundry.toml in your workspace
  • Run Hedera: Refresh Contracts from command palette
  • Check that contracts are compiled (artifacts/ or out/ exists)

How do I add a custom network?

  1. Click settings icon in "Hedera Accounts" sidebar
  2. Select "Manage Networks"
  3. Add JSON-RPC URL, Mirror Node URL, and Chain ID
  4. Network appears in switch dropdown

Is my private key secure?

  • Keys stored in VSCode's secure storage (system keychain)
  • Never logged or transmitted except for signing transactions
  • Disable .env sync if you don't want keys in files
  • Use .gitignore to exclude .env from version control

Gas estimation not working?

  • Ensure contracts are compiled first
  • Check that you have valid operator account set
  • Try disabling autoEstimate if it's slow
  • Click "Refresh Gas Estimates" to recalculate

Deploy fails with "account not found"?

  • Verify account exists on selected network (testnet vs mainnet)
  • Check account has sufficient HBAR balance
  • Confirm private key matches the account ID

Where can I get help?


🀝 Contributing

We welcome contributions! Here's how to set up for development:

Developer Setup

  1. Clone the repository
git clone https://github.com/tolgayayci/hedera-vscode.git
cd hedera-vscode
  1. Install dependencies
npm install
  1. Compile TypeScript
npm run compile
  1. Launch Extension Development Host
  • Press F5 in VS Code
  • New window opens with extension loaded
  • Make changes β†’ Reload window (Ctrl+R) to test

Pull Request Process

  1. Create a feature branch
  2. Make your changes
  3. Run linter: npm run lint
  4. Run tests: npm test (if applicable)
  5. Commit with clear messages
  6. Open PR with description of changes

πŸ“š Additional Resources


πŸ“„ License

MIT License - see LICENSE file for details.


πŸ™ Acknowledgments

Built with ❀️ for the Hedera developer community.

Special thanks to:

  • Hedera team for SDK and infrastructure support
  • VSCode extension API contributors
  • Community feedback and testing

Ready to build on Hedera? Install the extension and create your first project in minutes! πŸš€

About

Your complete toolkit for building on Hedera - from smart contracts to SDK development, all within VS Code.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published