Struct stable_swap::state::SwapInfo [−][src]
#[repr(C)]pub struct SwapInfo {Show 14 fields
pub is_initialized: bool,
pub is_paused: bool,
pub nonce: u8,
pub initial_amp_factor: u64,
pub target_amp_factor: u64,
pub start_ramp_ts: i64,
pub stop_ramp_ts: i64,
pub future_admin_deadline: i64,
pub future_admin_key: Pubkey,
pub admin_key: Pubkey,
pub token_a: SwapTokenInfo,
pub token_b: SwapTokenInfo,
pub pool_mint: Pubkey,
pub fees: Fees,
}
Expand description
Program states.
Fields
is_initialized: bool
Initialized state
is_paused: bool
Paused state
nonce: u8
Nonce used in program address The program address is created deterministically with the nonce, swap program id, and swap account pubkey. This program address has authority over the swap’s token A account, token B account, and pool token mint.
initial_amp_factor: u64
Initial amplification coefficient (A)
target_amp_factor: u64
Target amplification coefficient (A)
start_ramp_ts: i64
Ramp A start timestamp
stop_ramp_ts: i64
Ramp A stop timestamp
future_admin_deadline: i64
Deadline to transfer admin control to future_admin_key
future_admin_key: Pubkey
Public key of the admin account to be applied
admin_key: Pubkey
Public key of admin account to execute admin instructions
token_a: SwapTokenInfo
Token A
token_b: SwapTokenInfo
Token B
pool_mint: Pubkey
Pool tokens are issued when A or B tokens are deposited. Pool tokens can be withdrawn back to the original A or B token.
fees: Fees
Fees
Trait Implementations
Is initialized
Get the packed length
Unpack from slice and check if initialized
Unpack from slice without checking if initialized
type Error = ProgramError
type Error = ProgramError
The type returned in the event of a conversion error.
Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for SwapInfo
impl UnwindSafe for SwapInfo
Blanket Implementations
pub default fn example() -> T
Mutably borrows from an owned value. Read more