Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more examples in minttokens help dialogue #1677

Merged
merged 2 commits into from
Dec 30, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/masternodes/rpc_tokens.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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);
Expand Down