I try example from book "Mastering EOS". I have written hello.cpp:
#include <eosio/eosio.hpp>
using namespace eosio;
class [[eosio::contract]] hello: public contract {
public:
using contract::contract;
[[eosio::action]]
void hi ( name user) {
print ("Hello, ", user);
}
};
(note: I changed eosy::action to eosio::action After compiling eosio-cpp hello.cpp are warnings:
Warning, empty ricardian clause file
Warning, empty ricardian clause file
Warning, action <hi> does not have a ricardian contract
and appear files: hello.wasm and hello.abi Next I try:
cleos create eosio account hello1 MY_PUBLC_KEY -p eosio@active
where paste key in place MY_PUBLC_KEY is error: OwnerKey is required Next I start nodeos and try
cleos set contract hello ~/CONTRACTS_DIR/hello1 -p hello.active
is error:
Publishing contract...
Failed to connect to nodeos at http://127.0.0.1:8888/; is nodeos running?
although nodeos is running.