未验证 提交 6131d4cc 编写于 作者: D Daniel Larimer 提交者: GitHub

Merge branch 'master' into issue3014

......@@ -2000,13 +2000,13 @@ int main( int argc, char** argv ) {
push->require_subcommand();
// push action
string contract;
string contract_account;
string action;
string data;
vector<string> permissions;
auto actionsSubcommand = push->add_subcommand("action", localized("Push a transaction with a single action"));
actionsSubcommand->fallthrough(false);
actionsSubcommand->add_option("contract", contract,
actionsSubcommand->add_option("account", contract_account,
localized("The account providing the contract to execute"), true)->required();
actionsSubcommand->add_option("action", action,
localized("A JSON string or filename defining the action to execute on the contract"), true)->required();
......@@ -2020,14 +2020,14 @@ int main( int argc, char** argv ) {
} EOS_RETHROW_EXCEPTIONS(action_type_exception, "Fail to parse action JSON data='${data}'", ("data",data))
auto arg= fc::mutable_variant_object
("code", contract)
("code", contract_account)
("action", action)
("args", action_args_var);
auto result = call(json_to_bin_func, arg);
auto accountPermissions = get_account_permissions(tx_permission);
send_actions({chain::action{accountPermissions, contract, action, result.get_object()["binargs"].as<bytes>()}});
send_actions({chain::action{accountPermissions, contract_account, action, result.get_object()["binargs"].as<bytes>()}});
});
// push transaction
......
......@@ -13,8 +13,6 @@ set( CMAKE_CXX_STANDARD 14 )
include_directories("${CMAKE_SOURCE_DIR}/plugins/wallet_plugin/include")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.hpp.in ${CMAKE_CURRENT_SOURCE_DIR}/config.hpp ESCAPE_QUOTES)
file(GLOB UNIT_TESTS "wallet_tests.cpp")
add_executable( plugin_test ${UNIT_TESTS} ${WASM_UNIT_TESTS} main.cpp)
......
/**
* @file
* @copyright defined in eos/LICENSE.txt
*/
namespace eosio { namespace tests { namespace config {
constexpr char eosiolib_path[] = "${CMAKE_CURRENT_SOURCE_DIR}/../contracts";
constexpr char pfr_include_path[] = "${CMAKE_CURRENT_SOURCE_DIR}/../externals/magic_get/include";
constexpr char boost_include_path[] = "${Boost_INCLUDE_DIR}";
}}}
......@@ -17,7 +17,7 @@ include_directories("${CMAKE_SOURCE_DIR}/contracts")
include_directories("${CMAKE_SOURCE_DIR}/unittests/contracts")
include_directories("${CMAKE_SOURCE_DIR}/libraries/testing/include")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.hpp.in ${CMAKE_CURRENT_SOURCE_DIR}/config.hpp ESCAPE_QUOTES)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/include/config.hpp.in ${CMAKE_CURRENT_BINARY_DIR}/include/config.hpp ESCAPE_QUOTES)
file(GLOB UNIT_TESTS "*.cpp")
......@@ -26,7 +26,7 @@ target_link_libraries( unit_test eosio_chain chainbase eosio_testing eos_utiliti
target_include_directories( unit_test PUBLIC ${CMAKE_BINARY_DIR}/contracts ${CMAKE_CURRENT_BINARY_DIR}/tests/contracts )
target_include_directories( unit_test PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/wasm_tests )
target_include_directories( unit_test PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include )
target_include_directories( unit_test PUBLIC ${CMAKE_CURRENT_BINARY_DIR}/include )
add_dependencies(unit_test asserter test_api test_api_mem test_api_db test_api_multi_index exchange eosio.token proxy identity identity_test stltest infinite eosio.system eosio.token eosio.bios test.inline multi_index_test noop dice eosio.msig payloadless tic_tac_toe)
#Manually run unit_test for all supported runtimes
......
......@@ -21,7 +21,7 @@
#include <boost/test/framework.hpp>
#include "config.hpp"
#include <config.hpp>
using namespace eosio;
using namespace chain;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册