1614 {
1618 list_producers->callback([this] {
1620 ("code", "sysio")("scope", "sysio")("table", "namebids")
1623
1624
1625 ("limit", 1));
1628 return;
1629 }
1631
1632 if( result.rows.empty() || result.rows[0].get_object()[
"newname"].as_string() !=
name(
newname).
to_string() ) {
1633 std::cout << "No bidname record found" << std::endl;
1634 return;
1635 }
1636 const auto& row = result.rows[0];
1637 string time = row["last_bid_time"].as_string();
1638 try {
1640 } catch (fc::parse_error_exception&) {
1641 }
1642 int64_t bid = row[
"high_bid"].as_int64();
1643 std::cout << std::left << std::setw(18) << "bidname:" << std::right << std::setw(24) << row["newname"].as_string() << "\n"
1644 << std::left << std::setw(18) << "highest bidder:" << std::right << std::setw(24) << row["high_bidder"].as_string() << "\n"
1645 << std::left << std::setw(18) << "highest bid:" << std::right << std::setw(24) << (bid > 0 ? bid : -bid) << "\n"
1646 << std::left << std::setw(18) << "last bid time:" << std::right << std::setw(24) << time << std::endl;
1647 if (bid < 0) std::cout << "This auction has already closed" << std::endl;
1648 });
1649 }
Option * add_flag(std::string flag_name)
Add a flag with no description or variable assignment.
App * add_subcommand(std::string subcommand_name="", std::string subcommand_description="")
Add a subcommand. Inherits INHERITABLE and OptionDefaults, and help flag.
CRTP * required(bool value=true)
Set the option as required.
static string to_pretty_string(const variant &v, const yield_function_t &yield, const output_formatting format=output_formatting::stringify_large_ints_and_doubles)
An order-preserving dictionary of variants.
#define localized(str,...)
fc::string to_string(double)
uint64_t to_uint64(const fc::string &)
const string get_table_func
fc::variant call(const std::string &url, const std::string &path, const T &v)
Immutable except for fc::from_variant.