vyperlang / vscode-vyper

Ethereum Vyper language support for Visual Studio Code

Home Page:https://marketplace.visualstudio.com/items?itemName=tintinweb.vscode-vyper

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

get in touch with Consensys Diligence
[ 🌐 πŸ“© πŸ”₯ ]

vscode-Vyper

img

Ethereum Vyper language support for Visual Studio Code

Marketplace: ext install tintinweb.vscode-vyper

Also available on vscode.dev! (compilation not yet supported)

Features

Passive Features

  • Vyper syntax highlighting support

Active Features

Note: Active features can be disabled by setting Settings β†’ Vyper β†’ Mode: Active to false.

  • Provides Security augmented decorations (Settings β†’ Vyper β†’ Decoration: Enable)
  • Provides Hover information (Settings β†’ Vyper β†’ Hover: Enable)
  • Provides Code snippets for common language constructs
  • Integrates with the vyper compiler (based on truffle-compile-vyper)
    • automatically compile contracts on save (Settings β†’ Vyper β†’ Compile: On Save)
    • compilation can be triggered by executing a vscode command (cmd + shift + p β†’ Vyper: Compile)
    • vyper location/command can be customized (default assumes vyper is in PATH) (Settings β†’ Vyper β†’ Command)
  • Integrates with MythX
    • sign-up with your ethereum address (username)
    • set your username and password (Settings β†’ Vyper β†’ MythX: Ethaddress / Settings β†’ Vyper β†’ MythX: Password or env.MYTHX_ETH_ADDRESS / env.MYTHX_PASSWORD; configuration takes precedence)
    • automatically analyze for security issues when saving the file (Settings β†’ Vyper β†’ Analysis: On Save)

Requirements

  • It is assumed that vyper is installed and generally available on the system (pip install vyper). In case vyper is not available in path or called in a virtualenv configure the vyper command in Settings β†’ Vyper β†’ Command

Tour

Syntax Highlighting

VSCode Light+ (default light)

theme-light

Solidity Visual Auditor - Dark

theme-light

Compiler Errors and Details

image

Hover information

image

Security Augmented Decorations - Auditor Mode

image

Snippets

  • Quickly create constructor, fallback function, methods, structs, ... as you type. Select the snippet from the suggestion box. See snippets/vyper.json for a list of available snippets.
  • start typing ...

image

  • creates a template constructor after selecting it from the suggestion box.

image

Extension Settings

settings

FAQ

  • Q: I get an error running vyper on my macbook with M1/M2 chipset.
  • A: The extension executes the vyper compiler in a /bin/sh shell that may not have all the customizations you are using in your day-to-day shell/terminal. As a workaround, I suggest to set the setting:vyper.command to arch -x86_64 vyper. see #18

Developer Notes

  • install vyper pip3 install vyper
  • use the script in ./scripts/fetch_vyper_language_spec.py or run npm run fetchGrammar to merge the python tmlanguage spec with vyper language specifics.

Release Notes

see CHANGELOG


About

Ethereum Vyper language support for Visual Studio Code

https://marketplace.visualstudio.com/items?itemName=tintinweb.vscode-vyper

License:MIT License


Languages

Language:JavaScript 85.2%Language:Python 10.5%Language:Vyper 4.4%