Skip to content

Commit

Permalink
pcli stub out tx lqt-vote
Browse files Browse the repository at this point in the history
  • Loading branch information
cronokirby committed Feb 8, 2025
1 parent f7a3741 commit c7b886b
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
6 changes: 6 additions & 0 deletions crates/bin/pcli/src/command/tx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ use ibc_types::core::{
client::Height as IbcHeight,
};
use ibc_types::lightclients::tendermint::client_state::ClientState as TendermintClientState;
use lqt_vote::LqtVoteCmd;
use rand_core::OsRng;
use regex::Regex;

Expand Down Expand Up @@ -82,6 +83,7 @@ use clap::Parser;

mod auction;
mod liquidity_position;
mod lqt_vote;
mod proposal;
mod replicate;

Expand Down Expand Up @@ -311,6 +313,8 @@ pub enum TxCmd {
/// The transaction to be broadcast
transaction: PathBuf,
},
#[clap(display_order = 700)]
LqtVote(LqtVoteCmd),
}

/// Vote on a governance proposal.
Expand Down Expand Up @@ -368,6 +372,7 @@ impl TxCmd {
TxCmd::Auction(_) => false,
TxCmd::Broadcast { .. } => false,
TxCmd::RegisterForwardingAccount { .. } => false,
TxCmd::LqtVote(cmd) => cmd.offline(),
}
}

Expand Down Expand Up @@ -1553,6 +1558,7 @@ impl TxCmd {

println!("Noble response: {:?}", r);
}
TxCmd::LqtVote(cmd) => cmd.exec(app).await?,
}

Ok(())
Expand Down
20 changes: 20 additions & 0 deletions crates/bin/pcli/src/command/tx/lqt_vote.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
use crate::App;

/// Vote in the current round of the liquidity tournament.
///
/// This will plan a transaction which directs all available voting power to a single asset.
#[derive(Debug, clap::Parser)]
pub struct LqtVoteCmd {
/// The denom string for the asset being voted for.
vote: String,
}

impl LqtVoteCmd {
pub fn offline(&self) -> bool {
false
}

pub async fn exec(&self, _app: &mut App) -> anyhow::Result<()> {
unimplemented!()
}
}

0 comments on commit c7b886b

Please sign in to comment.