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

Public Member Functions

 buyram_subcommand (CLI::App *actionRoot)
 

Public Attributes

string from_str
 
string receiver_str
 
string amount
 
bool kbytes = false
 
bool bytes = false
 

Detailed Description

Definition at line 1689 of file main.cpp.

Constructor & Destructor Documentation

◆ buyram_subcommand()

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

Definition at line 1696 of file main.cpp.

1696 {
1697 auto buyram = actionRoot->add_subcommand("buyram", localized("Buy RAM"));
1698 buyram->add_option("payer", from_str, localized("The account paying for RAM"))->required();
1699 buyram->add_option("receiver", receiver_str, localized("The account receiving bought RAM"))->required();
1700 buyram->add_option("amount", amount, localized("The amount of tokens to pay for RAM, or number of bytes/kibibytes of RAM if --bytes/--kbytes is set"))->required();
1701 buyram->add_flag("--kbytes,-k", kbytes, localized("The amount to buy in kibibytes (KiB)"));
1702 buyram->add_flag("--bytes,-b", bytes, localized("The amount to buy in bytes"));
1703 add_standard_transaction_options(buyram, "payer@active");
1704 buyram->callback([this] {
1705 SYSC_ASSERT( !kbytes || !bytes, "ERROR: --kbytes and --bytes cannot be set at the same time" );
1706 if (kbytes || bytes) {
1708 } else {
1710 }
1711 });
1712 }
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
#define localized(str,...)
Definition localize.hpp:10
uint64_t to_uint64(const fc::string &)
Definition string.cpp:105
#define SYSC_ASSERT(TEST,...)
Definition main.cpp:134
asset to_asset(account_name code, const string &s)
Definition main.cpp:812
chain::action create_buyram(const name &creator, const name &newaccount, const asset &quantity)
Definition main.cpp:687
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
chain::action create_buyrambytes(const name &creator, const name &newaccount, uint32_t numbytes)
Definition main.cpp:696
string receiver_str
Definition main.cpp:1691
Here is the call graph for this function:

Member Data Documentation

◆ amount

string buyram_subcommand::amount

Definition at line 1692 of file main.cpp.

◆ bytes

bool buyram_subcommand::bytes = false

Definition at line 1694 of file main.cpp.

◆ from_str

string buyram_subcommand::from_str

Definition at line 1690 of file main.cpp.

◆ kbytes

bool buyram_subcommand::kbytes = false

Definition at line 1693 of file main.cpp.

◆ receiver_str

string buyram_subcommand::receiver_str

Definition at line 1691 of file main.cpp.


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