Struct WhirlpoolDeployment
pub struct WhirlpoolDeployment { /* private fields */ }Expand description
Identifies a deployed whirlpool program and the config account it operates against.
PDA derivation and instruction targeting both depend on these two values, so they are
bundled together to keep them consistent. Pass a WhirlpoolDeployment (or None to fall back
to WhirlpoolDeployment::default, which is the mutable mainnet program) to the SDK functions
and PDA helpers that accept it.
Use the named constructors (WhirlpoolDeployment::mainnet, WhirlpoolDeployment::devnet,
WhirlpoolDeployment::mainnet_immutable) for the official deployments, or
WhirlpoolDeployment::custom to point at a fork or local deployment.
Implementations§
§impl WhirlpoolDeployment
impl WhirlpoolDeployment
pub fn id(&self) -> Address
pub fn id(&self) -> Address
Returns the program id of the targeted whirlpool program.
pub fn config_address(&self) -> Address
pub fn config_address(&self) -> Address
Returns the WhirlpoolsConfig account address that pairs with this program.
pub fn mainnet() -> WhirlpoolDeployment
pub fn mainnet() -> WhirlpoolDeployment
The mutable whirlpool program on Solana Mainnet, paired with its mainnet config account.
pub fn devnet() -> WhirlpoolDeployment
pub fn devnet() -> WhirlpoolDeployment
The mutable whirlpool program on Solana Devnet, paired with its devnet config account.
pub fn mainnet_immutable() -> WhirlpoolDeployment
pub fn mainnet_immutable() -> WhirlpoolDeployment
The immutable whirlpool program on Solana Mainnet, paired with its mainnet config account.
pub fn custom(program_id: Address, config: Address) -> WhirlpoolDeployment
pub fn custom(program_id: Address, config: Address) -> WhirlpoolDeployment
Targets an arbitrary program_id / config pair — useful for forks, local validators,
or any deployment not covered by the named constructors.
Trait Implementations§
§impl Clone for WhirlpoolDeployment
impl Clone for WhirlpoolDeployment
§fn clone(&self) -> WhirlpoolDeployment
fn clone(&self) -> WhirlpoolDeployment
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for WhirlpoolDeployment
impl Debug for WhirlpoolDeployment
§impl Default for WhirlpoolDeployment
impl Default for WhirlpoolDeployment
§fn default() -> WhirlpoolDeployment
fn default() -> WhirlpoolDeployment
Defaults to the mutable mainnet deployment (WhirlpoolDeployment::mainnet).
impl Copy for WhirlpoolDeployment
Auto Trait Implementations§
impl Freeze for WhirlpoolDeployment
impl RefUnwindSafe for WhirlpoolDeployment
impl Send for WhirlpoolDeployment
impl Sync for WhirlpoolDeployment
impl Unpin for WhirlpoolDeployment
impl UnwindSafe for WhirlpoolDeployment
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more