def args(clear=False): args_ = [ "--http-server-address", config.http_server_address(), "--chain-state-db-size-mb", config.chain_state_db_size_mb(), "--contracts-console", "--verbose-http-errors", "--enable-stale-production", "--producer-name eosio", "--signature-provider " + config.eosio_key_public() + "=KEY:" + config.eosio_key_private(), "--plugin eosio::producer_plugin", "--plugin eosio::chain_api_plugin", "--plugin eosio::http_plugin", ] if config.nodeos_config_dir(): args_.extend(["--config-dir", config.nodeos_config_dir()]) if config.nodeos_data_dir(): args_.extend(["--data-dir", config.nodeos_data_dir()]) if config.nodeos_options(): args_.extend(nodeos_options()) if clear: node_stop() args_.extend(["--delete-all-blocks"]) if config.genesis_json(): args_.extend(["--genesis-json", config.genesis_json()]) return args_
def test(): stop() nodeos([ "--http-server-address", config.http_server_address(), "--data-dir", config.data_dir(), "--config-dir", config.config_dir(), "--chain-state-db-size-mb", config.chain_state_db_size_mb(), "--contracts-console", "--verbose-http-errors", "--enable-stale-production", "--producer-name eosio", "--signature-provider " + config.eosio_key_public() + "=KEY:" + config.eosio_key_private(), "--plugin eosio::producer_plugin", "--plugin eosio::chain_api_plugin", "--plugin eosio::http_plugin", "--plugin eosio::history_api_plugin", "--genesis-json", config.genesis_json(), "--delete-all-blocks" ]) node_probe() stop() if not node_probe(): logger.TRACE("Confirmed, node is stopped.") nodeos([ "--http-server-address", config.http_server_address(), "--data-dir", config.data_dir(), "--config-dir", config.config_dir(), "--chain-state-db-size-mb", config.chain_state_db_size_mb(), "--contracts-console", "--verbose-http-errors", "--enable-stale-production", "--producer-name eosio", "--signature-provider " + config.eosio_key_public() + "=KEY:" + config.eosio_key_private(), "--plugin eosio::producer_plugin", "--plugin eosio::chain_api_plugin", "--plugin eosio::http_plugin", "--plugin eosio::history_api_plugin" ]) node_probe() stop() src_file = os.path.join(config.eosf_dir(), "contracts/01_hello_world/src/hello_world.cpp") #"contracts/01_hello_world/src/hello_world.cpp") abi_file = os.path.join(config.eosf_dir(), "contracts/01_hello_world/build/hello_world.abi") abi(src_file, abi_file) wasm_file = os.path.join( config.eosf_dir(), "contracts/01_hello_world/build/hello_world.wasm") wasm(src_file, wasm_file)