From 3c2a3431a2126988bbb3ad5c4f10a30599e80c32 Mon Sep 17 00:00:00 2001 From: Carlos LopezDeLara Date: Fri, 17 Jan 2025 08:56:26 -0600 Subject: [PATCH] Add query proposals Add query proposals --- .../cardano-cli/governance/gov-queries.md | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/docs/get-started/cardano-cli/governance/gov-queries.md b/docs/get-started/cardano-cli/governance/gov-queries.md index feedacfcd5..c1d0c55e88 100644 --- a/docs/get-started/cardano-cli/governance/gov-queries.md +++ b/docs/get-started/cardano-cli/governance/gov-queries.md @@ -9,6 +9,55 @@ keywords: [Governance, queries, CIP1694] There are various queries you can do to your local node to find relevant information about different aspects of teh governance state. +### Query proposals + +#### Query all proposals +This query returns all the proposals that can be ratified in the current epoch. This means that it excludes proposals that were submitted on the current epoch, as these cannot be ratified on the current epoch. + +```shell +cardano-cli conway query proposals --all-proposals +``` +#### Query proposal by ID +To query an individual proposal by its governance action id: + +```shell +cardano-cli conway query proposals \ +--governance-action-tx-id d098afe0db98605c243c13c8a537a3eb51e6ded5e3a48acca83e7082a0086428 \ --governance-action-index 0 + + +[ + { + "actionId": { + "govActionIx": 0, + "txId": "d098afe0db98605c243c13c8a537a3eb51e6ded5e3a48acca83e7082a0086428" + }, + "committeeVotes": {}, + "dRepVotes": { + "keyHash-68a5f1348300ada6dcec67f9421bdac62ba621006408ece8c8e551d6": "VoteNo" + }, + "expiresAfter": 842, + "proposalProcedure": { + "anchor": { + "dataHash": "42af10d2f864ace50d41ff7c9c93aa51c6ab0ca57d956653fb67353d97b57400", + "url": "https://bafybeigzrnrb3njfuomjsma7zdrcjoz3a4ku2kqafeqerbuquytdl6nxjy.ipfs.dweb.link/?filename=data%20(5).jsonld" + }, + "deposit": 100000000000, + "govAction": { + "tag": "InfoAction" + }, + "returnAddr": { + "credential": { + "keyHash": "79bb181ab55772b961a883a2a24e73a5416e163375817c898993f120" + }, + "network": "Testnet" + } + }, + "proposedIn": 812, + "stakePoolVotes": {} + } +] +``` + ### Query the gov-state We are showing only the top level keys of the governance state, the dump is to large to show on this tutorial.