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

Public Member Functions

 fundnetloan_subcommand (CLI::App *actionRoot)
 

Public Attributes

string from_str
 
string loan_num_str
 
string payment_str
 
const name act_name { "fundnetloan"_n }
 

Detailed Description

Definition at line 2034 of file main.cpp.

Constructor & Destructor Documentation

◆ fundnetloan_subcommand()

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

Definition at line 2040 of file main.cpp.

2040 {
2041 auto fundnetloan = actionRoot->add_subcommand("fundnetloan", localized("Deposit into a Network loan fund"));
2042 fundnetloan->add_option("from", from_str, localized("Loan owner"))->required();
2043 fundnetloan->add_option("loan_num", loan_num_str, localized("Loan ID"))->required();
2044 fundnetloan->add_option("payment", payment_str, localized("Amount to be deposited"))->required();
2045 add_standard_transaction_options(fundnetloan, "from@active");
2046 fundnetloan->callback([this] {
2048 ("from", from_str)
2049 ("loan_num", loan_num_str)
2050 ("payment", payment_str);
2051 auto accountPermissions = get_account_permissions(tx_permission, {name(from_str), config::active_name});
2052 send_actions({create_action(accountPermissions, config::system_account_name, act_name, act_payload)});
2053 });
2054 }
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:2038
Here is the call graph for this function:

Member Data Documentation

◆ act_name

const name fundnetloan_subcommand::act_name { "fundnetloan"_n }

Definition at line 2038 of file main.cpp.

2038{ "fundnetloan"_n };

◆ from_str

string fundnetloan_subcommand::from_str

Definition at line 2035 of file main.cpp.

◆ loan_num_str

string fundnetloan_subcommand::loan_num_str

Definition at line 2036 of file main.cpp.

◆ payment_str

string fundnetloan_subcommand::payment_str

Definition at line 2037 of file main.cpp.


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