DynamicBondingCurvePoolData

Struct DynamicBondingCurvePoolData 

Source
pub struct DynamicBondingCurvePoolData {
Show 32 fields pub config: Pubkey, pub creator: Pubkey, pub base_mint: Pubkey, pub base_vault: Pubkey, pub quote_vault: Pubkey, pub base_reserve: u64, pub quote_reserve: u64, pub protocol_base_fee: u64, pub protocol_quote_fee: u64, pub partner_base_fee: u64, pub partner_quote_fee: u64, pub creator_base_fee: u64, pub creator_quote_fee: u64, pub sqrt_price: u128, pub activation_point: u64, pub finish_curve_timestamp: u64, pub pool_type: u8, pub is_migrated: bool, pub is_partner_withdraw_surplus: bool, pub is_protocol_withdraw_surplus: bool, pub migration_progress: u8, pub is_withdraw_leftover: bool, pub is_creator_withdraw_surplus: bool, pub migration_fee_withdraw_status: u8, pub total_protocol_base_fee: u64, pub total_protocol_quote_fee: u64, pub total_trading_base_fee: u64, pub total_trading_quote_fee: u64, pub creation_fee_bits: u8, pub has_creation_fee: bool, pub creation_fee_claimed: bool, pub volatility_tracker: VolatilityTrackerData,
}

Fields§

§config: Pubkey§creator: Pubkey§base_mint: Pubkey§base_vault: Pubkey§quote_vault: Pubkey§base_reserve: u64§quote_reserve: u64§protocol_base_fee: u64§protocol_quote_fee: u64§partner_base_fee: u64§partner_quote_fee: u64§creator_base_fee: u64§creator_quote_fee: u64§sqrt_price: u128§activation_point: u64§finish_curve_timestamp: u64§pool_type: u8§is_migrated: bool§is_partner_withdraw_surplus: bool§is_protocol_withdraw_surplus: bool§migration_progress: u8§is_withdraw_leftover: bool§is_creator_withdraw_surplus: bool§migration_fee_withdraw_status: u8§total_protocol_base_fee: u64§total_protocol_quote_fee: u64§total_trading_base_fee: u64§total_trading_quote_fee: u64§creation_fee_bits: u8§has_creation_fee: bool§creation_fee_claimed: bool§volatility_tracker: VolatilityTrackerData

Implementations§

Source§

impl DynamicBondingCurvePoolData

Source

pub fn get_pool_type_str(&self) -> &'static str

Get pool type as string

Source

pub fn get_migration_progress_str(&self) -> &'static str

Get migration progress as string

Source

pub fn has_creation_fee(&self) -> bool

Get creation fee status

Source

pub fn creation_fee_claimed(&self) -> bool

Get creation fee claimed status

Source

pub fn eligible_to_withdraw_migration_fee(&self, mask: u8) -> bool

Get migration fee withdraw eligibility

Source

pub fn is_curve_complete(&self, migration_threshold: u64) -> bool

Check if curve is complete

Source

pub fn get_protocol_and_trading_base_fee(&self) -> u64

Get protocol and trading base fee total

Source

pub fn get_total_surplus(&self, migration_threshold: u64) -> Option<u64>

Get total surplus

Source

pub fn get_price(&self) -> f64

Get price from sqrt price

Source

pub fn get_volatility_accumulator_percentage(&self) -> f64

Get volatility accumulator as percentage

Source

pub fn get_protocol_fees(&self) -> (u64, u64)

Get protocol fees

Source

pub fn get_partner_fees(&self) -> (u64, u64)

Get partner fees

Source

pub fn get_creator_fees(&self) -> (u64, u64)

Get creator fees

Source

pub fn get_reserves(&self) -> (u64, u64)

Get all reserves

Source

pub fn is_migrated(&self) -> bool

Check if pool is migrated

Source

pub fn can_partner_withdraw_surplus(&self) -> bool

Check if partner can withdraw surplus

Source

pub fn can_protocol_withdraw_surplus(&self) -> bool

Check if protocol can withdraw surplus

Source

pub fn can_creator_withdraw_surplus(&self) -> bool

Check if creator can withdraw surplus

Source

pub fn can_withdraw_leftover(&self) -> bool

Check if leftover can be withdrawn

Source

pub fn get_metrics(&self) -> PoolMetricsData

Get pool metrics

Trait Implementations§

Source§

impl Clone for DynamicBondingCurvePoolData

Source§

fn clone(&self) -> DynamicBondingCurvePoolData

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DynamicBondingCurvePoolData

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

Source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

Source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

Source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more