-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request EOSIO#248 from EOSIO/develop
Version 1.4.0
- Loading branch information
Showing
712 changed files
with
73,607 additions
and
380 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
include(ExternalProject) | ||
find_package(Git REQUIRED) | ||
include(GNUInstallDirs) | ||
|
||
set(LLVM_BINDIR ${CMAKE_BINARY_DIR}/EosioClang-prefix/src/EosioClang-build) | ||
ExternalProject_Add( | ||
EosioTools | ||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} -DCMAKE_BUILD_TYPE=Release -DVERSION_MAJOR=${VERSION_MAJOR} -DVERSION_MINOR=${VERSION_MINOR} -DVERSION_PATCH=${VERSION_PATCH} -DLLVM_SRCDIR=${CMAKE_SOURCE_DIR}/eosio_llvm -DLLVM_BINDIR=${LLVM_BINDIR} -DLLVM_DIR=${LLVM_BINDIR}/lib/cmake/llvm -DCMAKE_INSTALL_BINDIR=${CMAKE_INSTALL_BINDIR} | ||
|
||
SOURCE_DIR "${CMAKE_SOURCE_DIR}/tools" | ||
UPDATE_COMMAND "" | ||
PATCH_COMMAND "" | ||
TEST_COMMAND "" | ||
INSTALL_COMMAND "" | ||
BUILD_ALWAYS 1 | ||
DEPENDS EosioClang | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM ubuntu:18.04 | ||
|
||
# Arguments that may be overridden by the user | ||
ARG release=latest | ||
|
||
# Install required packages | ||
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install openssl ca-certificates curl wget && rm -rf /var/lib/apt/lists/* | ||
|
||
# Install CDT from deb package | ||
ADD install_deb.sh / | ||
RUN /install_deb.sh $release && rm -f install_deb.sh | ||
|
||
USER root |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
|
||
if [ "$1" = "" ]; then | ||
echo "In order to continue, you must specify either latest or the release version." | ||
exit 1 | ||
elif [ "$1" = "latest" ]; then | ||
deb=$(/usr/bin/curl -s https://api.github.com/repos/EOSIO/eosio.cdt/releases/latest | grep "browser_download_url.*deb" | cut -d '"' -f 4) | ||
filename=$(/usr/bin/curl -s https://api.github.com/repos/EOSIO/eosio.cdt/releases/latest | grep "name.*deb" | cut -d '"' -f 4) | ||
else | ||
deb=$(/usr/bin/curl -s https://api.github.com/repos/EOSIO/eosio.cdt/releases/tags/$1 | grep "browser_download_url.*deb" | cut -d '"' -f 4) | ||
filename=$(/usr/bin/curl -s https://api.github.com/repos/EOSIO/eosio.cdt/releases/tags/$1 | grep "name.*deb" | cut -d '"' -f 4) | ||
fi | ||
|
||
if [ "$deb" = "" ]; then | ||
echo "Either $1 is not a valid release, or there is not a published .deb package for the release." | ||
exit 1 | ||
fi | ||
|
||
/usr/bin/wget $deb && /usr/bin/dpkg -i "$filename" && rm -f "$filename" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<h1 class="clause">Warranty</h1> | ||
The invoker of the contract action shall uphold its Obligations under this Contract in a timely and workmanlike manner, using knowledge and recommendations for performing the services which meet generally acceptable standards set forth by EOS.IO Blockchain Block Producers. | ||
|
||
<h1 class="clause">Default</h1> | ||
The occurrence of any of the following shall constitute a material default under this Contract: | ||
|
||
<h1 class="clause">Remedies</h1> | ||
In addition to any and all other rights a party may have available according to law, if a party defaults by failing to substantially perform any provision, term or condition of this Contract, the other party may terminate the Contract by providing written notice to the defaulting party. This notice shall describe with sufficient detail the nature of the default. The party receiving such notice shall promptly be removed from being a Block Producer and this Contract shall be automatically terminated. | ||
|
||
<h1 class="clause">ForceMajeure</h1> | ||
If performance of this Contract or any obligation under this Contract is prevented, restricted, or interfered with by causes beyond either party's reasonable control ("Force Majeure"), and if the party unable to carry out its obligations gives the other party prompt written notice of such event, then the obligations of the party invoking this provision shall be suspended to the extent necessary by such event. The term Force Majeure shall include, without limitation, acts of God, fire, explosion, vandalism, storm or other similar occurrence, orders or acts of military or civil authority, or by national emergencies, insurrections, riots, or wars, or strikes, lock-outs, work stoppages, or supplier failures. The excused party shall use reasonable efforts under the circumstances to avoid or remove such causes of non-performance and shall proceed to perform with reasonable dispatch whenever such causes are removed or ceased. An act or omission shall be deemed within the reasonable control of a party if committed, omitted, or caused by such party, or its employees, officers, agents, or affiliates. | ||
|
||
<h1 class="clause">DisputeResolution</h1> | ||
Any controversies or disputes arising out of or relating to this Contract will be resolved by binding arbitration under the default rules set forth by the EOS.IO Blockchain. The arbitrator's award will be final, and judgment may be entered upon it by any court having proper jurisdiction. | ||
|
||
<h1 class="clause">Agreement</h1> | ||
This Contract contains the entire agreement of the parties, and there are no other promises or conditions in any other agreement whether oral or written concerning the subject matter of this Contract. This Contract supersedes any prior written or oral agreements between the parties. | ||
|
||
<h1 class="clause">Severability</h1> | ||
If any provision of this Contract will be held to be invalid or unenforceable for any reason, the remaining provisions will continue to be valid and enforceable. If a court finds that any provision of this Contract is invalid or unenforceable, but that by limiting such provision it would become valid and enforceable, then such provision will be deemed to be written, construed, and enforced as so limited. | ||
|
||
<h1 class="clause">Amendment</h1> | ||
This Contract may be modified or amended in writing by mutual agreement between the parties, if the writing is signed by the party obligated under the amendment. | ||
|
||
<h1 class="clause">GoverningLaw</h1> | ||
This Contract shall be construed in accordance with the Maxims of Equity. | ||
|
||
<h1 class="clause">Notice</h1> | ||
Any notice or communication required or permitted under this Contract shall be sufficiently given if delivered to a verifiable email address or to such other email address as one party may have publicly furnished in writing, or published on a broadcast contract provided by this blockchain for purposes of providing notices of this type. | ||
<h1 class="clause">WaiverOfContractualRight</h1> | ||
The failure of either party to enforce any provision of this Contract shall not be construed as a waiver or limitation of that party's right to subsequently enforce and compel strict compliance with every provision of this Contract. | ||
|
||
<h1 class="clause">ArbitratorsFeesToPrevailingParty</h1> | ||
In any action arising hereunder or any separate action pertaining to the validity of this Agreement, both sides shall pay half the initial cost of arbitration, and the prevailing party shall be awarded reasonable arbitrator's fees and costs. | ||
|
||
<h1 class="clause">ConstructionAndInterpretation</h1> | ||
The rule requiring construction or interpretation against the drafter is waived. The document shall be deemed as if it were drafted by both parties in a mutual effort. | ||
|
||
<h1 class="clause">InWitnessWhereof</h1> | ||
In witness whereof, the parties hereto have caused this Agreement to be executed by themselves or their duly authorized representatives as of the date of execution, and authorized as proven by the cryptographic signature on the transaction that invokes this contract. |
7 changes: 3 additions & 4 deletions
7
examples/hello/hello.hi_rc.md → examples/hello/hello.contracts.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
# CONTRACT FOR hello::hi | ||
|
||
## ACTION NAME: hi | ||
|
||
<h1 class="contract"> | ||
hi | ||
</h1> | ||
### Parameters | ||
Input parameters: | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,8 @@ | ||
#include <eosiolib/eosio.hpp> | ||
|
||
#include "hello.hpp" | ||
using namespace eosio; | ||
|
||
CONTRACT hello : public eosio::contract { | ||
public: | ||
using contract::contract; | ||
|
||
ACTION hi( name user ) { | ||
print( "Hello, ", name{user} ); | ||
} | ||
}; | ||
ACTION hello::hi( name user ) { | ||
print_f( "Hello % from hello", user ); | ||
} | ||
|
||
EOSIO_DISPATCH( hello, (hi) ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#include <eosiolib/eosio.hpp> | ||
|
||
using namespace eosio; | ||
|
||
CONTRACT hello : public eosio::contract { | ||
public: | ||
using contract::contract; | ||
|
||
ACTION hi( name user ); | ||
|
||
// accessor for external contracts to easily send inline actions to your contract | ||
using hi_action = action_wrapper<"hi"_n, &hello::hi>; | ||
}; |
Oops, something went wrong.