1532 {
1538 delegate_bandwidth->add_option(
"--buyram",
buy_ram_amount,
localized(
"The amount of tokens to buy RAM with"));
1539 delegate_bandwidth->add_option(
"--buy-ram-bytes",
buy_ram_bytes,
localized(
"The amount of RAM to buy in bytes"));
1540 delegate_bandwidth->add_flag(
"--transfer",
transfer,
localized(
"Transfer voting power and right to unstake tokens to receiver"));
1542
1543 delegate_bandwidth->callback([this] {
1551 std::vector<chain::action> acts{
create_action(accountPermissions, config::system_account_name,
"delegatebw"_n, act_payload)};
1557 }
1559 });
1560 }
App * add_subcommand(std::string subcommand_name="", std::string subcommand_description="")
Add a subcommand. Inherits INHERITABLE and OptionDefaults, and help flag.
Option * add_option(std::string option_name, callback_t option_callback, std::string option_description="", bool defaulted=false, std::function< std::string()> func={})
CRTP * required(bool value=true)
Set the option as required.
An order-preserving dictionary of variants.
stores null, int64, uint64, double, bool, string, std::vector<variant>, and variant_object's.
#define localized(str,...)
chain::action create_action(const vector< permission_level > &authorization, const account_name &code, const action_name &act, const fc::variant &args)
#define SYSC_ASSERT(TEST,...)
asset to_asset(account_name code, const string &s)
vector< chain::permission_level > get_account_permissions(const vector< string > &permissions)
chain::action create_buyram(const name &creator, const name &newaccount, const asset &quantity)
void add_standard_transaction_options(CLI::App *cmd, string default_permission="")
void send_actions(std::vector< chain::action > &&actions, packed_transaction::compression_type compression=packed_transaction::compression_type::none)
vector< string > tx_permission
chain::action create_buyrambytes(const name &creator, const name &newaccount, uint32_t numbytes)