Skip to content

Commit 0a0327c

Browse files
authored
Merge pull request #35 from eosnetworkfoundation/arhag/GH-34-remove-mandel
Remove references to mandel; update dependencies to use new CDT and Leap; and overall cleanup
2 parents a6480e0 + 11ef036 commit 0a0327c

14 files changed

+68
-299
lines changed

IMPORTANT.md

Lines changed: 0 additions & 27 deletions
This file was deleted.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
eosnetworkfoundation/mandel-contracts
1+
eosnetworkfoundation/eos-system-contracts
22

33
Copyright (c) 2021-2022 EOS Network Foundation (ENF) and its contributors. All rights reserved.
44
This ENF software is based upon:

README.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
1-
# System Contracts
1+
# EOS system contracts
22

3-
System contracts are a collection of contracts deployable to an EOSIO blockchain that implement a lot of critical functionality that is expected from blockchains. For example, the concept of the core token of the blockchain is introduced through the system contracts. In addition, the system contracts can build upon primitives provided by the base EOSIO protocol to enable more useful capabilities, such as:
4-
* decentralized, open-access resource management through staking tokens or paying fees which builds upon the EOSIO protocol's primitive mechanism of assigning resource quotas to accounts;
5-
* higher-level consensus mechanisms (e.g. Delegated Proof of Stake or Proof of Authority) which build upon the EOSIO protocol's base consensus algorithm that advances finality of blocks based on confirmations from a selected set of block producers.
3+
EOS system contracts are a collection of contracts deployable to an [Antelope](https://github.com/AntelopeIO) blockchain, but specifically designed for the EOS blockchain, which implements a lot of critical functionality that is expected from blockchains. For example, the concept of the core token of the blockchain is introduced through the system contracts. In addition, the system contracts can build upon primitives provided by the base EOSIO protocol to enable more useful capabilities, such as:
4+
* decentralized, open-access resource management through staking tokens or paying fees which builds upon the Antelope protocol's primitive mechanism of assigning resource quotas to accounts;
5+
* higher-level consensus mechanisms (e.g. Delegated Proof of Stake or Proof of Authority) which build upon the Antelope protocol's base consensus algorithm that advances finality of blocks based on confirmations from a selected set of block producers.
66

77
The collection of system contracts consists of the following individual contracts:
88

99
* [boot contract](contracts/eosio.boot/include/eosio.boot/eosio.boot.hpp): A minimal contract that only serves the purpose of activating protocol features which enables other more sophisticated contracts to be deployed onto the blockchain. (Note: this contract must be deployed to the privileged `eosio` account.)
1010
* [bios contract](contracts/eosio.bios/include/eosio.bios/eosio.bios.hpp): A simple alternative to the core contract which is suitable for test chains or perhaps centralized blockchains. (Note: this contract must be deployed to the privileged `eosio` account.)
1111
* [token contract](contracts/eosio.token/include/eosio.token/eosio.token.hpp): A contract enabling fungible tokens.
12-
* [core contract](contracts/eosio.system/include/eosio.system/eosio.system.hpp): A monolithic contract that includes a variety of different functions which enhances a base EOSIO blockchain for use as a public, decentralized blockchain in an opinionated way. (Note: This contract must be deployed to the privileged `eosio` account. Additionally, this contract requires that the token contract is deployed to the `eosio.token` account and has already been used to setup the core token.) The functions contained within this monolithic contract include (non-exhaustive):
12+
* [core contract](contracts/eosio.system/include/eosio.system/eosio.system.hpp): A monolithic contract that includes a variety of different functions which enhances a base Antelope blockchain for use as a public, decentralized blockchain in an opinionated way. (Note: This contract must be deployed to the privileged `eosio` account. Additionally, this contract requires that the token contract is deployed to the `eosio.token` account and has already been used to setup the core token.) The functions contained within this monolithic contract include (non-exhaustive):
1313
+ Delegated Proof of Stake (DPoS) consensus mechanism for selecting and paying (via core token inflation) a set of block producers that are chosen through delegation of the staked core tokens.
1414
+ Allocation of CPU/NET resources based on core tokens in which the core tokens are either staked for an indefinite allocation of some fraction of available CPU/NET resources, or they are paid as a fee in exchange for a time-limited allocation of CPU/NET resources via REX or via PowerUp.
1515
+ An automated market maker enabling a market for RAM resources which allows users to buy or sell available RAM allocations.
1616
+ An auction for bidding for premium account names.
17-
* [multisig contract](contracts/eosio.msig/include/eosio.msig/eosio.msig.hpp): A contract that enables proposing EOSIO transactions on the blockchain, collecting authorization approvals for many accounts, and then executing the actions within the transaction after authorization requirements of the transaction have been reached. (Note: this contract must be deployed to a privileged account.)
18-
* [wrap contract](contracts/eosio.wrap/include/eosio.wrap/eosio.wrap.hpp): A contract that wraps around any EOSIO transaction and allows for executing its actions without needing to satify the authorization requirements of the transaction. If used, the permissions of the account hosting this contract should be configured to only allow highly trusted parties (e.g. the operators of the blockchain) to have the ability to execute its actions. (Note: this contract must be deployed to a privileged account.)
17+
* [multisig contract](contracts/eosio.msig/include/eosio.msig/eosio.msig.hpp): A contract that enables proposing Antelope transactions on the blockchain, collecting authorization approvals for many accounts, and then executing the actions within the transaction after authorization requirements of the transaction have been reached. (Note: this contract must be deployed to a privileged account.)
18+
* [wrap contract](contracts/eosio.wrap/include/eosio.wrap/eosio.wrap.hpp): A contract that wraps around any Antelope transaction and allows for executing its actions without needing to satisfy the authorization requirements of the transaction. If used, the permissions of the account hosting this contract should be configured to only allow highly trusted parties (e.g. the operators of the blockchain) to have the ability to execute its actions. (Note: this contract must be deployed to a privileged account.)
1919

2020
## Repository organization
2121

22-
The `main` branch contains the latest state of development; do not use this for production. Refer to the [releases page](https://github.com/eosnetworkfoundation/mandel-contracts/releases) for current information on releases, pre-releases, and obsolete releases as well as the corresponding tags for those releases.
22+
The `main` branch contains the latest state of development; do not use this for production. Refer to the [releases page](https://github.com/eosnetworkfoundation/eos-system-contracts/releases) for current information on releases, pre-releases, and obsolete releases as well as the corresponding tags for those releases.
2323
## Supported Operating Systems
2424

25-
[CDT](https://github.com/eosnetworkfoundation/mandel.cdt) is required to build contracts. Any operating systems supported by CDT is sufficient to build the system contracts.
25+
[CDT](https://github.com/AntelopeIO/cdt) is required to build contracts. Any operating systems supported by CDT is sufficient to build the system contracts.
2626

27-
To build and run the tests as well, [EOSIO](https://github.com/eosnetworkfoundation/mandel) is also required as a dependency, which may have its further restrictions on supported operating systems.
27+
To build and run the tests as well, [Leap](https://github.com/AntelopeIO/leap) is also required as a dependency, which may have its further restrictions on supported operating systems.
2828
## Building
2929

3030
The build guide below will assume you are running Ubuntu 20.04. However, as mentioned above, other operating systems may also be supported.
@@ -33,44 +33,44 @@ The build guide below will assume you are running Ubuntu 20.04. However, as ment
3333

3434
The CDT dependency is required. This release of the system contracts requires at least version 3.0 of CDT.
3535

36-
The easiest way to satisfy this dependency is to install CDT on your system through a package. Find the release of a compatible version of CDT from its [releases page](https://github.com/eosnetworkfoundation/mandel.cdt/releases), download the package file appropriate for your OS from the attached assets, and install the package.
36+
The easiest way to satisfy this dependency is to install CDT on your system through a package. Find the release of a compatible version of CDT from its [releases page](https://github.com/AntelopeIO/cdt/releases), download the package file appropriate for your OS from the attached assets, and install the package.
3737

38-
Alternatively, you can build CDT from source. Please refer to the guide in the [CDT README](https://github.com/eosnetworkfoundation/mandel.cdt#building) for instructions on how to do this. If you choose to go with building CDT from source, please keep the path to the build directory in the shell environment variable `CDT_BUILD_PATH` for later use when building the system contracts.
38+
Alternatively, you can build CDT from source. Please refer to the guide in the [CDT README](https://github.com/AntelopeIO/cdt#building-from-source) for instructions on how to do this. If you choose to go with building CDT from source, please keep the path to the build directory in the shell environment variable `CDT_BUILD_PATH` for later use when building the system contracts.
3939

40-
### Optionally build EOSIO dependency
40+
### Optionally build Leap dependency
4141

42-
The EOSIO dependency is optional. It is only needed if you wish to also build the tests using the `BUILD_TESTS` CMake flag.
42+
The Leap dependency is optional. It is only needed if you wish to also build the tests using the `BUILD_TESTS` CMake flag.
4343

44-
Unfortunately, it is not currently possible to satisfy the contract testing dependencies through the EOSIO packages made available from the [EOSIO releases page](https://github.com/eosnetworkfoundation/mandel/releases). So if you want to build the contract tests, you will first need to build EOSIO from source.
44+
Unfortunately, it is not currently possible to satisfy the contract testing dependencies through the Leap packages made available from the [Leap releases page](https://github.com/AntelopeIO/leap/releases). So if you want to build the contract tests, you will first need to build Leap from source.
4545

46-
Please refer to the guide in the [EOSIO README](https://github.com/eosnetworkfoundation/mandel/#building-from-source) for instructions on how to do this. If you choose to go with building EOSIO from source, please keep the path to the build directory in the shell environment variable `EOSIO_BUILD_PATH` for later use when building the system contracts.
46+
Please refer to the guide in the [Leap README](https://github.com/AntelopeIO/leap#building-from-source) for instructions on how to do this. If you choose to go with building Leap from source, please keep the path to the build directory in the shell environment variable `LEAP_BUILD_PATH` for later use when building the system contracts.
4747

4848
### Build system contracts
4949

50-
Beyond CDT and optionally EOSIO (if also building the tests), no additional dependencies are required to build the system contracts.
50+
Beyond CDT and optionally Leap (if also building the tests), no additional dependencies are required to build the system contracts.
5151

52-
The instructions below assume you are building the system contracts with tests, have already built EOSIO from source, and have the CDT dependency installed on your system. For some other configurations, expand the hidden panels placed lower within this section.
52+
The instructions below assume you are building the system contracts with tests, have already built Leap from source, and have the CDT dependency installed on your system. For some other configurations, expand the hidden panels placed lower within this section.
5353

5454
For all configurations, you should first `cd` into the directory containing cloned system contracts repository.
5555

56-
Build system contracts with tests using EOSIO built from source and with installed CDT package:
56+
Build system contracts with tests using Leap built from source and with installed CDT package:
5757

5858
```
5959
mkdir build
6060
cd build
61-
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=ON -Deosio_DIR="${EOSIO_BUILD_PATH}/lib/cmake/eosio" ..
61+
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=ON -Dleap_DIR="${LEAP_BUILD_PATH}/lib/cmake/leap" ..
6262
make -j $(nproc)
6363
```
6464

6565
**Note:** `CMAKE_BUILD_TYPE` has no impact on the WASM files generated for the contracts. It only impacts how the test binaries are built. Use `-DCMAKE_BUILD_TYPE=Debug` if you want to create test binaries that you can debug.
6666

6767
<details>
68-
<summary>Build system contracts with tests using EOSIO and CDT both built from source</summary>
68+
<summary>Build system contracts with tests using Leap and CDT both built from source</summary>
6969

7070
```
7171
mkdir build
7272
cd build
73-
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=ON -Dcdt_DIR="${CDT_BUILD_PATH}/lib/cmake/cdt" -Deosio_DIR="${EOSIO_BUILD_PATH}/lib/cmake/eosio" ..
73+
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=ON -Dcdt_DIR="${CDT_BUILD_PATH}/lib/cmake/cdt" -Dleap_DIR="${LEAP_BUILD_PATH}/lib/cmake/leap" ..
7474
make -j $(nproc)
7575
```
7676
</details>

0 commit comments

Comments
 (0)