Home

Awesome

NEAR Sandbox

NEAR Sandbox lets you easily run a local NEAR blockchain.

NEAR Sandbox is a custom build of the NEAR blockchain optimized for local development and testing. If you're familiar with Ganache for Ethereum, this is similar.

This repository contains code to quickly install pre-built binaries of NEAR Sandbox for multiple programming languages (currently just NodeJS; Rust coming soon) and operating systems (currently just Intel-based Macs and Debian/Ubuntu-flavored Linux distros using Intel processors).

Using NEAR Sandbox

If you just want to run tests against a NEAR Sandbox instance, check out near-workspaces for your favorite language:

Tip: near-runner includes near-sandbox as a dependency, so you will not need to install or run near-sandbox on its own.

If you want to run NEAR Sandbox on its own, continue reading.

Install

With npm

npm i -g near-sandbox

Note: If you have trouble downloading binary from IPFS gateway, you can upload a pre-built near-sandbox tar file to any file storage service and use SANDBOX_ARTIFACT_URL environment variable to specify it's base URL. e.g. > SANDBOX_ARTIFACT_URL=https://s3.aws.com/my-binary npm i near-sandbox

With Rust

Coming soon

From Source

Use

To find out other things you can do:

near-sandbox --help

Stop

Once you're finished using the sandbox node you can stop it by using <kbd>Ctrl</kbd><kbd>C</kbd>. To clean up the data it generates:

rm -rf /tmp/near-sandbox

What's special about NEAR Sandbox

NEAR Sandbox includes custom features to make tweaking local and test environments easier.