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.


Topics - pqbb

Pages: [1]
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
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)


Pages: [1]