diff --git a/.travis.yml b/.travis.yml
index 23952ef80062a4490e7984f44bd09000fbecccb6..501bece870d162afff5302e9a6d807cd43f1bab8 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -27,7 +27,7 @@ before_install:
- |
mkdir ext && cd ext
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
- brew install boost openssl llvm@4 gmp gettext ninja mongodb mongo-c-driver
+ brew install boost openssl llvm@4 gmp gettext ninja mongodb mongo-c-driver python3
brew link gettext --force
brew services start mongodb
WASM_BRANCH=macos
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 17f2fa0976beecec847292506564d86b6819ceee..bcb1c62bd4e29173cf53d7b7afd3b05f638a3b0a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -34,7 +34,6 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
endif()
-
set(CMAKE_EXPORT_COMPILE_COMMANDS "ON")
set(BUILD_DOXYGEN FALSE CACHE BOOL "Build doxygen documentation on every make")
set(BUILD_MONGO_DB_PLUGIN FALSE CACHE BOOL "Build mongo database plugin")
diff --git a/CMakeModules/wasm.cmake b/CMakeModules/wasm.cmake
index 97e782f7c078f616199528ac31dc6e87d935d260..b762a54faffde8865810fba987d4c92a8a36fb35 100644
--- a/CMakeModules/wasm.cmake
+++ b/CMakeModules/wasm.cmake
@@ -59,7 +59,8 @@ if( NOT ("${WASM_CLANG}" STREQUAL "" OR "${WASM_LLC}" STREQUAL "" OR "${WASM_LLV
endif()
macro(compile_wast)
- cmake_parse_arguments(ARG "" "TARGET" "SOURCE_FILES;INCLUDE_FOLDERS" ${ARGN})
+ #read arguments include ones that we don't since arguments get forwared "as is" and we don't want to threat unknown argument names as values
+ cmake_parse_arguments(ARG "NOWARNINGS" "TARGET;DESTINATION_FOLDER" "SOURCE_FILES;INCLUDE_FOLDERS;SYSTEM_INCLUDE_FOLDERS;LIBRARIES" ${ARGN})
set(target ${ARG_TARGET})
# NOTE: Setting SOURCE_FILE and looping over it to avoid cmake issue with compilation ${target}.bc's rule colliding with
@@ -106,10 +107,28 @@ macro(compile_wast)
-nostdlib -nostdlibinc -fno-threadsafe-statics -fno-rtti -fno-exceptions
-c ${infile} -o ${outfile}.bc
)
+ if (${ARG_NOWARNINGS})
+ list(APPEND WASM_COMMAND -Wno-everything)
+ else()
+ list(APPEND WASM_COMMAND -Weverything -Wno-c++98-compat -Wno-old-style-cast -Wno-vla -Wno-vla-extension -Wno-c++98-compat-pedantic
+ -Wno-missing-prototypes -Wno-missing-variable-declarations -Wno-packed -Wno-padded -Wno-c99-extensions)
+ endif()
+
foreach(folder ${ARG_INCLUDE_FOLDERS})
list(APPEND WASM_COMMAND -I ${folder})
endforeach()
-
+
+ if ("${ARG_SYSTEM_INCLUDE_FOLDERS}" STREQUAL "")
+ set (ARG_SYSTEM_INCLUDE_FOLDERS ${DEFAULT_SYSTEM_INCLUDE_FOLDERS})
+ endif()
+ foreach(folder ${ARG_SYSTEM_INCLUDE_FOLDERS})
+ list(APPEND WASM_COMMAND -isystem ${folder})
+ endforeach()
+
+ foreach(folder ${ARG_SYSTEM_INCLUDE_FOLDERS})
+ list(APPEND WASM_COMMAND -isystem ${folder})
+ endforeach()
+
add_custom_command(OUTPUT ${outfile}.bc
DEPENDS ${infile}
COMMAND ${WASM_COMMAND}
@@ -128,9 +147,9 @@ macro(compile_wast)
endmacro(compile_wast)
macro(add_wast_library)
- cmake_parse_arguments(ARG "" "TARGET;DESTINATION_FOLDER" "SOURCE_FILES;INCLUDE_FOLDERS" ${ARGN})
+ cmake_parse_arguments(ARG "NOWARNINGS" "TARGET;DESTINATION_FOLDER" "SOURCE_FILES;INCLUDE_FOLDERS;SYSTEM_INCLUDE_FOLDERS" ${ARGN})
set(target ${ARG_TARGET})
- compile_wast(TARGET ${ARG_TARGET} SOURCE_FILES ${ARG_SOURCE_FILES} INCLUDE_FOLDERS ${ARG_INCLUDE_FOLDERS})
+ compile_wast(${ARGV})
get_filename_component("${ARG_TARGET}_BC_FILENAME" "${ARG_DESTINATION_FOLDER}/${ARG_TARGET}.bc" ABSOLUTE CACHE)
add_custom_target(${target} ALL DEPENDS ${${ARG_TARGET}_BC_FILENAME})
@@ -146,11 +165,11 @@ macro(add_wast_library)
endmacro(add_wast_library)
macro(add_wast_executable)
- cmake_parse_arguments(ARG "" "TARGET;DESTINATION_FOLDER" "SOURCE_FILES;INCLUDE_FOLDERS;LIBRARIES" ${ARGN})
+ cmake_parse_arguments(ARG "NOWARNINGS" "TARGET;DESTINATION_FOLDER" "SOURCE_FILES;INCLUDE_FOLDERS;SYSTEM_INCLUDE_FOLDERS;LIBRARIES" ${ARGN})
set(target ${ARG_TARGET})
set(DESTINATION_FOLDER ${ARG_DESTINATION_FOLDER})
- compile_wast(TARGET ${ARG_TARGET} SOURCE_FILES ${ARG_SOURCE_FILES} INCLUDE_FOLDERS ${ARG_INCLUDE_FOLDERS})
+ compile_wast(${ARGV})
foreach(lib ${ARG_LIBRARIES})
list(APPEND LIBRARIES ${${lib}_BC_FILENAME})
diff --git a/Jenkinsfile b/Jenkinsfile
new file mode 100644
index 0000000000000000000000000000000000000000..9b4b0a184c47c5cd13d20555c6c369e8075b3c62
--- /dev/null
+++ b/Jenkinsfile
@@ -0,0 +1,71 @@
+pipeline {
+ agent any
+ stages {
+ stage('Build') {
+ parallel {
+ stage('Ubuntu') {
+ steps {
+ sh '''
+ . $HOME/.bash_profile
+ ./eosio_build.sh
+ '''
+ }
+ }
+ stage('MacOS') {
+ steps {
+ sh '''
+ . $HOME/.bash_profile
+ echo "Darwin build coming soon..."
+ '''
+ }
+ }
+ stage('Fedora') {
+ steps {
+ sh '''
+ . $HOME/.bash_profile
+ echo "Fedora build coming soon..."
+ '''
+ }
+ }
+ }
+ }
+ stage('Tests') {
+ parallel {
+ stage('Ubuntu') {
+ steps {
+ sh '''
+ . $HOME/.bash_profile
+ export EOSLIB=$(pwd)/contracts
+ cd build
+ printf "Waiting for testing to be available..."
+ while /usr/bin/pgrep -x ctest > /dev/null; do sleep 1; done
+ echo "OK!"
+ ctest --output-on-failure
+ '''
+ }
+ }
+ stage('MacOS') {
+ steps {
+ sh '''
+ . $HOME/.bash_profile
+ echo "Darwin tests coming soon..."
+ '''
+ }
+ }
+ stage('Fedora') {
+ steps {
+ sh '''
+ . $HOME/.bash_profile
+ echo "Fedora tests coming soon..."
+ '''
+ }
+ }
+ }
+ }
+ }
+ post {
+ always {
+ cleanWs()
+ }
+ }
+}
\ No newline at end of file
diff --git a/README.md b/README.md
index 857d3fdba11b09b4e4cc5bbb96b668113f5fd164..a77e37ce653c02f06775b4c09bfa7f0c39ee388a 100644
--- a/README.md
+++ b/README.md
@@ -14,9 +14,10 @@ The public testnet described in the [wiki](https://github.com/EOSIO/eos/wiki/Tes
### Supported Operating Systems
EOS.IO currently supports the following operating systems:
-1. Ubuntu 16.04 and higher (Ubuntu 16.10 recommended).
-2. MacOS Darwin 10.12 and higher (MacOS 10.13.x recommended).
-3. Fedora 25 and higher (Fedora 27 recommended).
+1. Amazon 2017.09 and higher.
+2. Fedora 25 and higher (Fedora 27 recommended).
+3. Ubuntu 16.04 and higher (Ubuntu 16.10 recommended).
+4. MacOS Darwin 10.12 and higher (MacOS 10.13.x recommended).
# Resources
1. [EOS.IO Website](https://eos.io)
@@ -33,8 +34,8 @@ EOS.IO currently supports the following operating systems:
1. [Getting Started](#gettingstarted)
2. [Setting up a build/development environment](#setup)
1. [Automated build script](#autobuild)
- 1. [Clean install Linux (Ubuntu & Fedora) for a local testnet](#autoubuntulocal)
- 2. [Clean install Linux (Ubuntu & Fedora) for the public testnet](#autoubuntupublic)
+ 1. [Clean install Linux (Amazon, Fedora, & Ubuntu) for a local testnet](#autoubuntulocal)
+ 2. [Clean install Linux (Amazon, Fedora, & Ubuntu) for the public testnet](#autoubuntupublic)
3. [MacOS for a local testnet](#automaclocal)
4. [MacOS for the public testnet](#automacpublic)
3. [Building EOS and running a node](#runanode)
@@ -54,9 +55,10 @@ EOS.IO currently supports the following operating systems:
7. [Doxygen documentation](#doxygen)
8. [Running EOS in Docker](#docker)
9. [Manual installation of the dependencies](#manualdep)
- 1. [Clean install Ubuntu 16.04 and higher](#ubuntu)
- 2. [MacOS Sierra 10.12 and higher](#macos)
- 3. [Fedora 25 and higher](#fedora)
+ 1. [Clean install Amazon 2017.09 and higher](#manualdepamazon)
+ 2. [Clean install Fedora 25 and higher](#manualdepfedora)
+ 3. [Clean install Ubuntu 16.04 and higher](#manualdepubuntu)
+ 4. [Clean install MacOS Sierra 10.12 and higher](#manualdepmacos)
## Getting Started
@@ -69,12 +71,13 @@ The following instructions detail the process of getting the software, building
### Automated build script
Supported Operating Systems:
-1. Ubuntu 16.04 and higher.
-2. MacOS Darwin 10.12 and higher.
-3. Fedora 25 and higher.
+1. Amazon 2017.09 and higher.
+2. Fedora 25 and higher (Fedora 27 recommended).
+3. Ubuntu 16.04 and higher (Ubuntu 16.10 recommended).
+4. MacOS Darwin 10.12 and higher (MacOS 10.13.x recommended).
-For Ubuntu, MacOS and Fedora there is an automated build script that can install all dependencies and builds EOS.
-We are working on supporting Centos, Amazon Linux & Red Hat in future releases.
+For Amazon, Fedora, Ubuntu & MacOS there is an automated build script that can install all dependencies and builds EOS.
+We are working on supporting other Linux/Unix distributions in future releases.
It is called eosio_build.sh
@@ -89,7 +92,7 @@ Choose whether you will be building for a local testnet or for the public testne
We strongly recommend following the instructions for building the public testnet version for [Ubuntu](#autoubuntupublic) or [Mac OS X](#automacpublic). `master` is in pieces on the garage floor while we rebuild this hotrod. This notice will be removed when `master` is usable again. Your patience is appreciated.
-#### :no_entry: Clean install Linux (Ubuntu & Fedora) for a local testnet :no_entry:
+#### :no_entry: Clean install Linux (Amazon, Fedora & Ubuntu) for a local testnet :no_entry:
```bash
git clone https://github.com/eosio/eos --recursive
@@ -107,7 +110,7 @@ sudo make install
Now you can proceed to the next step - [Creating and launching a single-node testnet](#singlenode)
-#### Clean install Linux (Ubuntu & Fedora) for the public testnet
+#### Clean install Linux (Amazon, Fedora & Ubuntu) for the public testnet
```bash
git clone https://github.com/eosio/eos --recursive
@@ -567,33 +570,31 @@ Dependencies:
* [secp256k1-zkp (Cryptonomex branch)](https://github.com/cryptonomex/secp256k1-zkp.git)
* [binaryen](https://github.com/WebAssembly/binaryen.git)
-
-### Clean install Ubuntu 16.10
+
+### Clean install Amazon 2017.09 and higher
Install the development toolkit:
```bash
-sudo apt-get update
-wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
-sudo apt-get install clang-4.0 lldb-4.0 libclang-4.0-dev cmake make \
- libbz2-dev libssl-dev libgmp3-dev \
- autotools-dev build-essential \
- libbz2-dev libicu-dev python-dev \
- autoconf libtool git
+sudo yum update
+sudo yum install git gcc72.x86_64 gcc72-c++.x86_64 autoconf automake libtool make bzip2 \
+ bzip2-devel.x86_64 openssl-devel.x86_64 gmp.x86_64 gmp-devel.x86_64 \
+ libstdc++72.x86_64 python27-devel.x86_64 libedit-devel.x86_64 \
+ ncurses-devel.x86_64 swig.x86_64 gettext-devel.x86_64
+
```
Install Boost 1.66:
```bash
cd ~
-wget -c 'https://sourceforge.net/projects/boost/files/boost/1.64.0/boost_1_66_0.tar.bz2/download' -O boost_1.64.0.tar.bz2
-tar xjf boost_1.66.0.tar.bz2
-cd boost_1_66_0/
+curl -L https://dl.bintray.com/boostorg/release/1.66.0/source/boost_1_66_0.tar.bz2 > boost_1.66.0.tar.bz2
+tar xf boost_1.66.0.tar.bz2
echo "export BOOST_ROOT=$HOME/boost_1_66_0" >> ~/.bash_profile
source ~/.bash_profile
+cd boost_1_66_0/
./bootstrap.sh "--prefix=$BOOST_ROOT"
./b2 install
-source ~/.bash_profile
```
Install [secp256k1-zkp (Cryptonomex branch)](https://github.com/cryptonomex/secp256k1-zkp.git):
@@ -604,7 +605,7 @@ git clone https://github.com/cryptonomex/secp256k1-zkp.git
cd secp256k1-zkp
./autogen.sh
./configure
-make
+make -j$( nproc )
sudo make install
```
@@ -638,8 +639,10 @@ cd ..
mkdir build
cd build
cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=.. -DLLVM_TARGETS_TO_BUILD= -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=WebAssembly -DCMAKE_BUILD_TYPE=Release ../
-make -j4 install
+make -j$( nproc )
+make install
```
+
Add `WASM_LLVM_CONFIG` and `LLVM_DIR` to your `.bash_profile`:
```bash
@@ -647,35 +650,33 @@ echo "export WASM_LLVM_CONFIG=~/wasm-compiler/llvm/bin/llvm-config" >> ~/.bash_p
echo "export LLVM_DIR=~/wasm-compiler/lib/cmake/llvm" >> ~/.bash_profile
source ~/.bash_profile
```
-
Your environment is set up. Now you can build EOS and run a node.
-
-### MacOS Sierra 10.12.6
-
-macOS additional Dependencies:
-
-* Brew
-* Newest XCode
+
+### Clean install Fedora 25 and higher
-Upgrade your XCode to the newest version:
+Install the development toolkit:
```bash
-xcode-select --install
-```
-
-Install homebrew:
+sudo yum update
+sudo yum install git gcc.x86_64 gcc-c++.x86_64 autoconf automake libtool make cmake.x86_64 \
+ bzip2 bzip2-devel.x86_64 openssl-devel.x86_64 gmp-devel.x86_64 \
+ libstdc++-devel.x86_64 python3-devel.x86_64 libedit.x86_64 \
+ ncurses-devel.x86_64 swig.x86_64 gettext-devel.x86_64
-```bash
-ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
```
-Install the dependencies:
+Install Boost 1.66:
```bash
-brew update
-brew install git automake libtool boost openssl llvm@4 gmp ninja gettext
-brew link gettext --force
+cd ~
+curl -L https://dl.bintray.com/boostorg/release/1.66.0/source/boost_1_66_0.tar.bz2 > boost_1.66.0.tar.bz2
+tar xf boost_1.66.0.tar.bz2
+echo "export BOOST_ROOT=$HOME/boost_1_66_0" >> ~/.bash_profile
+source ~/.bash_profile
+cd boost_1_66_0/
+./bootstrap.sh "--prefix=$BOOST_ROOT"
+./b2 install
```
Install [secp256k1-zkp (Cryptonomex branch)](https://github.com/cryptonomex/secp256k1-zkp.git):
@@ -686,11 +687,11 @@ git clone https://github.com/cryptonomex/secp256k1-zkp.git
cd secp256k1-zkp
./autogen.sh
./configure
-make
+make -j$( nproc )
sudo make install
```
-Install [binaryen v1.37.14](https://github.com/WebAssembly/binaryen.git):
+To use the WASM compiler, EOS has an external dependency on [binaryen](https://github.com/WebAssembly/binaryen.git):
```bash
cd ~
@@ -698,6 +699,7 @@ git clone https://github.com/WebAssembly/binaryen.git
cd ~/binaryen
git checkout tags/1.37.14
cmake . && make
+
```
Add `BINARYEN_ROOT` to your .bash_profile:
@@ -707,7 +709,7 @@ echo "export BINARYEN_ROOT=~/binaryen" >> ~/.bash_profile
source ~/.bash_profile
```
-Build LLVM and clang for WASM:
+By default LLVM and clang do not include the WASM build target, so you will have to build it yourself:
```bash
mkdir ~/wasm-compiler
@@ -726,35 +728,38 @@ Add `WASM_LLVM_CONFIG` and `LLVM_DIR` to your `.bash_profile`:
```bash
echo "export WASM_LLVM_CONFIG=~/wasm-compiler/llvm/bin/llvm-config" >> ~/.bash_profile
-echo "export LLVM_DIR=/usr/local/Cellar/llvm@4/4.0.1/lib/cmake/llvm/" >> ~/.bash_profile
+echo "export LLVM_DIR=~/wasm-compiler/lib/cmake/llvm" >> ~/.bash_profile
source ~/.bash_profile
```
+Your environment is set up. Now you can build EOS and run a node.
-
-### Clean install Fedora 25 and higher
+
+### Clean install Ubuntu 16.04 & Higher
Install the development toolkit:
```bash
-sudo yum update
-sudo yum install git gcc.x86_64 gcc-c++.x86_64 autoconf automake libtool make cmake.x86_64 \
- bzip2 bzip2-devel.x86_64 openssl-devel.x86_64 gmp-devel.x86_64 \
- libstdc++-devel.x86_64 python3-devel.x86_64 libedit.x86_64 \
- ncurses-devel.x86_64 swig.x86_64 gettext-devel.x86_64
-
+sudo apt-get update
+wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
+sudo apt-get install clang-4.0 lldb-4.0 libclang-4.0-dev cmake make \
+ libbz2-dev libssl-dev libgmp3-dev \
+ autotools-dev build-essential \
+ libbz2-dev libicu-dev python-dev \
+ autoconf libtool git
```
Install Boost 1.66:
```bash
cd ~
-curl -L https://dl.bintray.com/boostorg/release/1.66.0/source/boost_1_66_0.tar.bz2 > boost_1.66.0.tar.bz2
-tar xf boost_1.66.0.tar.bz2
+wget -c 'https://sourceforge.net/projects/boost/files/boost/1.66.0/boost_1_66_0.tar.bz2/download' -O boost_1.66.0.tar.bz2
+tar xjf boost_1.66.0.tar.bz2
+cd boost_1_66_0/
echo "export BOOST_ROOT=$HOME/boost_1_66_0" >> ~/.bash_profile
source ~/.bash_profile
-cd boost_1_66_0/
./bootstrap.sh "--prefix=$BOOST_ROOT"
./b2 install
+source ~/.bash_profile
```
Install [secp256k1-zkp (Cryptonomex branch)](https://github.com/cryptonomex/secp256k1-zkp.git):
@@ -799,14 +804,96 @@ cd ..
mkdir build
cd build
cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=.. -DLLVM_TARGETS_TO_BUILD= -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=WebAssembly -DCMAKE_BUILD_TYPE=Release ../
-make -j$( nproc ) install
+make -j4 install
+```
+Add `WASM_LLVM_CONFIG` and `LLVM_DIR` to your `.bash_profile`:
+
+```bash
+echo "export WASM_LLVM_CONFIG=~/wasm-compiler/llvm/bin/llvm-config" >> ~/.bash_profile
+echo "export LLVM_DIR=/usr/local/Cellar/llvm/4.0.1/lib/cmake/llvm" >> ~/.bash_profile
+source ~/.bash_profile
+```
+
+Your environment is set up. Now you can build EOS and run a node.
+
+
+### MacOS Sierra 10.12.6 & higher
+
+macOS additional Dependencies:
+
+* Brew
+* Newest XCode
+
+Upgrade your XCode to the newest version:
+
+```bash
+xcode-select --install
+```
+
+Install homebrew:
+
+```bash
+ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
+```
+
+Install the dependencies:
+
+```bash
+brew update
+brew install git automake libtool boost openssl llvm@4 gmp ninja gettext
+brew link gettext --force
+```
+
+Install [secp256k1-zkp (Cryptonomex branch)](https://github.com/cryptonomex/secp256k1-zkp.git):
+
+```bash
+cd ~
+git clone https://github.com/cryptonomex/secp256k1-zkp.git
+cd secp256k1-zkp
+./autogen.sh
+./configure
+make -j$( sysctl -in machdep.cpu.core_count )
+sudo make install
+```
+
+Install [binaryen v1.37.14](https://github.com/WebAssembly/binaryen.git):
+
+```bash
+cd ~
+git clone https://github.com/WebAssembly/binaryen.git
+cd ~/binaryen
+git checkout tags/1.37.14
+cmake . && make -j$( sysctl -in machdep.cpu.core_count )
+```
+
+Add `BINARYEN_ROOT` to your .bash_profile:
+
+```bash
+echo "export BINARYEN_ROOT=~/binaryen" >> ~/.bash_profile
+source ~/.bash_profile
+```
+
+Build LLVM and clang for WASM:
+
+```bash
+mkdir ~/wasm-compiler
+cd ~/wasm-compiler
+git clone --depth 1 --single-branch --branch release_40 https://github.com/llvm-mirror/llvm.git
+cd llvm/tools
+git clone --depth 1 --single-branch --branch release_40 https://github.com/llvm-mirror/clang.git
+cd ..
+mkdir build
+cd build
+cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=.. -DLLVM_TARGETS_TO_BUILD= -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=WebAssembly -DCMAKE_BUILD_TYPE=Release ../
+make -j$( sysctl -in machdep.cpu.core_count )
+make install
```
Add `WASM_LLVM_CONFIG` and `LLVM_DIR` to your `.bash_profile`:
```bash
echo "export WASM_LLVM_CONFIG=~/wasm-compiler/llvm/bin/llvm-config" >> ~/.bash_profile
-echo "export LLVM_DIR=~/wasm-compiler/lib/cmake/llvm" >> ~/.bash_profile
+echo "export LLVM_DIR=/usr/local/Cellar/llvm@4/4.0.1/lib/cmake/llvm/" >> ~/.bash_profile
source ~/.bash_profile
```
Your environment is set up. Now you can build EOS and run a node.
diff --git a/contracts/CMakeLists.txt b/contracts/CMakeLists.txt
index 469ae00cc1970656481596c1e9d3f5d2fc85dcf0..06390f40ae292d6850ecdfca0f64ca6481519aef 100644
--- a/contracts/CMakeLists.txt
+++ b/contracts/CMakeLists.txt
@@ -1,4 +1,8 @@
-set(STANDARD_INCLUDE_FOLDERS ${CMAKE_SOURCE_DIR}/contracts ${CMAKE_SOURCE_DIR}/contracts/libc++/upstream/include ${CMAKE_SOURCE_DIR}/contracts/musl/upstream/include ${Boost_INCLUDE_DIR})
+# will be implictly used for any compilation unit if not overrided by SYSTEM_INCLUDE_FOLDERS parameter
+# these directories go as -isystem
to avoid warnings from code of third-party libraries
+set(DEFAULT_SYSTEM_INCLUDE_FOLDERS ${CMAKE_SOURCE_DIR}/contracts/libc++/upstream/include ${CMAKE_SOURCE_DIR}/contracts/musl/upstream/include ${Boost_INCLUDE_DIR})
+
+set(STANDARD_INCLUDE_FOLDERS ${CMAKE_SOURCE_DIR}/contracts)
add_subdirectory(eosiolib)
add_subdirectory(musl)
@@ -16,6 +20,8 @@ add_subdirectory(asserter)
add_subdirectory(infinite)
add_subdirectory(proxy)
add_subdirectory(test_api)
+add_subdirectory(test_api_mem)
+add_subdirectory(test_api_db)
#add_subdirectory(simpledb)
#add_subdirectory(storage)
#add_subdirectory(social)
diff --git a/contracts/eosio.system/eosio.system.abi b/contracts/eosio.system/eosio.system.abi
index 8ae709721b81b7117288bfded329239b6c1e80a4..41278cf63429b5d38fe7d97831ceeda929e5bc2a 100644
--- a/contracts/eosio.system/eosio.system.abi
+++ b/contracts/eosio.system/eosio.system.abi
@@ -29,7 +29,22 @@
"fields": [
{"name":"value", "type":"string"}
]
+ },{
+ "name": "regproducer",
+ "base": "",
+ "fields": [
+ {"name":"producer", "type":"account_name"}
+ {"name":"producer_key", "type":"bytes"}
+ ]
+ },{
+ "name": "stakevote",
+ "base": "",
+ "fields": [
+ {"name":"voter", "type":"account_name"}
+ {"name":"amount", "type":"asset"}
+ ]
}
+
],
"actions": [{
"name": "transfer",
@@ -40,6 +55,12 @@
},{
"name": "nonce",
"type": "nonce"
+ },{
+ "name": "regproducer",
+ "type": "regproducer"
+ },{
+ "name": "stakevote",
+ "type": "stakevote"
}
],
"tables": [{
@@ -50,4 +71,4 @@
"key_types" : ["name"]
}
]
-}
\ No newline at end of file
+}
diff --git a/contracts/eosio.system/eosio.system.cpp b/contracts/eosio.system/eosio.system.cpp
index ee50cc7ea602da6b277487e0600910de94a8b64d..7d905ff0ecafd5da765fec97713c24f784b801f5 100644
--- a/contracts/eosio.system/eosio.system.cpp
+++ b/contracts/eosio.system/eosio.system.cpp
@@ -11,6 +11,7 @@ extern "C" {
/// The apply method implements the dispatch of events to this contract
void apply( uint64_t code, uint64_t act ) {
+ print( eosio::name(code), "::", eosio::name(act) );
eosiosystem::contract::apply( code, act );
}
}
diff --git a/contracts/eosio.system/eosio.system.hpp b/contracts/eosio.system/eosio.system.hpp
index 655a4c7ff86b9aad42ce966fe2c6e0777eec6d4f..9080da09453410b3dc9548c24520fe3fa4e039c1 100644
--- a/contracts/eosio.system/eosio.system.hpp
+++ b/contracts/eosio.system/eosio.system.hpp
@@ -14,13 +14,60 @@
#include
#include
+#include
+#include