From 69a64e16f7df7ce2f8917b4d3edd7f72ca897cc4 Mon Sep 17 00:00:00 2001 From: Shoham Chakraborty Date: Wed, 28 Dec 2022 23:00:27 +0530 Subject: [PATCH 1/2] Add more examples in minttokens help dialogue --- src/masternodes/rpc_tokens.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/masternodes/rpc_tokens.cpp b/src/masternodes/rpc_tokens.cpp index 0556ef34b2..3e5cccf715 100644 --- a/src/masternodes/rpc_tokens.cpp +++ b/src/masternodes/rpc_tokens.cpp @@ -641,7 +641,8 @@ UniValue minttokens(const JSONRPCRequest& request) { RPCHelpMan{"minttokens", "\nCreates (and submits to local node and network) a transaction minting your token (for accounts and/or UTXOs). \n" - "The second optional argument (may be empty array) is an array of specific UTXOs to spend. One of UTXO's must belong to the token's owner (collateral) address" + + "The second optional argument (may be empty array) is an array of specific UTXOs to spend. One of UTXO's must belong to the token's owner (collateral) address. \n" + "All arguments may optionally be passed in a JSON object." + HelpRequiringPassphrase(pwallet) + "\n", { {"amounts", RPCArg::Type::STR, RPCArg::Optional::NO, @@ -671,6 +672,12 @@ UniValue minttokens(const JSONRPCRequest& request) { R"(10@symbol '[{"txid":"id","vout":0}]')") + HelpExampleCli("minttokens", R"(10@symbol '[{"txid":"id","vout":0}]' address)") + + HelpExampleCli("minttokens", + R"(10@symbol '' address)") + + HelpExampleCli("minttokens", + R"({"amounts": ["10@symbol"], "to": "address"})") + + HelpExampleCli("minttokens", + R"({"amounts": ["10@symbol"], "to": "address", "inputs": "[{"txid": "id","vout": 0}]"})") + HelpExampleRpc("minttokens", R"(10@symbol '[{"txid":"id","vout":0}]')") }, }.Check(request); From 58380f950fc28162ea12941edc31ddf7ba8ba45d Mon Sep 17 00:00:00 2001 From: Shoham Chakraborty Date: Wed, 28 Dec 2022 23:04:51 +0530 Subject: [PATCH 2/2] Add quotes --- src/masternodes/rpc_tokens.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/masternodes/rpc_tokens.cpp b/src/masternodes/rpc_tokens.cpp index 3e5cccf715..e6112ce409 100644 --- a/src/masternodes/rpc_tokens.cpp +++ b/src/masternodes/rpc_tokens.cpp @@ -675,9 +675,9 @@ UniValue minttokens(const JSONRPCRequest& request) { + HelpExampleCli("minttokens", R"(10@symbol '' address)") + HelpExampleCli("minttokens", - R"({"amounts": ["10@symbol"], "to": "address"})") + R"('{"amounts": ["10@symbol"], "to": "address"}')") + HelpExampleCli("minttokens", - R"({"amounts": ["10@symbol"], "to": "address", "inputs": "[{"txid": "id","vout": 0}]"})") + R"('{"amounts": ["10@symbol"], "to": "address", "inputs": "[{"txid": "id","vout": 0}]"}')") + HelpExampleRpc("minttokens", R"(10@symbol '[{"txid":"id","vout":0}]')") }, }.Check(request);