1

I am going through the eos tutorial but I got stuck at the contract broadcast.

When I compile the contract with eosio-cpp -o hello.wasm hello.cpp --abigen the console seems to get stuck and I have to use CTRL+C to gain back control and following that I get:

Warning, empty ricardian clause file
Warning, empty ricardian clause file
Warning, action does not have a ricardian contract

.abi and .wasm files for the contract are still generated.

When I try to broadcast my contract with cleos set contract hello CONTRACTS_DIR/hello -p hello@active I get the following:

Reading WASM from /home/techbro965/contracts/hello/hello.wasm...
Publishing contract...
Error 3070003: Serialization Error Processing WASM
Error Details: mutable globals cannot be imported: globalImport.type.isMutable
pending console output:

I am using eosio.cdt-1.4.1 and eosio_1.5.0_1_ubuntu-18.04 Below is my smart contract from the tutorial:

#include <eosiolib/eosio.hpp>

using namespace eosio;

class [[eosio::contract("hello")]] hello : public contract {
  public:
  using contract::contract;

  [[eosio::action]]
  void hi( name user ) {
     print( "Hello, ", user);
  }
};

EOSIO_DISPATCH( hello, (hi))
0

Issue was resolved, it was a problem with the virtual machine setup. For EOS to work properly it requires a minimum of 2 CPU cores.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.