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
  • What is a smart contract
  • Programming languages for contracts
  • Programming contracts in Go
  1. Getting Started

About smart contracts

Introduction to smart contracts in general and contracts inside Orbs specifically.

PreviousOrbs Contract SDKNextBecoming a Go developer

Last updated 5 years ago

What is a smart contract

Smart contracts are the cornerstone of decentralized systems. When a developer is building a decentralized app, they will find themselves implementing one or more smart contracts, and ultimately deploying them to run over a blockchain infrastructure like Orbs.

The two main services provided by a blockchain infrastructure in this regard are compute under consensus - where multiple nodes execute the contract code and reach consensus over the execution results; and storage under consensus - where the executed code can store state variables persistently.

Compared to centralized cloud platforms, contracts are very similar to serverless compute services such as . Developers deploy code to run directly over the cloud infrastructure and then build clients that make API calls to these services.

Programming languages for contracts

The first popularized smart contract programming language is , which was developed as part of the project.

Solidity was a brand new language that was designed from scratch for this purpose. This design choice came with benefits - such as the ability to support fine grained execution fees with , and drawbacks - such as an immature toolchain and third party library ecosystem.

The new age of smart contract development is turning towards established programming languages that have already reached industry maturity.

Programming contracts in Go

Smart contracts in Orbs are developed using the programming language.

Go is a low-level open source language developed by Google for extreme performance. It is very popular in the blockchain space and was used to implement the node core of popular blockchains like Ethereum and Hyperledger. It rivals the performance of C++ but is substantially simpler and easier to learn.

Go is also a mature language, with millions upon millions of lines of code used in production for the last 10 years. Go comes with a powerful toolchain, multiple IDEs and a rich ecosystem of third party libraries.

To ensure the secure and deterministic execution of Orbs smart contract, there are several limitations set on what features you can use of the Go language when building contracts. They are but it is recommended to go over them only after you familiarize yourself with Go.

AWS Lambda
Solidity
Ethereum
gas
Go
described here