@@ -653,7 +653,16 @@ static UniValue ListObjects(CGovernanceManager& govman, const CDeterministicMNLi
653653 return objResult;
654654}
655655
656- // USERS CAN QUERY THE SYSTEM FOR A LIST OF VARIOUS GOVERNANCE ITEMS
656+ static RPCResult ListObjectsHelp ()
657+ {
658+ auto ret = CGovernanceObject::GetStateJsonHelp (/* key=*/ " " , /* optional=*/ false , /* local_valid_key=*/ " fBlockchainValidity" );
659+ auto mod_inner = ret.m_inner ;
660+ for (const auto & result : CGovernanceObject::GetVotesJsonHelp (/* key=*/ " " , /* optional=*/ false ).m_inner ) {
661+ mod_inner.push_back (result);
662+ }
663+ return RPCResult{ret.m_type , ret.m_key_name , ret.m_description , mod_inner};
664+ }
665+
657666static RPCHelpMan gobject_list_helper (const bool make_a_diff)
658667{
659668 const std::string command{make_a_diff ? " gobject diff" : " gobject list" };
@@ -668,11 +677,7 @@ static RPCHelpMan gobject_list_helper(const bool make_a_diff)
668677 },
669678 {
670679 RPCResult{" If request is valid" ,
671- RPCResult::Type::OBJ, " hash" , " Object details" ,
672- {
673- // TODO: list fields of output for RPC help instead ELISION
674- {RPCResult::Type::ELISION, " " , " " }
675- },
680+ RPCResult::Type::OBJ, " hash" , " Object details" , {ListObjectsHelp ()},
676681 },
677682 RPCResult{" If request is invalid" ,
678683 RPCResult::Type::STR, " " , " Error string"
@@ -715,23 +720,25 @@ static RPCHelpMan gobject_diff()
715720 return gobject_list_helper (true );
716721}
717722
718- // GET SPECIFIC GOVERNANCE ENTRY
723+ static RPCResult gobject_get_help ()
724+ {
725+ auto ret = CGovernanceObject::GetStateJsonHelp (/* key=*/ " " , /* optional=*/ false , /* local_valid_key=*/ " fLocalValidity" );
726+ auto mod_inner = ret.m_inner ;
727+ mod_inner.push_back ({RPCResult::Type::OBJ, " FundingResult" , " Funding vote details" , {CGovernanceObject::GetVotesJsonHelp (/* key=*/ " " , /* optional=*/ false )}});
728+ mod_inner.push_back ({RPCResult::Type::OBJ, " ValidResult" , " Object validity vote details" , {CGovernanceObject::GetVotesJsonHelp (/* key=*/ " " , /* optional=*/ false )}});
729+ mod_inner.push_back ({RPCResult::Type::OBJ, " DeleteResult" , " Delete vote details" , {CGovernanceObject::GetVotesJsonHelp (/* key=*/ " " , /* optional=*/ false )}});
730+ mod_inner.push_back ({RPCResult::Type::OBJ, " EndorsedResult" , " Endorsed vote details" , {CGovernanceObject::GetVotesJsonHelp (/* key=*/ " " , /* optional=*/ false )}});
731+ return RPCResult{ret.m_type , ret.m_key_name , ret.m_description , mod_inner};
732+ }
733+
719734static RPCHelpMan gobject_get ()
720735{
721736 return RPCHelpMan{" gobject get" ,
722737 " Get governance object by hash\n " ,
723738 {
724739 {" governance-hash" , RPCArg::Type::STR_HEX, RPCArg::Optional::NO, " object id" },
725740 },
726- {
727- RPCResult{
728- RPCResult::Type::OBJ, " " , " " ,
729- {
730- // TODO: list fields of output for RPC help instead ELISION
731- {RPCResult::Type::ELISION, " " , " " }
732- }
733- },
734- },
741+ gobject_get_help (),
735742 RPCExamples{" " },
736743 [&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
737744{
0 commit comments