tensor_eigen/commands/
mod.rs

1mod decode;
2mod derive;
3mod download;
4mod eigen;
5mod error;
6mod fees;
7mod ids;
8mod pool;
9mod whitelist;
10
11pub use decode::*;
12pub use derive::*;
13pub use download::*;
14pub use eigen::*;
15pub use error::*;
16pub use fees::*;
17pub use ids::*;
18pub use pool::*;
19pub use whitelist::*;
20
21pub use crate::{discriminators::Discriminator, setup::CliConfig, transaction};
22
23use std::path::PathBuf;
24
25use anyhow::{anyhow, Result};
26use solana_sdk::{account::Account, pubkey::Pubkey};
27
28#[macro_export]
29macro_rules! transaction {
30    ($signers:expr, $instructions:expr, $client:expr) => {
31        Transaction::new_signed_with_payer(
32            $instructions,
33            Some(&$signers[0].pubkey()),
34            $signers,
35            $client.get_latest_blockhash()?,
36        )
37    };
38}
39
40pub const fn pubkey(base58str: &str) -> Pubkey {
41    Pubkey::new_from_array(five8_const::decode_32_const(base58str))
42}
43
44pub const TOKEN_PROGRAM_IDS: &[Pubkey] = &[
45    pubkey("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"),
46    pubkey("TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"),
47];