Practical overview
When it fits
Use Sandbox when developing or testing TON contracts locally, especially when a scenario depends on message processing, fees, balances or interactions between contracts.
Who it is for
- TON smart-contract developers building local tests
- Teams testing message flows between contracts
- Developers checking transaction fees and whether balances can cover outgoing messages
Documented uses
- Emulate contract messages before network deployment.
- Run get methods against an emulated contract.
- Test fee and balance behavior across contract phases.
- Build repeatable local regression tests for contract scenarios.
Requirements & limits
Sandbox is an MIT-licensed TypeScript package installed through npm or Yarn. The README requires Node.js 16 or higher.
- The emulator models contract phases, fees and balances, not only contract computation.
- Opened contract wrappers supply ContractProvider to methods beginning with get or send.
- The documented Jest environment and reporter support test execution metrics and gas-report workflows.
- The README warns that TON randomness is deterministic in the sandbox.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Install Sandbox and initialize a local blockchain
Add the package dependencies and create a Blockchain instance for local TON contract emulation.
Before you start
- Node.js 16 or higher
- npm or Yarn
- The @ton/sandbox, @ton/ton, @ton/core and @ton/crypto packages
Steps
Install the four packages with the npm or Yarn command shown in the README.
Import Blockchain from @ton/sandbox.
Create an instance with await Blockchain.create().
Expected outcome
A local Blockchain instance is ready for emulating messages and contract methods.
Guide limitations
- This covers installation and initialization; it does not deploy a contract or define a complete test.
- Sandbox emulates TON behavior locally, and its README notes emulator pitfalls such as deterministic randomness.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 10 October 2026
- Original website title
- ton-blockchain/sandbox · Official homepage title · retained in its source language
Related options
ton-contract-executor — The README contrasts it with Sandbox: ton-contract-executor emulates only the compute phase, while Sandbox also models other phases, fees and balances.

