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
  • Cloning the SDK
  • Quick tour of the SDK contents
  • Updating the SDK
  1. Getting Started

Downloading the Contract SDK

You are encouraged to look at the Contract SDK itself, although that is not required in order to build contracts on the Orbs Network.

PreviousThe Orbs Starter KitNextSmart contracts

Last updated 5 years ago

Every feature of the SDK is documented at the chapter of the Contract SDK documentation. The Contract SDK is also published as a Go Module to ease usage when developing a contract. ( - from the golang blog)

Having that said, the project can be useful in order to assist with getting started on creating more complex contracts.

Cloning the SDK

Download the SDK to your computer by running the following in a terminal

go get -u github.com/orbs-network/orbs-contract-sdk/...

It is recommended to avoid cloning the repo manually with git because the SDK has to be placed in the appropriate path within your Go workspace. The SDK also includes a few git submodules which may be a little tricky to clone recursively.

Quick tour of the SDK contents

The SDK will download to your Go workspace, typically at

~/go/src/github.com/orbs-network/orbs-contract-sdk

The first place to explore in the SDK is the contract examples found at

~/go/src/github.com/orbs-network/orbs-contract-sdk/go/examples

Every example contains a README explaining the nature of the contract and how to test it. The automated tests include both a unit test and an end-to-end test running on Gamma server.

The API of the SDK is found at

~/go/src/github.com/orbs-network/orbs-contract-sdk/go/sdk/v1

Updating the SDK

In order to update the SDK to the latest version, run the same command used to download it initially.

Notice that the SDK folder in your workspace is actually a git repo. You can also update the SDK by running git pull manually.

Orbs Contract
what are Go Modules
examples in the Contract SDK