Struct dex_v4::state::DexState

source ·
#[repr(C)]
pub struct DexState {
Show 19 fields pub tag: u64, pub base_mint: Pubkey, pub quote_mint: Pubkey, pub base_vault: Pubkey, pub quote_vault: Pubkey, pub orderbook: Pubkey, pub admin: Pubkey, pub creation_timestamp: i64, pub base_volume: u64, pub quote_volume: u64, pub accumulated_fees: u64, pub min_base_order_size: u64, pub royalties_bps: u64, pub accumulated_royalties: u64, pub base_currency_multiplier: u64, pub quote_currency_multiplier: u64, pub signer_nonce: u8, pub fee_type: u8, pub _padding: [u8; 6],
}
Expand description

The primary market state object

Fields

tag: u64

This u64 is used to verify and version the dex state

base_mint: Pubkey

The mint key of the base token

quote_mint: Pubkey

The mint key of the quote token

base_vault: Pubkey

The SPL token account holding the market’s base tokens

quote_vault: Pubkey

The SPL token account holding the market’s quote tokens

orderbook: Pubkey

The asset agnostic orderbook address

admin: Pubkey

The market admin which can recuperate all transaction fees

creation_timestamp: i64

The market’s creation timestamp on the Solana runtime clock.

base_volume: u64

The market’s total historical volume in base token

quote_volume: u64

The market’s total historical volume in quote token

accumulated_fees: u64

The market’s fees which are available for extraction by the market admin

min_base_order_size: u64

The market’s minimum allowed order size in base token amount

royalties_bps: u64

Royalties bps

accumulated_royalties: u64

Accumulated royalties fees

base_currency_multiplier: u64

The base currency multiplier

quote_currency_multiplier: u64

The quote currency multiplier

signer_nonce: u8

The signer nonce is necessary for the market to perform as a signing entity

fee_type: u8

Fee type (e.g. default or stable)

_padding: [u8; 6]

Padding

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Self must have the same layout as the specified Bits except for the possible invalid bit patterns being checked during is_valid_bit_pattern. Read more
If this function returns true, then it must be valid to reinterpret bits as &Self. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.