The design of the EOSIO blockchain calls for a number of smart contracts that are run at a privileged permission level in order to support functions such as block producer registration and voting, token staking for CPU and network bandwidth, RAM purchasing, multi-sig, etc. These smart contracts are referred to as the bios, system, msig, wrap (formerly known as sudo) and token contracts.
This repository contains examples of these privileged contracts that are useful when deploying, managing, and/or using an EOSIO blockchain. They are provided for reference purposes:
The following unprivileged contract(s) are also part of the system.
Dependencies:
- eosio.cdt v1.6.x
- eosio v1.8.x (optional dependency only needed to build unit tests)
To build contracts alone:
- Ensure an appropriate version of eosio.cdt is installed. Installing eosio.cdt from binaries is sufficient.
- Run the
build.shscript in the top directory to build all the contracts.
To build the contracts and unit tests:
- Ensure an appropriate version of eosio.cdt is installed. Installing eosio.cdt from binaries is sufficient.
- Ensure an appropriate version of eosio has been built from source and installed. Installing eosio from binaries is not sufficient.
- Run the
build.shscript in the top directory with the-tflag to build all the contracts and the unit tests for these contracts.
After build:
- If the build was configured to also build unit tests, the unit tests executable is placed in the build/tests folder and is named unit_test.
- The contracts (both
.wasmand.abifiles) are built into their corresponding build/contracts/<contract name> folder. - Finally, simply use cleos to set contract by pointing to the previously mentioned directory for the specific contract.
The included icons are provided under the same terms as the software and accompanying documentation, the MIT License. We welcome contributions from the artistically-inclined members of the community, and if you do send us alternative icons, then you are providing them under those same terms.
See LICENSE for copyright and license terms.
All repositories and other materials are provided subject to the terms of this IMPORTANT notice and you must familiarize yourself with its terms. The notice contains important information, limitations and restrictions relating to our software, publications, trademarks, third-party resources, and forward-looking statements. By accessing any of our repositories and other materials, you accept and agree to the terms of the notice.