Skip to content

What do you think about Visual Studio Marketplace? We are looking for feedback from developers like you! Take the survey

| Marketplace
Sign in
Visual Studio Code>Programming Languages>Radix Transaction Manifest SupportNew to Visual Studio Code? Get it now.

Radix Transaction Manifest Support

Preview

Radix Publishing

|
410 installs
| (1) | Free
This extension adds support for Radix's transaction manifests adding features such as an Id validator, syntax highlighting, syntax diagnostics, formatting, and other features.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Radix Transaction Manifest extension for Visual Studio Code

This Visual Studio Code extension adds a number of useful language IDE features to Radix Transaction Manifests. These features include:

  • Diagnostics and Error Detection.
  • Instruction Snippets.
  • Syntax Highlighting & Formatting.
  • Hover Information.
  • and more!

Features

Diagnostics and Error Detection

This extension is able to detect a wide-array of errors in transaction manifests and provide warnings and errors when these errors are encountered. This is done through a number of DiagnosticsProviders which provide diagnostics for different types of errors. The following is a list of the diagnostics providers currently available in the extension:

  • ID Validation Diagnostics Provider: statically analyzes the transaction manifest and keeps track of buckets and proofs as they come into existence and they get used up. This provider catches errors involving buckets and proofs that get used twice, get used before coming into existence, or are left dangling in the transaction worktop in the end of the transaction.

  • Lexing and Parsing Diagnostics Provider: lexes and parses the transaction manifest and reports back any errors involving the syntax of the transaction manifest or unexpected tokens. This diagnostics provider catches errors such as a CALL_METHOD happening on a resource address instead of a component address.

  • Addressing Diagnostics Provider: analyzes all instances of addresses checking for their correctness in relation to Bech32 and overall sensibility. As an example, this provider is able to catch errors where a PackageAddress is used but the string is of a component address. Additionally, addresses with invalid Bech32m encoding, invalid entity bytes, or unconforming network specifiers can be picked up by this diagnostics provider.

  • Numbers Diagnostics Provider: analyzes all numbers used in the transaction manifest checking the limits of each of the numbers and the number of decimal places allowed, this provider then picks up on all numbers that are in violation of their rules. As an example, this provider is what provides diagnostics when a number such as "1233u8" is in the manifest.

  • General Diagnostics Provider: general or miscellaneous diagnostics on multiple parts of transaction manifests.

Diagnostics providers are very modular and more diagnostics providers can be added later to add additional error reporting for other

Instruction Snippets

The extension comes with a number of snippets which make the process of writing transaction manifests far easier. The following are the snippets provided by this extension:

Category Snippet Trigger Description
Instruction Snippets CALL_METHOD Calls a method on a component
CALL_METHOD Calls a method on a component
CALL_METHOD Calls a method on a component.
CALL_FUNCTION Calls a function on a blueprint.
TAKE_FROM_WORKTOP Takes resources from the worktop and into a bucket.
TAKE_FROM_WORKTOP_BY_AMOUNT Takes resources from the worktop and into a bucket.
TAKE_FROM_WORKTOP_BY_IDS Takes resources from the worktop and into a bucket.
RETURN_TO_WORKTOP Returns a bucket to the transaction worktop.
ASSERT_WORKTOP_CONTAINS Asserts that the transaction worktop contains some resource.
ASSERT_WORKTOP_CONTAINS_BY_AMOUNT Asserts that the transaction worktop contains some resource.
ASSERT_WORKTOP_CONTAINS_BY_IDS Asserts that the transaction worktop contains some resource.
POP_FROM_AUTH_ZONE Pops a proof from the Auth Zone.
PUSH_TO_AUTH_ZONE Pushes a proof to the auth zone.
CREATE_PROOF_FROM_AUTH_ZONE Creates a proof from the Auth Zone.
CREATE_PROOF_FROM_AUTH_ZONE_BY_AMOUNT Creates a proof from the Auth Zone.
CREATE_PROOF_FROM_AUTH_ZONE_BY_IDS Creates a proof from the Auth Zone.
CREATE_PROOF_FROM_BUCKET Creates a proof from Bucket.
CLONE_PROOF Clones an existing proof.
DROP_PROOF Drops a Proof.
DROP_ALL_PROOF Drops all Proofs.
CLEAR_AUTH_ZONE Drops all proofs from the Auth Zone.
PUBLISH_PACKAGE Publishes a package.
Common Operations LOCK_FEE Locks a fee for the transaction.
WITHDRAW_FROM_ACCOUNT Withdraws funds from an account.
WITHDRAW_FROM_ACCOUNT_BY_AMOUNT Withdraws funds from an account.
WITHDRAW_FROM_ACCOUNT_BY_IDS Withdraws funds from an account.
Useful Constants RADIX_TOKEN The Resource Address of the Radix Token.
SYSTEM_COMPONENT The component address of the system component.

Syntax Highlighting and Formatting

The extension adds grammar and syntax rules for transaction manifest files which allows for syntax highlighting and native formatting integration with VS Code.

Installation Guide

Option 1: Install through VS Code marketplace

You can install this extension through the VS Code marketplace by doing the following:

  1. Find the extension on the VS Code marketplace.
  2. Click on "Install". This will open VS Code for you and will take you to the extension listing.

Option 2: Installing through the .vsix file

Each new version that releases of this extension comes with pre-packaged vsix files which can be used to install this extension without needing to go through the VS Code marketplace. To install this extension through the vsix files, follow the steps below:

  1. Install the vsix files of the latest release from here.
  2. Open VS Code and go to the extensions tab.
  3. Click on the three dots at the top right of the extensions tab.
  4. Click on "install from VSIX" and select the file that you downloaded.

Option 3: Building/Packaging from Source

If you would like to build and package your own extension from source for the purpose of installing it, then follow the steps below:

  1. In your command line, run the command: vsce package. This packages the extension for you in a vsix file.
  2. Follow the steps in "Option 2" above to install the vsix file you packaged.

Issus and Bug Reports

If you have any questions or encounter any bugs or issues that you would like to report, you can file an issue on the extension's GitHub repository.

  • Contact us
  • Jobs
  • Privacy
  • Terms of use
  • Trademarks
© 2023 Microsoft