Skip to content

Commit

Permalink
Port rpc rawtransaction
Browse files Browse the repository at this point in the history
  • Loading branch information
timemarkovqtum committed Jul 9, 2024
1 parent d30f46d commit 5059078
Show file tree
Hide file tree
Showing 15 changed files with 1,008 additions and 39 deletions.
77 changes: 77 additions & 0 deletions src/rpc/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,14 @@ static const CRPCConvertParam vRPCConvertParams[] =
{ "sendtoaddress", 8, "avoid_reuse" },
{ "sendtoaddress", 9, "fee_rate"},
{ "sendtoaddress", 10, "verbose"},
{ "sendtoaddress", 12, "changetosender" },
{ "splitutxosforaddress", 1, "minvalue" },
{ "splitutxosforaddress", 2, "maxvalue" },
{ "splitutxosforaddress", 3, "maxoutputs" },
{ "splitutxosforaddress", 4, "psbt" },
{ "settxfee", 0, "amount" },
{ "sethdseed", 0, "newkeypool" },
{ "getsubsidy", 0, "height" },
{ "getreceivedbyaddress", 1, "minconf" },
{ "getreceivedbyaddress", 2, "include_immature_coinbase" },
{ "getreceivedbylabel", 1, "minconf" },
Expand All @@ -74,6 +80,7 @@ static const CRPCConvertParam vRPCConvertParams[] =
{ "listtransactions", 2, "skip" },
{ "listtransactions", 3, "include_watchonly" },
{ "walletpassphrase", 1, "timeout" },
{ "walletpassphrase", 2, "stakingonly" },
{ "getblocktemplate", 0, "template_request" },
{ "listsinceblock", 1, "target_confirmations" },
{ "listsinceblock", 2, "include_watchonly" },
Expand All @@ -93,8 +100,35 @@ static const CRPCConvertParam vRPCConvertParams[] =
{ "scanblocks", 5, "options" },
{ "scanblocks", 5, "filter_false_positives" },
{ "scantxoutset", 1, "scanobjects" },
{ "sendmanywithdupes", 1, "amounts" },
{ "sendmanywithdupes", 2, "minconf" },
{ "sendmanywithdupes", 4, "subtractfeefrom" },
{ "sendmanywithdupes", 5, "replaceable" },
{ "sendmanywithdupes", 6, "conf_target" },
{ "addmultisigaddress", 0, "nrequired" },
{ "addmultisigaddress", 1, "keys" },
////////////////////////////////////////////////// // qtum
{ "getaddresstxids", 0, "argument"},
{ "getaddressmempool", 0, "argument"},
{ "getaddressdeltas", 0, "argument"},
{ "getaddressbalance", 0, "argument"},
{ "getaddressutxos", 0, "argument"},
{ "getblockhashes", 0, "high"},
{ "getblockhashes", 1, "low"},
{ "getblockhashes", 2, "options"},
{ "getspentinfo", 0, "argument"},
{ "searchlogs", 0, "fromblock"},
{ "searchlogs", 1, "toblock"},
{ "searchlogs", 2, "addressfilter"},
{ "searchlogs", 3, "topicfilter"},
{ "searchlogs", 4, "minconf"},
{ "waitforlogs", 0, "fromblock"},
{ "waitforlogs", 1, "toblock"},
{ "waitforlogs", 2, "filter"},
{ "waitforlogs", 3, "minconf"},
{ "qrc20listtransactions", 2, "fromblock"},
{ "qrc20listtransactions", 3, "minconf"},
//////////////////////////////////////////////////
{ "createmultisig", 0, "nrequired" },
{ "createmultisig", 1, "keys" },
{ "listunspent", 0, "minconf" },
Expand All @@ -113,6 +147,7 @@ static const CRPCConvertParam vRPCConvertParams[] =
{ "getchaintxstats", 0, "nblocks" },
{ "gettransaction", 1, "include_watchonly" },
{ "gettransaction", 2, "verbose" },
{ "gettransaction", 3, "waitconf" },
{ "getrawtransaction", 1, "verbosity" },
{ "getrawtransaction", 1, "verbose" },
{ "createrawtransaction", 0, "inputs" },
Expand All @@ -122,9 +157,11 @@ static const CRPCConvertParam vRPCConvertParams[] =
{ "decoderawtransaction", 1, "iswitness" },
{ "signrawtransactionwithkey", 1, "privkeys" },
{ "signrawtransactionwithkey", 2, "prevtxs" },
{ "signrawsendertransactionwithkey", 1, "privkeys" },
{ "signrawtransactionwithwallet", 1, "prevtxs" },
{ "sendrawtransaction", 1, "maxfeerate" },
{ "sendrawtransaction", 2, "maxburnamount" },
{ "sendrawtransaction", 3, "showcontractdata" },
{ "testmempoolaccept", 0, "rawtxs" },
{ "testmempoolaccept", 1, "maxfeerate" },
{ "submitpackage", 0, "package" },
Expand Down Expand Up @@ -275,6 +312,46 @@ static const CRPCConvertParam vRPCConvertParams[] =
{ "logging", 1, "exclude" },
{ "disconnectnode", 1, "nodeid" },
{ "upgradewallet", 0, "version" },
{ "createcontract", 1, "gaslimit" },
{ "createcontract", 2, "gasprice" },
{ "createcontract", 4, "broadcast" },
{ "createcontract", 5, "changetosender" },
{ "createcontract", 6, "psbt" },
{ "sendtocontract", 2, "amount" },
{ "sendtocontract", 3, "gaslimit" },
{ "sendtocontract", 4, "gasprice" },
{ "sendtocontract", 6, "broadcast" },
{ "sendtocontract", 7, "changetosender" },
{ "sendtocontract", 8, "psbt" },
{ "removedelegationforaddress", 1, "gaslimit" },
{ "removedelegationforaddress", 2, "gasprice" },
{ "setdelegateforaddress", 1, "fee" },
{ "setdelegateforaddress", 3, "gaslimit" },
{ "setdelegateforaddress", 4, "gasprice" },
{ "setsuperstakervaluesforaddress", 0, "params" },
{ "qrc20approve", 4, "gaslimit" },
{ "qrc20approve", 5, "gasprice" },
{ "qrc20approve", 6, "checkoutputs" },
{ "qrc20transfer", 4, "gaslimit" },
{ "qrc20transfer", 5, "gasprice" },
{ "qrc20transfer", 6, "checkoutputs" },
{ "qrc20transferfrom", 5, "gaslimit" },
{ "qrc20transferfrom", 6, "gasprice" },
{ "qrc20transferfrom", 7, "checkoutputs" },
{ "qrc20burn", 3, "gaslimit" },
{ "qrc20burn", 4, "gasprice" },
{ "qrc20burn", 5, "checkoutputs" },
{ "qrc20burnfrom", 4, "gaslimit" },
{ "qrc20burnfrom", 5, "gasprice" },
{ "qrc20burnfrom", 6, "checkoutputs" },
{ "callcontract", 3, "gaslimit" },
{ "callcontract", 4, "amount" },
{ "reservebalance", 0, "reserve"},
{ "reservebalance", 1, "amount"},
{ "listcontracts", 0, "start" },
{ "listcontracts", 1, "maxdisplay" },
{ "getstorage", 2, "index" },
{ "getstorage", 1, "blocknum" },
// Echo with conversion (For testing only)
{ "echojson", 0, "arg0" },
{ "echojson", 1, "arg1" },
Expand Down
Loading

0 comments on commit 5059078

Please sign in to comment.