Skip to content

Commit

Permalink
Merge pull request #55 from boscore/release/2.0.x
Browse files Browse the repository at this point in the history
Release/2.0.x
  • Loading branch information
vlbos authored Feb 28, 2019
2 parents 9d6452e + 4c5432c commit ed04c79
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 17 deletions.
3 changes: 2 additions & 1 deletion bos.pegtoken/src/bos.pegtoken.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
eosio_assert( ( str ).size() <= len, "param " #str " too long, maximum length is " #len );

#define ACCOUNT_CHECK( account ) \

eosio_assert( is_account( account ), "invalid account " #account );

#define NIL_ACCOUNT "nil"_n
Expand Down Expand Up @@ -392,6 +391,7 @@ void pegtoken::assignaddr( symbol_code sym_code, name to, string address )
auto iter1 = addr.find( hash64( address ) );
eosio_assert( iter1 == addr.end(), ( "this address " + address + " has been assigned to " + iter1->owner.to_string() ).c_str() );


auto iter2 = addresses.find( to.value );
if ( iter2 == addresses.end() ) {
addresses.emplace( get_self(), [&]( auto& p ) {
Expand Down Expand Up @@ -428,6 +428,7 @@ void pegtoken::withdraw( name from, string to, asset quantity, string memo )
eosio_assert( appl.find( account.value ) == appl.end(), "from can't be applicant " );
}


eosio_assert( iter->active, "underwriter is not active" );

eosio_assert( quantity.is_valid(), "invalid quantity" );
Expand Down
24 changes: 8 additions & 16 deletions redpacket/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
include(ExternalProject)
# if no cdt root is given use default path
if(EOSIO_CDT_ROOT STREQUAL "" OR NOT EOSIO_CDT_ROOT)
find_package(eosio.cdt)
endif()
add_contract(redpacket redpacket ${CMAKE_CURRENT_SOURCE_DIR}/src/redpacket.cpp)
target_include_directories(redpacket.wasm
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/include)

set_target_properties(redpacket.wasm
PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")

ExternalProject_Add(
redpacket_project
SOURCE_DIR ${CMAKE_SOURCE_DIR}/src
BINARY_DIR ${CMAKE_BINARY_DIR}/redpacket
CMAKE_ARGS -DCMAKE_TOOLCHAIN_FILE=${EOSIO_CDT_ROOT}/lib/cmake/eosio.cdt/EosioWasmToolchain.cmake
UPDATE_COMMAND ""
PATCH_COMMAND ""
TEST_COMMAND ""
INSTALL_COMMAND ""
BUILD_ALWAYS 1
)

0 comments on commit ed04c79

Please sign in to comment.