Solidity support for Visual Studio codeSolidity is the language used in Ethereum to create smart contracts, this extension provides:
InstructionsUsing a different version of the solidity compilerSometimes you may want to use a different compiler than the one provided. All the different versions of the solidity compiler can be found in this repository: You can find all the different versions in the solc-bin repository https://github.com/ethereum/solc-bin/tree/gh-pages/bin Currently we support three ways supported to use a different version of the solidity compiler. Remote downloadTo compile using a remote version, you need to change the following user setting, with the version required, for example 'latest' or 'v0.4.3+commit.2353da71'
Using Local fileIf you don't have an internet connection, you can download the compiler and change your user settings to use this. The local file will be use instead of remote.
Npm / node installationIf you need to use an specific version for a project, you can also install solc locally in your solidity project folder.
Default project structureA default project / library dependency structure is supported as follows: Libraries will have the same name as their folder they are included. Solidity files will be in the 'src' folder. Libraries will be included in the 'lib' folder. Currently there is no name conflicting resolution, so the first library found matching a name, will be the first one used. Code completionJust press Ctlr + Space or Command + Space to autocomplete statements, currently supported all the storage variables, functions and events (with snippets) included in the current document and every document in the import chain. Also supported all the global variables, global functions, types and units. Auto compilation and error highlightingAuto compilation of files and error highlighting can be enabled or disabled using user settings. Also a default delay is implemented for all the validations (compilation and linting) as solidity compilation can be slow when you have many dependencies.
Solhint lintingLinting support is provided thanks to Solhint https://github.com/tokenhouse/solhint, you can configure it using the following user settings:
.solhint.json support will be included in the near future, for specific project linting requirements. Contributing / Issues / RequestsFor ideas, issues, additions, modifications please raise an issue or a pull request at https://github.com/juanfranblanco/vscode-solidity/ and send a message on gitter at https://gitter.im/vscode-solidity/Lobby or https://gitter.im/Nethereum/Nethereum to get an instant notification. CreditsMany thanks to: Christian Reitwiessner and the Ethereum team for Solidity https://github.com/ethereum/solidity Nexus team for the original creation of the dappfile to structure contracts in projects https://github.com/nexusdev/dapple. Nick Addison, Elazar Gershuni, Joe Whittles for their contributions. Sebastian Bürgel for keeping reminding me of the offline installation suppport David Krmpotic and Ralph Pichler for the original Sublime extension https://github.com/davidhq/SublimeEthereum Everyone for their support and feedback! |