Skip to main content

2 posts tagged with "VS Code"

View All Tags

· 3 min read
David Semakula

I am proud to announce the successful completion of another Web3 Foundation grant for updating ink! analyzer - a collection of modular and reusable libraries and tools for semantic analysis of ink! smart contract code.

If you're new to ink! analyzer (or if you need a refresher 🙂), you can refer to the introductory blog post for a deep dive into the problem, solution and technical descriptions of each of the architectural components of the project.

What's new?

This stage of the project has improved ink! language support features across all components by adding:

  • Quick fixes for all diagnostic errors and warnings.
  • ink! e2e test macro support (i.e diagnostics, quickfixes, completions, code actions and hover content).
  • A command for creating an ink! project (with a contract stub/snippet).
  • Code/intent actions for inserting code stubs/snippets for contextually relevant ink! entities (i.e. full items not just attributes e.g. an #[ink(event)] annotated struct, an #[ink(message)] annotated fn e.t.c).
  • Inlay hints and signature help/parameter hints for ink! attribute arguments (e.g. u32 | _ for ink! selectors, impl Environment for env arguments e.t.c).
  • Code/intent actions for "flattening" ink! attributes.
  • Diagnostics that verify that the value of env and environment arguments for #[ink::contract] and #[ink_e2e::test] respectively impl Environment as well as quick fixes to impl Environment for the target item where necessary.
  • Diagnostics that verify chain extension ErrorCode types, and other input and output types, implement required traits (e.g. FromStatusCode for ErrorCode types, and SCALE codec traits - i.e. scale's Encode and Decode and scale-info's TypeInfo traits - for ErrorCode types, and input and output types of chain extension methods) as well as quick fixes to implement the required traits for the target items where necessary.
  • Diagnostics and quickfixes for ink! trait definition implementations that don't match the ink! trait definition (e.g. implementing missing methods, removing undeclared methods, fixing method signatures, updating ink! attributes to match the trait definition e.t.c).

· 7 min read
David Semakula

ink! Analyzer cover image

I am proud to announce the successful completion of the Web3 Foundation grant for developing ink! analyzer - a collection of modular and reusable libraries and tools for semantic analysis of ink! smart contract code.

ink! analyzer aims to improve ink! language support in integrated development environments (IDEs), source code editors and other development tools by providing modular and reusable building blocks for implementing language features (e.g. diagnostic errors, quick fixes, code completion suggestions, code/intent actions and hover content e.t.c) for the ink! programming language which is used for writing smart contracts for blockchains built with Substrate.