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

Function default_client

pyth_feed/client/src/main.rs:116–126  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

114}
115
116fn default_client() -> Client {
117 #[cfg(not(feature = "localnet"))]
118 let host = "https://api.devnet.solana.com";
119 #[cfg(feature = "localnet")]
120 let host = "http://localhost:8899";
121
122 let config_file = solana_cli_config::CONFIG_FILE.as_ref().unwrap().as_str();
123 let config = solana_cli_config::Config::load(config_file).unwrap();
124 let payer = read_keypair_file(&config.keypair_path).unwrap();
125 Client::new(payer, host.into())
126}

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected