feat: soroban-best-practice-snippets#936
Merged
Merged
Conversation
|
@Salmatcre8 is attempting to deploy a commit to the vidatg's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@Salmatcre8 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a second, distinct set of 58 advanced Soroban best-practice VS Code snippets in
extension/snippets/soroban-advanced-snippets.json, registered alongside the existing snippet file. All work is confined to theextension/directory.Closes #877
Why a new file (not edits to the existing one)
The existing
extension/snippets/soroban-snippets.jsonalready ships 60 foundational snippets. Rather than disturb those, this PR adds a separatesoroban-advanced-snippets.jsonfocused on higher-level patterns the original set does not cover, under a dedicatedsba-prefix namespace so there are zero prefix collisions.What's included (58 snippets, all documented)
transfer_from, balance helpers, internaldo_transfer, mint/burn with supply tracking + events.mul_div, basis-points helper, clamp.try_*calls, deployer factory,contractimport!, native__constructor.Cargo.tomlrelease profile,Makefile, andstellarCLI deploy/invoke command references.Each snippet has a
prefix, abody, and adescription(the integrated documentation shown in the IntelliSense popup).Verified terminal output
Since this is a snippet/JSON contribution (no runnable UI to screenshot), here is the verification output proving the deliverable meets the acceptance criteria. Both registered files parse as valid JSON and conform to the VS Code snippet schema:
(The new file alone provides 58 snippets — already above the 50+ requirement — and every prefix is unique across both files.)
Acceptance criteria
description)snippets/soroban-*-snippets.jsonpresent and registered inpackage.json