Top Visual Studio Plugins for Web3 and Blockchain Development in 2022

Rahul Ravindran

Although web3 development tools are still pretty new as compared web2 there are some pretty nifty VS code plugins that can help you fast track your development. Here is a list of some of the most useful ones I have found so far:

PS: If you want a quick highlight checkout our short video:

Solidity support for Visual Studio code

This is one of the most popular plugin for web3 if you work with solidity. The plugin provides: – Syntax highlighting – Snippets – Compilation of the current contract (Press F1 Solidity : Compile Current Solidity Contract), or F5 – Compilation of all the contracts (Press F1 Solidity : Compile all Solidity Contracts), or Ctrl+F5 / Cmd+F5 – Code completion for all contracts / libraries in the current file and all referenced imports – Default project structure (solidity files needs to be in the ‘src’ directory, and libraries in the ‘lib’ directory). Libraries will follow the same structure. – Compilation supporting EIP82 (dappfile and dependency packages) – Support for different solidity versions (Remote and local) – Code generation using https://github.com/Nethereum/Nethereum, it includes currently the default template for Nethereum service, dtos generation. (Open ‘contractName.json’ after compilation from the bin folder. Press F1 and press Solidity: Code generate from compilation output..) Auto generation of Nethereun files on compilation – Linting using Solhint or Solium

Checkout Solidity support for Visual Studio code

Solidity Debugger

Debugging solidity code is a tricky affair. Solidity debugger extension for Visual Studio Code supports breakpoints, stepping, rewinding, call stacks, local & state variable inspection. This can save you a lot of time.

Checkout Solidity Debugger

Hardhat for Visual Studio Code

This plugin brings Hardhat support for Visual studio code. Hardhat is an Ethereum development environment that lets you compile your contracts and run them on a development network. This plugin provides: – Code completion – Go to definition, type definition and references – Symbol renames – Solidity code formatting through prettier-plugin-solidity – Inline code validation from compiler errors/warnings for Hardhat projects – Hover help for variables, function calls, errors, events etc. – Code actions (quickfixes) suggested from compiler errors/warnings for Hardhat projects – Implement missing functions on interface with stubs – Constrain mutability by adding view/pure to function signature – Meet inheritance requirements by adding virtual/override on function signature – Provide accessibility by adding public/private to function signature

Checkout Hardhat for Visual Studio Code

Blockchain Development Kit for Ethereum

If you use Truffle and Ganche for your blockchain development, this is an useful plugin. This plugin allows you to create, build and deploy smart contracts on Ethereum with built in integration for open source tools such as Truffle, Infura, and OpenZeppelin. Optionally it plays well with the Azure blockchain stack. Be aware that this plugin is only available for windows and mac, so if you are on linux, you are out of luck!

Checkout Blockchain Development Kit for Ethereum

Ethereum Remix Project extension for Visual Studio Code

This plugin brings remix IDE support to visual studio code. Remix is a web based IDE built by the team at Ethereum. It is widely used for quickly get started for blockchain development in ethereum. It allows developers to access and interact with the file system, components, extensions and other Remix plugins without actually having to create a different code base.

Checkout Ethereum Remix Project extension for Visual Studio Code

Solidity Visual Developer

This extension contributes security centric syntax and semantic highlighting, a detailed class outline, specialized views, advanced Solidity code insights and augmentation to Visual Studio Code. The plugin supports:

Syntax Highlighting
  • access modifiers (external, public, payable, …)
  • security relevant built-ins, globals, methods and user/miner-tainted information (address.call(), tx.origin, msg.data, block.*, now)
  • storage access modifiers (memory, storage)
  • developer notes in comments (TODO, FIXME, HACK, …)
  • custom function modifiers
  • contract creation / event invocations
  • easily differentiate between arithmetics vs. logical operations
  • make Constructor and Fallback function more prominent

Code fragments passively draw your attention to statements that typically reduce risk (#c5f015) or need your attention (#f03c15).

Semantic Highlighting
  • highlights StateVars (constant, inherited)
  • detects and alerts about StateVar shadowing
  • highlights function arguments in the function body
Review Features
  • audit annotations/bookmarks – @audit - <msg> @audit-ok - <msg> (see below)
  • generic interface for importing external scanner results – cdili json format (see below)
  • codelens inline action: graph, report, dependencies, inheritance, parse, ftrace, flatten, generate unittest stub, function signature hashes, uml
Graph- and Reporting Features
  • 💒🤵👰 vscode-solidity-auditorSūrya
    • access your favorite Sūrya features from within vscode!
    • interactive call graphs with call flow highlighting and more!
  • 📈🎉 auto-generate UML diagrams from code to support your threat modelling exercises or documentation!
Code Augmentation
  • Hover over Ethereum Account addresses to download the byte-code, source-code or open it in the browser
  • Hover over ASM instructions to show their signatures
  • Hover over keywords to show basic Security Notes
  • Hover over StateVar’s to show declaration information
Views
  • Cockpit View
    • Explor and focus on solidity files in your workspace
    • Generate report/graphs for any files/folders selected in the explorer views
    • Selectively flatten files
    • Search for contracts that are likely to be deployed in the system
    • Context-sensitive views: click into a contract in the editor to list public state-changing method
    • Get quick access to extension settings
  • Outline View
    • populates VS Code outline view with sourceUnit and contract layout
    • contracts, stateVars, methods, inherited names
    • annotates security relevant information (visibility, …)
    • calculates complexity rating
    • annotations functions with information about whether they are accessing stateVars

Checkout Solidity Visual Developer

Ethover

Lastly a fun little plugin to give you details about an eth address when you hover over it. Hover over an ethereum address and: – Open it in etherscan (or whatever you configure) – Show address balance in hover (mainnet) (note: might be rate-limited, configure your API key in settings) – Download the bytecode and disassemble it. – With hover info on instructions – Representation of data as ASCII and resolving 4bytes to funcsigs, Color code reflects the type of instruction: stack, memory, storage, arithm., logic, system, environment, … – Download the bytecode and show it. – With hover info – Click to see instruction boundaries – Color coded bytes to reflect type of instruction) – Show verified contract source (etherscan.io) – Show reconstructed contract source from eveem.org – Show reconstructed contract source from evm.js – run vscode-decompiler to decompile it manually using panoramix (eveem.org) locally

Checkout Ethover

0 Comments

Leave a Reply

More great articles

A Guide to Events in Solidity

Events are inheritable members of contracts. When you call them, they cause the arguments to be stored in the transaction’s…

Read Story

How error propagate between contracts in Solidity?

Let's say we have 2 smart contracts. A and B. A calls B, and B throws an error. What happen in…

Read Story

How I Got 2 jobs As A Blockchain Developer | Real story

There are a few other articles /videos that claim to explain how to get a job as a blockchain developer.…

Read Story

Never miss a minute

Get great content to your inbox every week. No spam.
[contact-form-7 id="6" title="Footer CTA Subscribe Form"]
Arrow-up