Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added TOC and general change management #252

Merged
merged 1 commit into from
Jan 3, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions doc/contracts.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

For a general introduction to Smart Contracts in Qubic, we recommend to read [the Qubic Docs](https://docs.qubic.org/learn/smart-contracts).

1. [Overview](#overview)
2. [Development](#development)
3. [Review and tests](#review-and-tests)
4. [Procedures and Functions](#procedures-and-functions)
5. [Restrictions of C++ Language Features](#restrictions-of-c-language-features)
6. [General Change Management](#general-change-management)

## Overview

In Qubic, smart contracts are implemented in a restricted variant of C++ and compiled into the Qubic Core executable.
Expand Down Expand Up @@ -233,3 +240,13 @@ Global variables are not permitted.
Global constants must begin with the name of the contract state struct.

There is a limit for recursion and depth of nested contract function / procedure calls (the limit is 10 at the moment).

## General Change Management
Smart Contract code in Qubic is generally immutable. This ensures stable quality and security accross the network.
However there are situation where you want to change your SC.

### Bugfix
A bugfix is possible at any time. It can be applied during the epoch (if no state is changed) or must be coordinated with an epoch update.

### New Features
If you want to add new features, this needs to be approved by the computors again. Please refer to the [Deployment](#deployment) for the needed steps. The IPO is not anymore needed for an update of your SC.
Loading