pub trait ExecuteWithPythPrices<'a, C> {
// Required methods
fn set_execution_fee(&mut self, lamports: u64);
fn context(&mut self) -> impl Future<Output = Result<PythPullOracleContext>>;
fn build_rpc_with_price_updates(
&mut self,
price_updates: Prices,
) -> impl Future<Output = Result<Vec<TransactionBuilder<'a, C, ()>>>>;
// Provided methods
fn should_estiamte_execution_fee(&self) -> bool { ... }
fn execute_with_options<S>(
&mut self,
txns: WithPythPrices<'_, C>,
compute_unit_price_micro_lamports: Option<u64>,
skip_preflight: bool,
enable_tracing: bool,
) -> impl Future<Output = Result<()>>
where C: Deref<Target = S> + Clone,
S: Signer { ... }
fn execute<S>(
&mut self,
txns: WithPythPrices<'_, C>,
skip_preflight: bool,
) -> impl Future<Output = Result<()>>
where C: Deref<Target = S> + Clone,
S: Signer { ... }
}
Expand description
Execute with pyth prices.
Required Methods§
Sourcefn set_execution_fee(&mut self, lamports: u64)
fn set_execution_fee(&mut self, lamports: u64)
Set execution fee.
Sourcefn context(&mut self) -> impl Future<Output = Result<PythPullOracleContext>>
fn context(&mut self) -> impl Future<Output = Result<PythPullOracleContext>>
Get the oracle context.
Sourcefn build_rpc_with_price_updates(
&mut self,
price_updates: Prices,
) -> impl Future<Output = Result<Vec<TransactionBuilder<'a, C, ()>>>>
fn build_rpc_with_price_updates( &mut self, price_updates: Prices, ) -> impl Future<Output = Result<Vec<TransactionBuilder<'a, C, ()>>>>
Build RPC requests with price updates.
Provided Methods§
Sourcefn should_estiamte_execution_fee(&self) -> bool
fn should_estiamte_execution_fee(&self) -> bool
Whether to estimate the execution fee.
Sourcefn execute_with_options<S>(
&mut self,
txns: WithPythPrices<'_, C>,
compute_unit_price_micro_lamports: Option<u64>,
skip_preflight: bool,
enable_tracing: bool,
) -> impl Future<Output = Result<()>>
fn execute_with_options<S>( &mut self, txns: WithPythPrices<'_, C>, compute_unit_price_micro_lamports: Option<u64>, skip_preflight: bool, enable_tracing: bool, ) -> impl Future<Output = Result<()>>
Execute with options
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.