MCPcopy Create free account
hub / github.com/clockwork-xyz/examples / default_client

Function default_client

openbook_dca/client/src/utils.rs:98–108  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

96}
97
98pub fn default_client() -> Client {
99 #[cfg(not(feature = "localnet"))]
100 let host = "https://api.mainnet-beta.solana.com";
101 #[cfg(feature = "localnet")]
102 let host = "http://localhost:8899";
103
104 let config_file = solana_cli_config::CONFIG_FILE.as_ref().unwrap().as_str();
105 let config = solana_cli_config::Config::load(config_file).unwrap();
106 let payer = read_keypair_file(&config.keypair_path).unwrap();
107 Client::new(payer, host.into())
108}
109
110pub fn print_explorer_link(address: Pubkey, label: String) -> ClientResult<()> {
111 println!(

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected