Skip to content

HKEOS/wax-system-contracts

 
 

Repository files navigation

wax-system-contracts Build Status

The WAX System Contracts

The Worldwide Asset eXchange™ (WAX) is a purpose-built blockchain and protocol token designed to make e-commerce transactions faster, easier, and safer for all participants. The WAX Blockchain mainnet uses Delegated Proof of Stake (DPoS) as its consensus mechanism and is fully backward compatible with EOS. The custom features and incentive mechanisms developed by WAX are designed to optimize the blockchain’s usability in e-commerce, and encourage voting on guilds and proposals.

Some of the features of the WAX System Contracts include:

  1. Token Swap in conjunction with Genesis Block Member Rewards
  2. Earning staking rewards
  3. Incentives and mechanics to address voter apathy

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:

Installation Instructions

To build the contracts and the unit tests:

  • First, ensure that your eosio is compiled to the core symbol for the EOSIO blockchain that intend to deploy to.
  • Second, make sure that you have sudo make installed eosio.
  • Then just run the build.sh in the top directory to build all the contracts and the unit tests for these contracts.

After build:

  • The unit tests executable is placed in the build/tests and is named unit_test.
  • The contracts are built into a bin/<contract name> folder in their respective directories.
  • Finally, simply use cleos to set contract by pointing to the previously mentioned directory.

Run interactive tests:

  1. Start the interactive shell: make dev-docker-start
  2. Run all the tests: make test
  3. Run a single test: make compile && ./build/tests/unit_test --log_level=all --run_test=eosio_wps_tests/committee_reg_edit_rmv

License

MIT

Packages

No packages published

Languages

  • C++ 97.2%
  • Shell 1.4%
  • CMake 1.3%
  • Makefile 0.1%