Skip to content
This repository has been archived by the owner on Aug 30, 2022. It is now read-only.

Commit

Permalink
Merge pull request #135 from EOSIO/release/1.5.x
Browse files Browse the repository at this point in the history
Version 1.5.1
  • Loading branch information
arhag authored Nov 27, 2018
2 parents 8b0d3fd + fe898fe commit 3a63dae
Show file tree
Hide file tree
Showing 5 changed files with 96 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.5)
project(eosio_contracts VERSION 1.5.0)
project(eosio_contracts VERSION 1.5.1)

set(EOSIO_CDT_VERSION_MIN "1.4")
set(EOSIO_CDT_VERSION_SOFT_MAX "1.4")
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# eosio.contracts

## Version : 1.5.0
## Version : 1.5.1

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 system, token, msig and wrap (formerly known as sudo) contracts.

Expand All @@ -14,8 +14,8 @@ The following unprivileged contract(s) are also part of the system.
* [eosio.token](https://github.com/eosio/eosio.contracts/tree/master/eosio.token)

Dependencies:
* [eosio v1.4.x](https://github.com/EOSIO/eos/releases/tag/v1.4.3)
* [eosio.cdt v1.4.x](https://github.com/EOSIO/eosio.cdt/releases/tag/v1.4.0)
* [eosio v1.4.x](https://github.com/EOSIO/eos/releases/tag/v1.4.4)
* [eosio.cdt v1.4.x](https://github.com/EOSIO/eosio.cdt/releases/tag/v1.4.1)

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.
Expand Down
2 changes: 1 addition & 1 deletion UnitTestsExternalProject.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ string(REPLACE ";" "|" TEST_MODULE_PATH "${CMAKE_MODULE_PATH}")
ExternalProject_Add(
contracts_unit_tests
LIST_SEPARATOR | # Use the alternate list separator
CMAKE_ARGS -DCMAKE_BUILD_TYPE=${TEST_BUILD_TYPE} -DCMAKE_FRAMEWORK_PATH=${TEST_FRAMEWORK_PATH} -DCMAKE_MODULE_PATH=${TEST_MODULE_PATH} -DEOSIO_ROOT=${EOSIO_ROOT}
CMAKE_ARGS -DCMAKE_BUILD_TYPE=${TEST_BUILD_TYPE} -DCMAKE_FRAMEWORK_PATH=${TEST_FRAMEWORK_PATH} -DCMAKE_MODULE_PATH=${TEST_MODULE_PATH} -DEOSIO_ROOT=${EOSIO_ROOT} -DLLVM_DIR=${LLVM_DIR}
SOURCE_DIR ${CMAKE_SOURCE_DIR}/tests
BINARY_DIR ${CMAKE_BINARY_DIR}/tests
BUILD_ALWAYS 1
Expand Down
90 changes: 90 additions & 0 deletions eosio.bios/include/eosio.bios/eosio.bios.hpp
Original file line number Diff line number Diff line change
@@ -1,13 +1,103 @@
#pragma once
#include <eosiolib/action.hpp>
#include <eosiolib/crypto.h>
#include <eosiolib/eosio.hpp>
#include <eosiolib/privileged.hpp>
#include <eosiolib/producer_schedule.hpp>

namespace eosio {
using eosio::permission_level;
using eosio::public_key;
using eosio::ignore;

struct permission_level_weight {
permission_level permission;
uint16_t weight;

// explicit serialization macro is not necessary, used here only to improve compilation time
EOSLIB_SERIALIZE( permission_level_weight, (permission)(weight) )
};

struct key_weight {
eosio::public_key key;
uint16_t weight;

// explicit serialization macro is not necessary, used here only to improve compilation time
EOSLIB_SERIALIZE( key_weight, (key)(weight) )
};

struct wait_weight {
uint32_t wait_sec;
uint16_t weight;

// explicit serialization macro is not necessary, used here only to improve compilation time
EOSLIB_SERIALIZE( wait_weight, (wait_sec)(weight) )
};

struct authority {
uint32_t threshold = 0;
std::vector<key_weight> keys;
std::vector<permission_level_weight> accounts;
std::vector<wait_weight> waits;

// explicit serialization macro is not necessary, used here only to improve compilation time
EOSLIB_SERIALIZE( authority, (threshold)(keys)(accounts)(waits) )
};

struct block_header {
uint32_t timestamp;
name producer;
uint16_t confirmed = 0;
capi_checksum256 previous;
capi_checksum256 transaction_mroot;
capi_checksum256 action_mroot;
uint32_t schedule_version = 0;
std::optional<eosio::producer_schedule> new_producers;

// explicit serialization macro is not necessary, used here only to improve compilation time
EOSLIB_SERIALIZE(block_header, (timestamp)(producer)(confirmed)(previous)(transaction_mroot)(action_mroot)
(schedule_version)(new_producers))
};

class [[eosio::contract("eosio.bios")]] bios : public contract {
public:
using contract::contract;
[[eosio::action]]
void newaccount( name creator,
name name,
ignore<authority> owner,
ignore<authority> active){}


[[eosio::action]]
void updateauth( ignore<name> account,
ignore<name> permission,
ignore<name> parent,
ignore<authority> auth ) {}

[[eosio::action]]
void deleteauth( ignore<name> account,
ignore<name> permission ) {}

[[eosio::action]]
void linkauth( ignore<name> account,
ignore<name> code,
ignore<name> type,
ignore<name> requirement ) {}

[[eosio::action]]
void unlinkauth( ignore<name> account,
ignore<name> code,
ignore<name> type ) {}

[[eosio::action]]
void canceldelay( ignore<permission_level> canceling_auth, ignore<capi_checksum256> trx_id ) {}

[[eosio::action]]
void onerror( ignore<uint128_t> sender_id, ignore<std::vector<char>> sent_trx ) {}

[[eosio::action]]
void setcode( name account, uint8_t vmtype, uint8_t vmversion, const std::vector<char>& code ) {}

[[eosio::action]]
void setpriv( name account, uint8_t is_priv ) {
Expand Down
2 changes: 1 addition & 1 deletion eosio.system/include/eosio.system/native.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ namespace eosiosystem {
*/
[[eosio::action]]
void newaccount( name creator,
name newact,
name name,

This comment has been minimized.

Copy link
@Trevor-Ultra

Trevor-Ultra Dec 7, 2018

This needs to be reverted back to newact the contract will not compile because of this.

ignore<authority> owner,
ignore<authority> active);

Expand Down

0 comments on commit 3a63dae

Please sign in to comment.