diff --git a/apps/src/lib/client/rpc.rs b/apps/src/lib/client/rpc.rs index 19667a2f0a..0e23634a96 100644 --- a/apps/src/lib/client/rpc.rs +++ b/apps/src/lib/client/rpc.rs @@ -1167,8 +1167,7 @@ pub async fn query_proposal_result( ) .await; - let proposal_result = if let Ok(Some(proposal_result)) = proposal_result - { + if let Ok(Some(proposal_result)) = proposal_result { display_line!(context.io(), "Proposal Id: {} ", proposal_id); display_line!(context.io(), "{:4}{}", "", proposal_result); } else { diff --git a/sdk/src/rpc.rs b/sdk/src/rpc.rs index da40ab0f3d..418da0aa03 100644 --- a/sdk/src/rpc.rs +++ b/sdk/src/rpc.rs @@ -12,12 +12,12 @@ use masp_primitives::sapling::Node; use namada_core::ledger::governance::parameters::GovernanceParameters; use namada_core::ledger::governance::storage::proposal::StorageProposal; use namada_core::ledger::governance::utils::{ - compute_proposal_result, ProposalResult, ProposalVotes, TallyVote, Vote, - VotePower, + compute_proposal_result, ProposalResult, ProposalVotes, Vote, }; use namada_core::ledger::ibc::storage::{ ibc_denom_key, ibc_denom_key_prefix, is_ibc_denom_key, }; +use namada_core::ledger::pgf::parameters::PgfParameters; use namada_core::ledger::pgf::storage::steward::StewardDetail; use namada_core::ledger::storage::LastBlock; use namada_core::types::account::Account; @@ -1094,14 +1094,21 @@ pub async fn query_unbond_with_slashing( ) } -/// Get the givernance parameters +/// Get the governance parameters pub async fn query_governance_parameters( client: &C, ) -> GovernanceParameters { unwrap_client_response::(RPC.vp().gov().parameters(client).await) } -/// Get the givernance parameters +/// Get the public good fundings parameters +pub async fn query_pgf_parameters( + client: &C, +) -> PgfParameters { + unwrap_client_response::(RPC.vp().pgf().parameters(client).await) +} + +/// Get all the votes of a proposal pub async fn query_proposal_votes( client: &C, proposal_id: u64,