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
      • 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
      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
    • PyWaves-CE
      • Install SDK
        Install SDK
      PyWaves-CE
    • Waves-rust
      • Install SDK
        Install SDK
      Waves-rust
    Client Libraries
      • English
      • Русский
      On this page
        • Standard Library
        • Blockchain Data
      waves_logo Docs

          # Ride REPL: Interactive Ride Console

          Ride REPL (read-eval-print loop) is the easiest way to try out the Ride language and its execution semantic.

          Ride REPL is built into the following developer tools:

          • Waves IDE
          • Surfboard

          In Ride REPL, you can define variables and functions and use the results of previous computations:

          RIDE > let x = 42
          defined let x: Int
          RIDE > func inc(i:Int) = { i + 1 }
          defined func inc(i: Int): Int
          RIDE > inc(x)
          res1: Int = 43
          RIDE > inc(res1)
          res2: Int = 44
          

          The :reset command clears REPL state, removing all the existing definitions.

          # Standard Library

          REPL features all the built-in functions, operators, variables, and structures of the Ride language:

          RIDE > max([2,12,85,6])
          res3: Int = 85
          RIDE > sha256(base58'')
          res4: ByteVector = base58'GKot5hBsd81kMupNCXHaqbhv3huEbxAFMLnpcX2hniwn')
          

          You can query the function signature, structure definition or variable type by using the ? command.

          RIDE > ? getInteger
          func getInteger(addressOrAlias: Address|Alias, key: String): Int|Unit
          func getInteger(data: List[BinaryEntry|BooleanEntry|DeleteEntry|IntegerEntry|StringEntry], key: String): Int|Unit
          func getInteger(data: List[BinaryEntry|BooleanEntry|DeleteEntry|IntegerEntry|StringEntry], index: Int): Int|Unit
          func getInteger(key: String): Int|Unit
          

          The ?? command dumps all the existing definitions.

          # Blockchain Data

          The results of blockchain-based functions and variables depend on the account and blockchain network (Mainnet, Testnet, or other) configured in tool settings. For example:

          RIDE > this
          res5: Address = Address(
                  bytes = base58'3N3ErpmUdJWy6DW4ruAr14YDis9UaiTwHd6'
          )
          RIDE > wavesBalance(this)
          res6: BalanceDetails = BalanceDetails(
              available = 8978000000
              regular = 8978000000
              generating = 8978000000
              effective = 8978000000
          )
          
          Surfboard
          Signer ◆
          Surfboard
          Signer ◆