diff --git a/Cargo.lock b/Cargo.lock index 5078e5e4..50fbf4cd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2065,7 +2065,7 @@ dependencies = [ [[package]] name = "encointer-client-notee" -version = "1.14.2" +version = "1.14.3" dependencies = [ "ac-keystore", "array-bytes", @@ -2117,7 +2117,7 @@ dependencies = [ [[package]] name = "encointer-node-notee" -version = "1.14.2" +version = "1.14.3" dependencies = [ "clap 4.5.16", "encointer-balances-tx-payment-rpc", diff --git a/client/Cargo.toml b/client/Cargo.toml index 44cd85b0..ccc52b99 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -3,7 +3,7 @@ name = "encointer-client-notee" authors = ["encointer.org "] edition = "2021" #keep with node version. major, minor and patch -version = "1.14.2" +version = "1.14.3" [dependencies] # todo migrate to clap >=3 https://github.com/encointer/encointer-node/issues/107 diff --git a/client/src/commands/encointer_democracy.rs b/client/src/commands/encointer_democracy.rs index c8faaa9c..aa7e8923 100644 --- a/client/src/commands/encointer_democracy.rs +++ b/client/src/commands/encointer_democracy.rs @@ -14,6 +14,7 @@ use encointer_node_notee_runtime::{AccountId, Balance, Hash}; use encointer_primitives::{ ceremonies::{CeremonyIndexType, CommunityCeremony, ReputationCountType}, common::{FromStr, PalletString}, + communities::CommunityIdentifier, democracy::{ Proposal, ProposalAccessPolicy, ProposalAction, ProposalIdType, ProposalState, ReputationVec, Vote, @@ -222,7 +223,18 @@ pub fn list_proposals(_args: &str, matches: &ArgMatches<'_>) -> Result<(), clap: "Proposal id: {} (reputation commitment purpose id: {})", *proposal_id, purpose_id ); - println!("🛠 action: {:?}", proposal.action); + let proposal_str = match &proposal.action { + ProposalAction::SetInactivityTimeout(timeout) => + format!("Set inactivity timeout to {timeout}"), + ProposalAction::UpdateNominalIncome(cid, income) => + format!("Update nominal income for {cid} to {income}"), + ProposalAction::Petition(maybecid, demand) => + format!("Petition for {} demanding: {}", cid_or_global(maybecid), String::from_utf8_lossy(demand)), + ProposalAction::SpendNative(maybecid, to, amount) => + format!("Spend Native from {} treasury to {to}, amount {amount}", cid_or_global(maybecid)), + _ => format!("{:?}", proposal.action), + }; + println!("🛠 action: {:?}", proposal_str); println!("▶️ started at: {}", start.format("%Y-%m-%d %H:%M:%S %Z").to_string()); println!( "🏁 ends after: {}", @@ -398,3 +410,10 @@ async fn get_relevant_electorate( fn approval_threshold_percent(electorate: u128, turnout: u128) -> f64 { 100f64 / (1f64 + (turnout as f64 / electorate as f64).sqrt()) } + +fn cid_or_global(maybecid: &Option) -> String { + match maybecid { + Some(cid) => format!("{:?}", cid), + None => "global".into(), + } +} diff --git a/node/Cargo.toml b/node/Cargo.toml index ed406600..966b3fcc 100644 --- a/node/Cargo.toml +++ b/node/Cargo.toml @@ -11,7 +11,7 @@ repository = "https://github.com/encointer/encointer-node" # * Align major and minor version with polkadot-sdk major.minor. # * Bump patch version for new releases, and make it the release tag. # * The client should follow this version. -version = "1.14.2" +version = "1.14.3" [[bin]] name = "encointer-node-notee"