1143 (
simple ?
"account" :
"newaccount"),
1144 (
simple ?
localized(
"Create a new account on the blockchain (assumes system contract does not restrict RAM usage)")
1145 :
localized(
"Create a new account on the blockchain with initial resources") )
1146 );
1150 createAccount->add_option(
"ActiveKey",
active_key_str,
localized(
"The active public key or permission level for the new account"));
1151
1153 createAccount->add_option(
"--stake-net",
stake_net,
1154 (
localized(
"The amount of tokens delegated for net bandwidth")))->required();
1155 createAccount->add_option(
"--stake-cpu",
stake_cpu,
1156 (
localized(
"The amount of tokens delegated for CPU bandwidth")))->required();
1158 (
localized(
"The amount of RAM bytes to purchase for the new account in kibibytes (KiB)")));
1160 (
localized(
"The amount of RAM bytes to purchase for the new account in bytes")));
1161 createAccount->add_option(
"--buy-ram",
buy_ram_eos,
1162 (
localized(
"The amount of RAM bytes to purchase for the new account in tokens")));
1163 createAccount->add_flag(
"--transfer",
transfer,
1164 (
localized(
"Transfer voting power and right to unstake tokens to receiver")));
1165 }
1166
1168
1169 createAccount->callback([this] {
1171
1173 try {
1176 } else {
1177 try {
1180 }
1181
1183 active = owner;
1185 try {
1188 } else {
1189 try {
1192 }
1193
1202 if ( net.get_amount() != 0 || cpu.get_amount() != 0 ) {
1205 } else {
1207 }
1208 } else {
1210 }
1211 });
1212 }
#define SYS_RETHROW_EXCEPTIONS(exception_type, FORMAT,...)
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.
#define localized(str,...)
fc::crypto::public_key public_key_type
chain::permission_level to_permission_level(const std::string &s)
#define SYSC_ASSERT(TEST,...)
asset to_asset(account_name code, const string &s)
chain::action create_delegate(const name &from, const name &receiver, const asset &net, const asset &cpu, bool transfer)
std::variant< public_key_type, permission_level > auth_type
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)
chain::action create_newaccount(const name &creator, const name &newaccount, auth_type owner, auth_type active)
chain::action create_buyrambytes(const name &creator, const name &newaccount, uint32_t numbytes)
uint32_t buy_ram_bytes_in_kbytes
Immutable except for fc::from_variant.