# Solidity For Ethereum EVM

Solidity support that aims to enable all of Visual Studio Code's features.

Solidity is the language used in Ethereum to create smart contracts.

This extension provides:

* Fast linting with `solium` and `solc`
* Snippets
* Support for using a workspace-local version of `solc`
* Support for using a workspace-local version of `solium`
* Syntax highlighting

## New Features and Improvements

To make this extension even more useful for Solidity developers, the following features have been added:

### 1. Solidity Static Analysis (via MythX Integration)

**Feature**: Integration with MythX for automatic static analysis of Solidity code.
- Automatically run security analysis on the Solidity code when saving files.
- MythX analyzes the code for common security vulnerabilities such as reentrancy, gas limit issues, and improper access control.
- Display warnings or error notifications directly in the editor for any detected issues.

**Benefit**: Detect potential vulnerabilities before deploying the contract to the Ethereum network. It helps to ensure code quality and security.

---

### 2. Solidity Testing Support (Truffle / Hardhat Integration)

**Feature**: Seamless integration with testing frameworks like Truffle and Hardhat.
- Add commands to run Truffle or Hardhat tests directly from the VS Code interface.
- View test results directly within VS Code's terminal or output window.
- Ability to debug Solidity contracts with built-in breakpoints using Truffle/Hardhat environments.

**Benefit**: Streamlines the development workflow by allowing developers to run tests directly within the editor, reducing the need to switch between VS Code and the terminal.

---

### 3. Solidity Code Formatter (Prettier Integration)

**Feature**: Code formatting using Prettier, an opinionated code formatter.
- Automatically format Solidity code on save or via a command.
- Support for custom Prettier configuration files to tailor the formatting to team conventions.

**Benefit**: Keeps Solidity code clean, readable, and consistent with minimal manual effort, improving the overall quality and maintainability of codebases.

---

### 4. Code Autocompletion and IntelliSense Improvements

**Feature**: Improved autocompletion and IntelliSense for Solidity smart contracts.
- Suggest function names, variables, and events as you type.
- Provide inline documentation for Solidity functions, libraries, and interfaces.
- Support for autocomplete in modifier, event, and contract inheritance contexts.

**Benefit**: Enhances the development experience with faster code writing and fewer errors due to better autocompletion, and better understanding of the API surface with inline docs.

---

### 5. Solidity Debugging Support

**Feature**: Solidity contract debugging with Hardhat/Truffle.
- Add the ability to set breakpoints in Solidity code.
- Integrate with Hardhat’s or Truffle’s debugging tools to inspect stack traces, local variables, and contract state.

**Benefit**: Provides a more efficient way to debug smart contracts without leaving the editor, making it easier to track down issues in complex contract logic.

---

### 6. Enhanced Syntax Highlighting

**Feature**: More accurate and detailed syntax highlighting for Solidity.
- Improved support for newer Solidity versions and language features.
- Highlight more contract-specific constructs, such as `mapping`, `struct`, `event`, and `modifier`.

**Benefit**: Makes it easier to read and navigate Solidity code by improving code structure visibility and comprehension.

---

### 7. Solidity Documentation Generation (via Solidity DocGen)

**Feature**: Generate Solidity contract documentation from comments and annotations using a tool like Solidity DocGen.
- Automatically generate docs based on smart contract comments in a predefined format (e.g., Markdown, HTML).
- Support for adding custom annotations for functions, events, and modifiers.

**Benefit**: Makes it easier to document contracts automatically, ensuring that code documentation stays up-to-date with the codebase.

---

## Credits

Many thanks to [Juan Blanco](https://github.com/juanfranblanco), this extension is forked from his original [vscode-solidity](https://github.com/juanfranblanco/vscode-solidity) extension.

