2

I want to buy 250KB of RAM on Jungle testnet but don't know the price.

in this thread the answer suggests the command
cleos --url <jungle-testnet-url> system buyram <payer-account> <receiver-account> --kbytes 1000

but now the command does not have --kbytes option, here is the doc ref

Can anyone help to find that info? THanks in advance.

2

It currently cost 0.9298 EOS to purchase 1024 bytes of RAM on the Jungle Testnet.

0.9298 * 250 = 232.45 EOS estimated to purchase 250 kbytes of RAM.

The documentation you linked to is not current. Please refer to the v1.7.4 eosio repo.

   buyram_subcommand(CLI::App* actionRoot) {
      auto buyram = actionRoot->add_subcommand("buyram", localized("Buy RAM"));
      buyram->add_option("payer", from_str, localized("The account paying for RAM"))->required();
      buyram->add_option("receiver", receiver_str, localized("The account receiving bought RAM"))->required();
      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();
      buyram->add_flag("--kbytes,-k", kbytes, localized("buyram in number of kibibytes (KiB)"));
      buyram->add_flag("--bytes,-b", bytes, localized("buyram in number of bytes"));
      add_standard_transaction_options(buyram, "payer@active");
      buyram->set_callback([this] {
         EOSC_ASSERT( !kbytes || !bytes, "ERROR: --kbytes and --bytes cannot be set at the same time" );
         if (kbytes || bytes) {
            send_actions( { create_buyrambytes(from_str, receiver_str, fc::to_uint64(amount) * ((kbytes) ? 1024ull : 1ull)) } );
         } else {
            send_actions( { create_buyram(from_str, receiver_str, to_asset(amount)) } );
         }
      });
   }

The amount parameter can either be an amount in EOS to spend, or --bytes or --kbytes

"The amount of tokens to pay for RAM, or number of bytes/kibibytes of RAM if --bytes/--kbytes is set"

  • I have tried without amount and with --kbytes and received an error, but that was because of insufficient balance. Now it works, thank you. – Tigran Sahakyan Aug 28 '19 at 19:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.