Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
rexexec_subcommand Struct Reference
Collaboration diagram for rexexec_subcommand:

Public Member Functions

 rexexec_subcommand (CLI::App *actionRoot)
 

Public Attributes

string user_str
 
string max_str
 
const name act_name { "rexexec"_n }
 

Detailed Description

Definition at line 2175 of file main.cpp.

Constructor & Destructor Documentation

◆ rexexec_subcommand()

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

Definition at line 2180 of file main.cpp.

2180 {
2181 auto rexexec = actionRoot->add_subcommand("rexexec", localized("Perform REX maintenance by processing expired loans and unfilled sell orders"));
2182 rexexec->add_option("user", user_str, localized("User executing the action"))->required();
2183 rexexec->add_option("max", max_str, localized("Maximum number of CPU loans, Network loans, and sell orders to be processed"))->required();
2184 add_standard_transaction_options(rexexec, "user@active");
2185 rexexec->callback([this] {
2187 ("user", user_str)
2188 ("max", max_str);
2189 auto accountPermissions = get_account_permissions(tx_permission, {name(user_str), config::active_name});
2190 send_actions({create_action(accountPermissions, config::system_account_name, act_name, act_payload)});
2191 });
2192 }
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
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
const name act_name
Definition main.cpp:2178
Here is the call graph for this function:

Member Data Documentation

◆ act_name

const name rexexec_subcommand::act_name { "rexexec"_n }

Definition at line 2178 of file main.cpp.

2178{ "rexexec"_n };

◆ max_str

string rexexec_subcommand::max_str

Definition at line 2177 of file main.cpp.

◆ user_str

string rexexec_subcommand::user_str

Definition at line 2176 of file main.cpp.


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