1

I am following this doc: https://developers.eos.io/eosio-home/docs/your-first-contract.

This is the hello.cpp contract code which is successfully deployed:

#include <eosiolib/eosio.hpp>
#include <eosiolib/print.hpp>
using namespace eosio;

class hello : public contract {
  public:
      using contract::contract;

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

When I call cleos push action hello testit '[]' -p hello@active, this error is shown on the console:

!action_type.empty(): Unknown action testit in contract hello

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.