stdClass Object ( [code] => 500 [message] => Internal Service Error [error] => stdClass Object ( [code] => 3050000 [name] => action_validate_exception [what] => Action validate exception [details] => Array ( [0] => stdClass Object ( [message] => Unknown action hashit in contract eosio [file] => chain_plugin.cpp [line_number] => 1831 [method] => abi_json_to_bin ) [1] => stdClass Object ( [message] => code: eosio, action: hashit, args: ["boxwork1","boxwork2","0.0001 EOS","Testy McTest"] [file] => chain_plugin.cpp [line_number] => 1842 [method] => abi_json_to_bin ) ) ) )

Can I create custom action using cleos?

  • 1
    Your question title and the content of the question are quite different. The account eosio does not contain the transfer operation. You likely mean to use eosio.token account. Please make your question more clear for more assistance. Oct 31, 2019 at 13:38
  • my fault, I was trying to push a custom action there called "Hash". And the issue I am facing is Unknown action hash in contract eosio. But I go the solution just going to put it below. Thanks for helping. Nov 4, 2019 at 12:48

1 Answer 1


Basically, I was trying to push a custom action called "hashit". So for hashit action, I have created a hash.cpp file

#include <eosiolib/eosio.hpp>
#include <eosiolib/print.hpp>
using namespace eosio;
class hash : public contract {
  using contract::contract;
  void hashit( name user ) {
     print( "Hello, ", name{user} );

and I have generated wasm and abi file with cmd eosio-cpp -o hash.wasm hash.cpp -abigen

and then set contract with cleos. And it works.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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