{"id":307,"date":"2022-09-23T14:49:31","date_gmt":"2022-09-23T12:49:31","guid":{"rendered":"https:\/\/ackeeblockchain.com\/blog\/?p=307"},"modified":"2022-09-29T19:22:21","modified_gmt":"2022-09-29T17:22:21","slug":"introducing-tools-for-solidity","status":"publish","type":"post","link":"https:\/\/ackee.xyz\/blog\/introducing-tools-for-solidity\/","title":{"rendered":"Introducing Tools for Solidity \u2013\u2060 VS Code Extension"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">Have you ever looked for <strong>advanced support for Solidity<\/strong> in the editor\/IDE to help you develop <a href=\"https:\/\/ackeeblockchain.com\/blog\/glossary\/smart-contract\/\">smart contracts<\/a>? <\/span><!--more--><\/p>\n<p><span style=\"font-weight: 400;\">We have too, and although some extensions for <a href=\"https:\/\/ackeeblockchain.com\/blog\/glossary\/solidity\/\">Solidity<\/a> already exist, <strong>many of them do not support<\/strong> the latest language features (e.g., user-defined errors, using for directives, \u2026), language server features (e.g., Type hierarchy, Go to type definition) or are simply impractical in terms of how the project is compiled and external dependencies configured.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Each of them lacked something, and none of them suited our needs, so we created our own. <\/span><\/p>\n<h5><span style=\"color: #000000;\">Introducing <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=AckeeBlockchain.tools-for-solidity\"><span style=\"color: #0000ff;\">Tools for Solidity<\/span><\/a>, a Visual Studio Code Solidity extension.<\/span><\/h5>\n<p><span style=\"font-weight: 400;\">Let&#8217;s take a look at the features that are implemented in the first release of the extension: <\/span><\/p>\n<p><strong>Go to definition<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-311 aligncenter\" src=\"https:\/\/abchprod.wpengine.com\/wp-content\/uploads\/2022\/09\/go-to-definition-1.gif\" alt=\"\" width=\"880\" height=\"398\" \/><\/p>\n<p><strong>Go to type definition<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-312 aligncenter\" src=\"https:\/\/abchprod.wpengine.com\/wp-content\/uploads\/2022\/09\/go-to-type-definition.gif\" alt=\"\" width=\"880\" height=\"398\" \/><\/p>\n<p><strong>Go to implementation<\/strong><\/p>\n<p>Find implementations of an unimplemented function or modifier.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-313 aligncenter\" src=\"https:\/\/abchprod.wpengine.com\/wp-content\/uploads\/2022\/09\/go-to-implementation.gif\" alt=\"\" width=\"880\" height=\"398\" \/><\/p>\n<p><strong>Find references<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-314 aligncenter\" src=\"https:\/\/abchprod.wpengine.com\/wp-content\/uploads\/2022\/09\/find-references.gif\" alt=\"\" width=\"880\" height=\"398\" \/><\/p>\n<p><strong>Type hierarchy<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-315 aligncenter\" src=\"https:\/\/abchprod.wpengine.com\/wp-content\/uploads\/2022\/09\/contract-type-hierarchy.gif\" alt=\"\" width=\"880\" height=\"398\" \/><\/p>\n<p>Also works for virtual functions.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-316 aligncenter\" src=\"https:\/\/abchprod.wpengine.com\/wp-content\/uploads\/2022\/09\/function-type-hierarchy.gif\" alt=\"\" width=\"880\" height=\"398\" \/><\/p>\n<p><strong>Document links for import directives<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-317 aligncenter\" src=\"https:\/\/abchprod.wpengine.com\/wp-content\/uploads\/2022\/09\/document-links.gif\" alt=\"\" width=\"880\" height=\"398\" \/><\/p>\n<p><strong>Hover<\/strong><\/p>\n<p>Includes links to documentation for OpenZeppelin contracts.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-318 aligncenter\" src=\"https:\/\/abchprod.wpengine.com\/wp-content\/uploads\/2022\/09\/hover.gif\" alt=\"\" width=\"880\" height=\"398\" \/><\/p>\n<p><strong>Code lens with number of references<\/strong><\/p>\n<p>Number of references is shown above each declaration.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-319 aligncenter\" src=\"https:\/\/abchprod.wpengine.com\/wp-content\/uploads\/2022\/09\/code-lens.png\" alt=\"\" width=\"880\" height=\"398\" srcset=\"https:\/\/ackee.xyz\/blog\/wp-content\/uploads\/2022\/09\/code-lens.png 880w, https:\/\/ackee.xyz\/blog\/wp-content\/uploads\/2022\/09\/code-lens-300x136.png 300w, https:\/\/ackee.xyz\/blog\/wp-content\/uploads\/2022\/09\/code-lens-768x347.png 768w, https:\/\/ackee.xyz\/blog\/wp-content\/uploads\/2022\/09\/code-lens-370x167.png 370w, https:\/\/ackee.xyz\/blog\/wp-content\/uploads\/2022\/09\/code-lens-760x344.png 760w\" sizes=\"auto, (max-width: 880px) 100vw, 880px\" \/><\/p>\n<p><strong>Document symbols<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-320 aligncenter\" src=\"https:\/\/abchprod.wpengine.com\/wp-content\/uploads\/2022\/09\/document-symbols.png\" alt=\"\" width=\"880\" height=\"398\" srcset=\"https:\/\/ackee.xyz\/blog\/wp-content\/uploads\/2022\/09\/document-symbols.png 880w, https:\/\/ackee.xyz\/blog\/wp-content\/uploads\/2022\/09\/document-symbols-300x136.png 300w, https:\/\/ackee.xyz\/blog\/wp-content\/uploads\/2022\/09\/document-symbols-768x347.png 768w, https:\/\/ackee.xyz\/blog\/wp-content\/uploads\/2022\/09\/document-symbols-370x167.png 370w, https:\/\/ackee.xyz\/blog\/wp-content\/uploads\/2022\/09\/document-symbols-760x344.png 760w\" sizes=\"auto, (max-width: 880px) 100vw, 880px\" \/><\/p>\n<p><strong>Diagnostics with compiler errors and warnings<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-321 aligncenter\" src=\"https:\/\/abchprod.wpengine.com\/wp-content\/uploads\/2022\/09\/diagnostics-1.gif\" alt=\"\" width=\"880\" height=\"398\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-322 aligncenter\" src=\"https:\/\/abchprod.wpengine.com\/wp-content\/uploads\/2022\/09\/diagnostics-2.png\" alt=\"\" width=\"880\" height=\"398\" srcset=\"https:\/\/ackee.xyz\/blog\/wp-content\/uploads\/2022\/09\/diagnostics-2.png 880w, https:\/\/ackee.xyz\/blog\/wp-content\/uploads\/2022\/09\/diagnostics-2-300x136.png 300w, https:\/\/ackee.xyz\/blog\/wp-content\/uploads\/2022\/09\/diagnostics-2-768x347.png 768w, https:\/\/ackee.xyz\/blog\/wp-content\/uploads\/2022\/09\/diagnostics-2-370x167.png 370w, https:\/\/ackee.xyz\/blog\/wp-content\/uploads\/2022\/09\/diagnostics-2-760x344.png 760w\" sizes=\"auto, (max-width: 880px) 100vw, 880px\" \/><\/p>\n<p><strong>Rename<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-323 aligncenter\" src=\"https:\/\/abchprod.wpengine.com\/wp-content\/uploads\/2022\/09\/rename.gif\" alt=\"\" width=\"880\" height=\"398\" \/><\/p>\n<p><span style=\"font-weight: 400;\">Solidity projects opened in VS Code with our extension are <strong>automatically compiled<\/strong>, and all necessary compiler versions are automatically downloaded. If a project contains compilation errors, our tool will perform a partial analysis of the part of the project that does not depend on the part containing the error.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Compiling a project with external dependencies can often work without configuration. NPM packages (if installed) are detected automatically. Nevertheless, our extension <strong>provides various configuration options<\/strong>.<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><strong><span style=\"color: #0000ff;\">Tools for Solidity<\/span> <\/strong>with the <a href=\"https:\/\/github.com\/Ackee-Blockchain\/woke\">Woke<\/a>, our development and testing framework for Solidity, LSP server in the background <strong>utilizes incremental compilation<\/strong>, which means that only modified files (and their dependencies) are recompiled on the change to the source files.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">This results in an almost<strong> immediate response<\/strong> of the extension while editing a code. The fast recompilation time also allows us to inform the user of a security flaw while writing code. Results from Woke <strong>vulnerability detectors<\/strong> are shown together with compiler warnings and errors.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-353 aligncenter\" src=\"https:\/\/abchprod.wpengine.com\/wp-content\/uploads\/2022\/09\/diagnostics-3.png\" alt=\"\" width=\"880\" height=\"398\" srcset=\"https:\/\/ackee.xyz\/blog\/wp-content\/uploads\/2022\/09\/diagnostics-3.png 880w, https:\/\/ackee.xyz\/blog\/wp-content\/uploads\/2022\/09\/diagnostics-3-300x136.png 300w, https:\/\/ackee.xyz\/blog\/wp-content\/uploads\/2022\/09\/diagnostics-3-768x347.png 768w, https:\/\/ackee.xyz\/blog\/wp-content\/uploads\/2022\/09\/diagnostics-3-370x167.png 370w, https:\/\/ackee.xyz\/blog\/wp-content\/uploads\/2022\/09\/diagnostics-3-760x344.png 760w\" sizes=\"auto, (max-width: 880px) 100vw, 880px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-356 aligncenter\" src=\"https:\/\/abchprod.wpengine.com\/wp-content\/uploads\/2022\/09\/diagnostics-4.png\" alt=\"\" width=\"880\" height=\"398\" srcset=\"https:\/\/ackee.xyz\/blog\/wp-content\/uploads\/2022\/09\/diagnostics-4.png 880w, https:\/\/ackee.xyz\/blog\/wp-content\/uploads\/2022\/09\/diagnostics-4-300x136.png 300w, https:\/\/ackee.xyz\/blog\/wp-content\/uploads\/2022\/09\/diagnostics-4-768x347.png 768w, https:\/\/ackee.xyz\/blog\/wp-content\/uploads\/2022\/09\/diagnostics-4-370x167.png 370w, https:\/\/ackee.xyz\/blog\/wp-content\/uploads\/2022\/09\/diagnostics-4-760x344.png 760w\" sizes=\"auto, (max-width: 880px) 100vw, 880px\" \/><\/p>\n<p><strong>We are excited to make our VS Code Solidity extension publicly available on the marketplace.\u00a0<\/strong><\/p>\n<h4><a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=AckeeBlockchain.tools-for-solidity\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-340\" src=\"https:\/\/abchprod.wpengine.com\/wp-content\/uploads\/2022\/09\/Get-your-Tools-for-Solidity.png\" alt=\"\" width=\"320\" height=\"66\" srcset=\"https:\/\/ackee.xyz\/blog\/wp-content\/uploads\/2022\/09\/Get-your-Tools-for-Solidity.png 481w, https:\/\/ackee.xyz\/blog\/wp-content\/uploads\/2022\/09\/Get-your-Tools-for-Solidity-300x62.png 300w, https:\/\/ackee.xyz\/blog\/wp-content\/uploads\/2022\/09\/Get-your-Tools-for-Solidity-370x76.png 370w\" sizes=\"auto, (max-width: 320px) 100vw, 320px\" \/><\/a><\/h4>\n<h4>What&#8217;s next?<\/h4>\n<p class=\"p1\">In the further development of our extension, we would like to focus on presenting and giving the user the possibility to interact with other Woke functionalities. For example, it could <strong>visualize the code coverage of our fuzzer<\/strong> or have <strong>a button to generate a test template<\/strong> for our future Solidity testing framework. All of this should be possible just through the extension, without using the command line.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Have you ever looked for advanced support for Solidity in the editor\/IDE to help you develop smart contracts?<\/p>\n","protected":false},"author":11,"featured_media":341,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[65,10],"tags":[67,64,68,74,75,69],"class_list":["post-307","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-announcements","category-ethereum","tag-announcement","tag-security","tag-solidity","tag-tools-for-solidity","tag-vs-code","tag-woke"],"aioseo_notices":[],"featured_image_src":"https:\/\/ackee.xyz\/blog\/wp-content\/uploads\/2022\/09\/ABCH-Solidity-Cover-600x400.png","featured_image_src_square":"https:\/\/ackee.xyz\/blog\/wp-content\/uploads\/2022\/09\/ABCH-Solidity-Cover-600x600.png","author_info":{"display_name":"Andrea Nov\u00e1kov\u00e1","author_link":"https:\/\/ackee.xyz\/blog\/author\/andrea-novakova\/"},"_links":{"self":[{"href":"https:\/\/ackee.xyz\/blog\/wp-json\/wp\/v2\/posts\/307","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ackee.xyz\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ackee.xyz\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ackee.xyz\/blog\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/ackee.xyz\/blog\/wp-json\/wp\/v2\/comments?post=307"}],"version-history":[{"count":0,"href":"https:\/\/ackee.xyz\/blog\/wp-json\/wp\/v2\/posts\/307\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ackee.xyz\/blog\/wp-json\/wp\/v2\/media\/341"}],"wp:attachment":[{"href":"https:\/\/ackee.xyz\/blog\/wp-json\/wp\/v2\/media?parent=307"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ackee.xyz\/blog\/wp-json\/wp\/v2\/categories?post=307"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ackee.xyz\/blog\/wp-json\/wp\/v2\/tags?post=307"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}