Struct fuzz::native_stable_swap::NativeStableSwap
source · [−]pub struct NativeStableSwap {Show 16 fields
pub nonce: u8,
pub initial_amp_factor: u64,
pub target_amp_factor: u64,
pub fees: Fees,
pub swap_account: NativeAccountData,
pub authority_account: NativeAccountData,
pub pool_mint_account: NativeAccountData,
pub pool_token_account: NativeAccountData,
pub token_a_account: NativeAccountData,
pub token_a_mint_account: NativeAccountData,
pub token_b_account: NativeAccountData,
pub token_b_mint_account: NativeAccountData,
pub admin_account: NativeAccountData,
pub admin_fee_a_account: NativeAccountData,
pub admin_fee_b_account: NativeAccountData,
pub token_program_account: NativeAccountData,
}
Fields
nonce: u8
initial_amp_factor: u64
target_amp_factor: u64
fees: Fees
swap_account: NativeAccountData
pool_mint_account: NativeAccountData
pool_token_account: NativeAccountData
token_a_account: NativeAccountData
token_a_mint_account: NativeAccountData
token_b_account: NativeAccountData
token_b_mint_account: NativeAccountData
admin_account: NativeAccountData
admin_fee_a_account: NativeAccountData
admin_fee_b_account: NativeAccountData
token_program_account: NativeAccountData
Implementations
sourceimpl NativeStableSwap
impl NativeStableSwap
pub fn new(
current_ts: i64,
amp_factor: u64,
token_a_amount: u64,
token_b_amount: u64,
fees: Fees
) -> Self
pub fn create_pool_account(
&mut self,
user_account: NativeAccountData
) -> NativeAccountData
pub fn create_token_a_account(
&mut self,
user_account: NativeAccountData,
amount: u64
) -> NativeAccountData
pub fn create_token_b_account(
&mut self,
user_account: NativeAccountData,
amount: u64
) -> NativeAccountData
pub fn swap_a_to_b(
&mut self,
current_ts: i64,
user_account: &mut NativeAccountData,
token_a_account: &mut NativeAccountData,
token_b_account: &mut NativeAccountData,
instruction_data: SwapData
) -> ProgramResult
pub fn swap_b_to_a(
&mut self,
current_ts: i64,
user_account: &mut NativeAccountData,
token_a_account: &mut NativeAccountData,
token_b_account: &mut NativeAccountData,
instruction_data: SwapData
) -> ProgramResult
pub fn deposit(
&mut self,
current_ts: i64,
user_account: &mut NativeAccountData,
token_a_account: &mut NativeAccountData,
token_b_account: &mut NativeAccountData,
pool_token_account: &mut NativeAccountData,
instruction_data: DepositData
) -> ProgramResult
pub fn withdraw(
&mut self,
current_ts: i64,
user_account: &mut NativeAccountData,
token_a_account: &mut NativeAccountData,
token_b_account: &mut NativeAccountData,
pool_token_account: &mut NativeAccountData,
instruction_data: WithdrawData
) -> ProgramResult
pub fn withdraw_one(
&mut self,
current_ts: i64,
user_account: &mut NativeAccountData,
token_account: &mut NativeAccountData,
pool_token_account: &mut NativeAccountData,
token_type: TokenType,
instruction_data: WithdrawOneData
) -> ProgramResult
pub fn ramp_a(
&mut self,
current_ts: i64,
instruction_data: RampAData
) -> ProgramResult
pub fn stop_ramp_a(&mut self, current_ts: i64) -> ProgramResult
Auto Trait Implementations
impl RefUnwindSafe for NativeStableSwap
impl Send for NativeStableSwap
impl Sync for NativeStableSwap
impl Unpin for NativeStableSwap
impl UnwindSafe for NativeStableSwap
Blanket Implementations
impl<T> AbiExample for T
impl<T> AbiExample for T
default fn example() -> T
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more