-
Notifications
You must be signed in to change notification settings - Fork 4
Sandbox: 1. Overview
The TON VS Code Sandbox is a graphical interface for working with the local TON blockchain sandbox, designed specifically for smart contracts written in the Tolk programming language. Conceptually similar to the Remix IDE for Ethereum, this VS Code extension provides a complete development environment that runs entirely locally within your beloved editor, requiring no internet connection.
The Sandbox simplifies essential blockchain development tasks including contract deployment, message sending, and get method execution.
The Sandbox interface consists of two main sections:
- The Control Panel combines three integrated views for managing contracts and performing blockchain operations.
- The Transaction Details section provides a visual tree representation of transaction chains with detailed information about each execution stage.
The Control Panel consists of three integrated views that work together to provide comprehensive contract management and blockchain interaction capabilities.
The primary view displays deployed contracts, message templates, and available actions:

This view also provides server controls (start/stop), connection status monitoring, and the ability to manage created message templates.
The Actions view provides interactive panels for executing blockchain operations and viewing contract details:
![]() |
![]() |
![]() |
![]() |
---|
This view enables contract deployment, message sending, get method execution, and inspection of the current contract state.
Contract deployment enables quick deployment of the currently active contract in your editor to the local sandbox. The extension automatically recognizes storage fields and prompts you to populate them before deployment. When multiple storage structures are detected, a dropdown selector appears at the top to choose the appropriate one.
Note: The extension expects storage structures to be named with "Storage" in their identifier.
If a contract with the same name already exists, the extension will offer to redeploy it, automatically removing the previous instance. This streamlined approach simplifies development by eliminating the need to manually manage multiple contract versions during iterative changes.
The Contract Information panel provides comprehensive contract management capabilities. You can rename contracts, copy their base64-encoded code, access the contract source code, and remove deployed instance.
The storage details section offers complete information about each storage field, including its size, encoded representation, and estimated annual storage costs.
The message sending interface enables sending of both internal and external messages to any deployed contract. TON's asynchronous messaging model means all contract interactions happen through messages rather than direct function calls.
Internal Messages: Can be sent from the treasury account (simulating user wallets) or between any deployed contracts.
External Messages: Sent from outside the blockchain (simulating off-chain actors like users or oracles).
The extension automatically recognizes message structures and their fields, eliminating the need for manual cell assembly. Dedicated input fields provide an intuitive interface for data entry.
The get method interface allows execution of read-only contract methods and retrieval of their return values. The extension automatically discovers available get methods for the selected contract and presents only valid options for execution.
The History view maintains a chronological record of all blockchain operations:

Every action—including contract deployments and message transmissions—is logged in the history, enabling rollback to any previous blockchain state.
The history can be exported to and imported from files, allowing complex testing scenarios to be created, saved, and reused multiple times without the risk of state changes requiring complete redeployment of contracts.
The Transaction Details section provides a comprehensive visual representation of the complete transaction execution tree, displaying detailed information about each stage in the message chain.
This view enables inspection of the entire message flow, including out-actions and exit codes for each execution stage. Hovering over individual nodes reveals the contract state changes that occurred after message processing:

The extension enhances the editor with interactive code lenses for streamlined development workflow.
When a contract is not yet deployed, a deployment button appears above the onInternalMessage
function, providing
direct access to the deployment interface.

Once deployed, the code lens expands to offer additional functionality:

You can now copy the contract address, initiate message sending, or trigger redeployment.
The redeployment process is designed for minimal friction. When the storage structure remains unchanged, it automatically deploys the updated contract, removes the previous version, and migrates the existing state—eliminating manual state management.
For deployed contracts, get methods receive their own dedicated code lenses:

Parameterless get methods display results directly in a notification when clicked. Methods with parameters open a dedicated input panel for value input.