Skip to content
Closed
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions docs-sphinx/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ Welcome to AElf's official documentation!
Smart Contract API <reference/smart-contract-api/index>
Acs Introduction <reference/acs/index>
Command-line Interface <reference/cli/index>
Smart Contract <reference/smart-contract/index>


.. toctree::
Expand Down
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
28 changes: 28 additions & 0 deletions docs-sphinx/reference/smart-contract/genesis-contract.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Overview

Genesis Contract, also known as the Zero Contract, is mainly used to deploy and maintain smart contracts running on the aelf blockchain.

# Deploy and update contracts

There is a critical data structure defined in `aelf/core.proto`, called SmartContractRegistration:

```C#
message SmartContractRegistration {
// The category of contract code(0: C#).
sint32 category = 1;
// The byte array of the contract code.
bytes code = 2;
// The hash of the contract code.
Hash code_hash = 3;
// Whether it is a system contract.
bool is_system_contract = 4;
// The version of the current contract.
int32 version = 5;
// The version of the contract.
string contract_version = 6;
// The address of the current contract.
Address contract_address = 7;
// Indicates if the contract is the user contract.
bool is_user_contract = 8;
}
```
28 changes: 28 additions & 0 deletions docs-sphinx/reference/smart-contract/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Smart Contract
===================

This section gives the usages, explanations, and implementations of current
system contracts. It’s not meant to be exhaustive. With some useful methods
we give the demo code of interaction, these demos will be useful during
developing user contracts.


.. toctree::
:caption: Smart Contract
:maxdepth: 1

Genesis Contract <genesis-contract>
Consensus Contract <consensus-contract>
Multi Token Contract <multi-token-contract>
Cross chain Contract <cross-chain-contract>
Vote Contract <vote-contract>
Profit Contract <profit-contract>
Election Contract <election-contract>
Association Contract <association-contract>
Referendum Contract <referendum-contract>
Parliament Contract <parliament-contract>
Treasury Contract <treasury-contract>
Token Holder Contract <token-holder-contract>
Economic Contract <economic-contract>
Token Convert Contract <token-convert-contract>
Configuration Contract <configuration-contract>
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.