#[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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Is initialized

The length, in bytes, of the packed representation

Get the packed length

Unpack from slice and check if initialized

Unpack from slice without checking if initialized

Pack into slice

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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.