Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - pqbb

#1
in fact, i'm not familiar with C++, but i want to try something.

i try to add a method (example: create_match) to the cli_wallet, so the cli can call it.
the code like below:

\libraries\wallet\include\graphene\wallet\wallet.hpp
      signed_transaction create_match(string issuer,
                                      string title,
                                      bool broadcast = false);

FC_API( graphene::wallet::wallet_api,
...
        (create_match)
...

\libraries\wallet\wallet.cpp
   signed_transaction create_match(string issuer,
                                   string title,
                                   bool broadcast = false)
   { try {
      account_object issuer_account = get_account( issuer );

      custom_operation create_op;
      create_op.issuer = issuer_account.id;
      create_op.title = title;

      signed_transaction tx;
      tx.operations.push_back( create_op );
      set_operation_fees( tx, _remote_db->get_global_properties().parameters.current_fees);
      tx.validate();

      return sign_transaction( tx, broadcast );
   } FC_CAPTURE_AND_RETHROW( (issuer)(title)(broadcast) ) }


signed_transaction wallet_api::create_match(string issuer,
                                            string title,
                                            bool broadcast)

{
   return my->create_match(issuer, title, broadcast);
}

...

just like this(i refer to the create_asset method)


then build & run the cli_wallet
but when i run the command in the wallet: create_match user1 "test" true
it display the error:
itr != _by_name.end(): no method with name 'create_match'

how i can fix it?
thanks very much! ;D ;D
#2
what we can do on that asset?how to create it?

i was research on bts, and have a little issues :)

i want create app about Sports Guess, is this asset is useful?

here is my site: https://www.bteggs.com
#3
Quote from: abit on February 01, 2018, 12:30:46 PM
Quote from: pqbb on February 01, 2018, 10:45:22 AM
but my new problem is 'get_fill_order_history' not work, it return the error 'no method with name 'get_fill_order_history''
i do not know why, i connect the node by websocket

anyone can help me?

thanks a lot
get_fill_order_history is not a cli_wallet API, but a witness_node API.

thanks very much, it's really a key issue!Got it!
#4
but my new problem is 'get_fill_order_history' not work, it return the error 'no method with name 'get_fill_order_history''
i do not know why, i connect the node by websocket

anyone can help me?

thanks a lot
#5
resolved, it seems the time period not match  :D
#6
i connect to my full node, the other api works well, but the 'get_market_history' return empty array, i don't know why, the params i thought was correct(like below).
get_market_history BTS CNY 30 "2017-07-02T00:00:00" "2017-07-01T00:00:00"
.
(i did nothing in the config.ini file)