waves_logo Docs
  • Overview
    Overview
  • How-to Guides
    • Reading Blockchain Data
      Reading Blockchain Data
    • Creating & Broadcasting Transactions
      Creating & Broadcasting Transactions
    • Tokenization
      Tokenization
    • Airdrop
      Airdrop
    • Payments
      Payments
    • Exchange Tokens
      Exchange Tokens
    • Simple Voting
      Simple Voting
    • List as argument
      List as argument
    How-to Guides
  • Waves Smart Contracts
    Waves Smart Contracts
  • dApp
    • Creating & Launching dApp
      Creating & Launching dApp
    dApp
  • Smart Account
    • Creating smart account
      Creating smart account
    • Creating and deploying a script manually
      Creating and deploying a script manually
    • Video tutorials
      • Introduction to the Waves blockchain, Waves Smart Accounts and Waves Smart Assets
        Introduction to the Waves blockchain, Waves Smart Accounts and Waves Smart Assets
      • Waves Smart Account with multisignature
        Waves Smart Account with multisignature
      • Waves Smart Account with escrow service
        Waves Smart Account with escrow service
      • Creating multisignature account via Waves IDE tools
        Creating multisignature account via Waves IDE tools
      • Creating multisignature account via Waves Client
        Creating multisignature account via Waves Client
      • Waves console explained
        Waves console explained
      Video tutorials
    Smart Account
  • Smart Asset
    Smart Asset
  • Developer Tools
    • Waves IDE
      Waves IDE
    • Visual Studio Code Extension
      Visual Studio Code Extension
    • Surfboard
      Surfboard
    • Ride REPL
      Ride REPL
    Developer Tools
  • Signer ◆
    Signer ◆
  • Waves API
    • Data Service API
      Data Service API
    • Node REST API
      Node REST API
    • Node gRPC Server
      Node gRPC Server
    • Blockchain Updates
      Blockchain Updates
    Waves API
  • Client Libraries
    • Waves C#
      • Install SDK
        Install SDK
      • Run Code Sample
        • Send Transactions
          Send Transactions
        • Use Crypto Utilities
          Use Crypto Utilities
        • Interact With Node
          Interact With Node
        • Set Up Smart Contracts
          Set Up Smart Contracts
        Run Code Sample
      Waves C#
    • Gowaves
      • Install SDK
        Install SDK
      Gowaves
    • WavesJ
      • Install SDK
        Install SDK
      WavesJ
    • Ts-lib-crypto
      • Install SDK
        Install SDK
      Ts-lib-crypto
    • Waves-PHP
      • Install SDK
        Install SDK
      Waves-PHP
    • Waves-python
      • Install SDK
        Install SDK
      Waves-python
    • Waves-rust
      • Install SDK
        Install SDK
      Waves-rust
    Client Libraries
      • English
      • Русский
      On this page
        • Installation and Configuration
        • Writing Ride Script
        • Assigning Script to Account or Asset
        • Interactive JavaScript Console
      waves_logo Docs

          # Visual Studio Code Extension

          Ride extension for Visual Studio Code provides Ride language support and interaction with the Waves blockchain.

          Key features:

          • Code completion (snippets).
          • Syntax and error highlighting.
          • JavaScript console with built-in functions for interaction with the Waves blockchain.

          # Installation and Configuration

          1. Download and install Visual Studio Code: https://code.visualstudio.com/ .
          2. Go to Extensions (Ctrl + Shift + X or Cmd ⌘ + Shift + X), find and install the Ride extension.

          Configure the settings for blockchain operation:

          1. In the Extensions view find Ride and click .
          2. If necessary, change the blockchain network and node URL.
          3. Specify the seed phrase for your account.

          # Writing Ride Script

          The extension recognizes .ride files and helps you to write a code:

          • prompts for names of built-in functions, operators, variables, and structures: just start typing or press Ctrl + Space (Cmd ⌘ + Space for macOS);
          • highlights errors.

          # Assigning Script to Account or Asset

          You can send a set script transaction, issue transaction, or set asset script transaction using JavaScript console.

          Example of assigning a dApp script to account:

          const script = compile(contract());
          const ssTx = setScript({script}, env.SEED);
          await broadcast(ssTx);
          
          • The contract() function retrieves the script code from the current active editor tab with .ride file.
          • The compile() function compiles the script code.
          • The setScript() function creates the set script transaction and signs it using the seed phrase specified in the extension settings.
          • The broadcast() function sends the transaction to the node specified in the extension settings.

          # Interactive JavaScript Console

          You can use the extension console to run JavaScript commands. The console provides functions for interacting with the Waves blockchain, such as signing and sending transactions, reading blockchain data, working with account keys etc. See the list of functions of js-test-env .

          To open the JavaScript console, go to Command Palette (Ctrl + Shift + P or Cmd ⌘ + Shift + P) and run the Start Waves JS Console command.

          Waves IDE
          Surfboard
          Waves IDE
          Surfboard