Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
bidname_subcommand Struct Reference

Public Member Functions

 bidname_subcommand (CLI::App *actionRoot)
 

Public Attributes

string bidder_str
 
string newname_str
 
string bid_amount
 

Detailed Description

Definition at line 1590 of file main.cpp.

Constructor & Destructor Documentation

◆ bidname_subcommand()

bidname_subcommand::bidname_subcommand ( CLI::App * actionRoot)
inline

Definition at line 1594 of file main.cpp.

1594 {
1595 auto bidname = actionRoot->add_subcommand("bidname", localized("Name bidding"));
1596 bidname->add_option("bidder", bidder_str, localized("The bidding account"))->required();
1597 bidname->add_option("newname", newname_str, localized("The bidding name"))->required();
1598 bidname->add_option("bid", bid_amount, localized("The amount of tokens to bid"))->required();
1599 add_standard_transaction_options(bidname, "bidder@active");
1600 bidname->callback([this] {
1602 ("bidder", bidder_str)
1603 ("newname", newname_str)
1604 ("bid", to_asset(bid_amount));
1605 auto accountPermissions = get_account_permissions(tx_permission, {name(bidder_str), config::active_name});
1606 send_actions({create_action(accountPermissions, config::system_account_name, "bidname"_n, act_payload)});
1607 });
1608 }
std::string name
App * add_subcommand(std::string subcommand_name="", std::string subcommand_description="")
Add a subcommand. Inherits INHERITABLE and OptionDefaults, and help flag.
Definition CLI11.hpp:5538
Option * add_option(std::string option_name, callback_t option_callback, std::string option_description="", bool defaulted=false, std::function< std::string()> func={})
Definition CLI11.hpp:5099
CRTP * required(bool value=true)
Set the option as required.
Definition CLI11.hpp:3400
An order-preserving dictionary of variants.
stores null, int64, uint64, double, bool, string, std::vector<variant>, and variant_object's.
Definition variant.hpp:191
#define localized(str,...)
Definition localize.hpp:10
chain::action create_action(const vector< permission_level > &authorization, const account_name &code, const action_name &act, const fc::variant &args)
Definition main.cpp:683
asset to_asset(account_name code, const string &s)
Definition main.cpp:812
vector< chain::permission_level > get_account_permissions(const vector< string > &permissions)
Definition main.cpp:238
void add_standard_transaction_options(CLI::App *cmd, string default_permission="")
Definition main.cpp:202
void send_actions(std::vector< chain::action > &&actions, packed_transaction::compression_type compression=packed_transaction::compression_type::none)
Definition main.cpp:616
vector< string > tx_permission
Definition main.cpp:198
Here is the call graph for this function:

Member Data Documentation

◆ bid_amount

string bidname_subcommand::bid_amount

Definition at line 1593 of file main.cpp.

◆ bidder_str

string bidname_subcommand::bidder_str

Definition at line 1591 of file main.cpp.

◆ newname_str

string bidname_subcommand::newname_str

Definition at line 1592 of file main.cpp.


The documentation for this struct was generated from the following file: