Raptor3um / raptoreum

MIT License
317 stars 134 forks source link

CLI `sendtoaddress` Errors with more complicated entries #383

Open michal-zurkowski opened 1 month ago

michal-zurkowski commented 1 month ago

This issue tracker is only for technical issues related to Raptoreum Core.

General Raptoreum questions and/or support requests and are best directed to the Raptoreum Discord.

To report critical security issues, DM the Core or Developer Teams instead of creating Github issues.

Describe the issue

The sendtoaddress cli command does not work except default send or simplest futures send. Anything else in this command does not seem to be working. There is no way to add comment, label, to subtract fee and other parameters that are AFTER futures in the command arguments.

Can you reliably reproduce the issue?

If so, please list the steps to reproduce below:

  1. Launch wallet with daemon capabilities (server=1 with -qt)
  2. Unlock wallet if needed (does not need to be unlocked for the error to actually show itself)
  3. Try to send RTM with sendtoaddress without futures functionality, or with but with added comment or other option set to not default value. Example commands are in the first screenshot
    raptoreum-cli sendtoaddress "RRyELUZD7mmHJ7zQtbKPRndFTg4b7bcaTF" 1 [] "" "" true
    raptoreum-cli sendtoaddress "RRyELUZD7mmHJ7zQtbKPRndFTg4b7bcaTF" 1 "[]" "" "" true
    raptoreum-cli sendtoaddress "RRyELUZD7mmHJ7zQtbKPRndFTg4b7bcaTF" 1 null "" "" true
    raptoreum-cli sendtoaddress "RRyELUZD7mmHJ7zQtbKPRndFTg4b7bcaTF" 1 "" "" true
    raptoreum-cli sendtoaddress "RRyELUZD7mmHJ7zQtbKPRndFTg4b7bcaTF" 1 '{"future_maturity":50, "future_locktime": 2}' "" "" true
    raptoreum-cli sendtoaddress "RRyELUZD7mmHJ7zQtbKPRndFTg4b7bcaTF" 1 '{"future_maturity":50, "future_locktime": 2}' "comment" "comment to" true

Expected behaviour

Being able to set fields like comment, or false/true for the send to subtract fees from the sending amount.

Actual behaviour

It does not work. You can execute simple sendtoaddress command like: raptoreum-cli sendtoaddress "rrSVzNMxGHYX4XkZtFAYgMEyku8W9KTuCe" 10 raptoreum-cli sendtoaddress "rrSVzNMxGHYX4XkZtFAYgMEyku8W9KTuCe" 20 "{\"future_maturity\":50, \"future_locktime\": -1}" Adding anything that would be AFTER futures, or skipping it like in the help example does not work and results in error: Error parsing JSON:

Screenshots.

image image Using just [] in zsh image

What version of Raptoreum Core are you using?