v2 Contract SDK
  • Orbs Contract SDK
  • Getting Started
    • About smart contracts
    • Becoming a Go developer
    • Installing Gamma - local blockchain
    • Deploying your first contract
    • The Orbs Starter Kit
    • Downloading the Contract SDK
  • Orbs Contracts
    • Smart contracts
    • Layout of a contract file
    • Data types (Exported Functions)
    • State
    • Address
    • Events
    • Error handling
    • Calling other contracts
    • Calling Ethereum contract
    • API Reference
    • Limitations of Orbs Contracts
    • Creating a new contract
  • Gamma in Depth
    • Starting and stopping the server
    • Test keys and accounts
    • Deploying smart contracts
    • Sending transactions and queries
    • Checking sent transaction status
    • Reading Logs from Contracts
    • Working with multiple environments
    • Upgrading to latest versions
    • Gamma server under the hood
    • Deploying Gamma in the Cloud
      • Amazon Web Services
      • Google Cloud Platform
      • Azure
Powered by GitBook
On this page
  • Using Gamma CLI
  • Customizing the Gamma server port
  • Running Prism
  • Customizing the Prism port
  • Disable Prism
  • In-memory instance
  1. Gamma in Depth

Starting and stopping the server

PreviousCreating a new contractNextTest keys and accounts

Last updated 5 years ago

Using Gamma CLI

Start Gamma server by running in terminal

gamma-cli start-local

When finished with the server, stop it by running in terminal

gamma-cli stop-local

When you're not sending transactions, the nodes that make up Gamma server will still keep closing empty blocks. It is therefore recommended to stop the server when it's not needed.

Customizing the Gamma server port

Gamma server is an actual blockchain instance running on your local machine. Clients like Gamma CLI are able to communicate with this instance using HTTP.

By default, Gamma server listens on port 8080. To start Gamma server on a different port, 8089 for example, run the following in terminal

gamma-cli start-local -port 8089

Running Prism

Prism is the Orbs block explorer, you can access the one pointing to the mainnet at:

When running gamma and starting the server, it will also automatically run prism which will be accessible locally by browsing to http://localhost:3000

Customizing the Prism port

Prism will start on port 3000 by default, to start it on a different port, 3003 for example, run the following when starting gamma in the terminal

gamma-cli start-local -prismPort 3003

This command line flag can of course be chained with other flags.

Disable Prism

If you do not wish Prism to start with Gamma, use the no-ui flag, and run the following when starting Gamma in the terminal

gamma-cli start-local -no-ui

In-memory instance

It's important to understand that Gamma server is not storing any persistant state and uses only in-memory storage.

Every time you restart a Gamma server, all contracts and state disappear from memory. You will need to deploy the contracts again when the server is started.

https://prism.orbs.network