Trait GlvOps

Source
pub trait GlvOps<C> {
Show 15 methods // Required methods fn initialize_glv( &self, store: &Pubkey, index: u16, market_tokens: impl IntoIterator<Item = Pubkey>, ) -> Result<(TransactionBuilder<'_, C>, Pubkey)>; fn update_glv_market_config( &self, store: &Pubkey, glv_token: &Pubkey, market_token: &Pubkey, max_amount: Option<u64>, max_value: Option<u128>, ) -> TransactionBuilder<'_, C>; fn toggle_glv_market_flag( &self, store: &Pubkey, glv_token: &Pubkey, market_token: &Pubkey, flag: GlvMarketFlag, enable: bool, ) -> TransactionBuilder<'_, C>; fn update_glv_config( &self, store: &Pubkey, glv_token: &Pubkey, params: UpdateGlvParams, ) -> TransactionBuilder<'_, C>; fn insert_glv_market( &self, store: &Pubkey, glv_token: &Pubkey, market_token: &Pubkey, token_program_id: Option<&Pubkey>, ) -> TransactionBuilder<'_, C>; fn remove_glv_market( &self, store: &Pubkey, glv_token: &Pubkey, market_token: &Pubkey, token_program_id: Option<&Pubkey>, ) -> TransactionBuilder<'_, C>; fn create_glv_deposit( &self, store: &Pubkey, glv_token: &Pubkey, market_token: &Pubkey, ) -> CreateGlvDepositBuilder<'_, C>; fn close_glv_deposit( &self, glv_deposit: &Pubkey, ) -> CloseGlvDepositBuilder<'_, C>; fn execute_glv_deposit( &self, oracle: &Pubkey, glv_deposit: &Pubkey, cancel_on_execution_error: bool, ) -> ExecuteGlvDepositBuilder<'_, C>; fn create_glv_withdrawal( &self, store: &Pubkey, glv_token: &Pubkey, market_token: &Pubkey, amount: u64, ) -> CreateGlvWithdrawalBuilder<'_, C>; fn close_glv_withdrawal( &self, glv_withdrawal: &Pubkey, ) -> CloseGlvWithdrawalBuilder<'_, C>; fn execute_glv_withdrawal( &self, oracle: &Pubkey, glv_withdrawal: &Pubkey, cancel_on_execution_error: bool, ) -> ExecuteGlvWithdrawalBuilder<'_, C>; fn create_glv_shift( &self, store: &Pubkey, glv_token: &Pubkey, from_market_token: &Pubkey, to_market_token: &Pubkey, amount: u64, ) -> CreateGlvShiftBuilder<'_, C>; fn close_glv_shift(&self, glv_shift: &Pubkey) -> CloseGlvShiftBuilder<'_, C>; fn execute_glv_shift( &self, oracle: &Pubkey, glv_shift: &Pubkey, cancel_on_execution_error: bool, ) -> ExecuteGlvShiftBuilder<'_, C>;
}
Expand description

Glv Operations.

Required Methods§

Source

fn initialize_glv( &self, store: &Pubkey, index: u16, market_tokens: impl IntoIterator<Item = Pubkey>, ) -> Result<(TransactionBuilder<'_, C>, Pubkey)>

Initialize GLV.

Source

fn update_glv_market_config( &self, store: &Pubkey, glv_token: &Pubkey, market_token: &Pubkey, max_amount: Option<u64>, max_value: Option<u128>, ) -> TransactionBuilder<'_, C>

GLV Update Market Config.

Source

fn toggle_glv_market_flag( &self, store: &Pubkey, glv_token: &Pubkey, market_token: &Pubkey, flag: GlvMarketFlag, enable: bool, ) -> TransactionBuilder<'_, C>

GLV toggle market flag.

Source

fn update_glv_config( &self, store: &Pubkey, glv_token: &Pubkey, params: UpdateGlvParams, ) -> TransactionBuilder<'_, C>

Update GLV config.

Source

fn insert_glv_market( &self, store: &Pubkey, glv_token: &Pubkey, market_token: &Pubkey, token_program_id: Option<&Pubkey>, ) -> TransactionBuilder<'_, C>

Insert GLV market.

Source

fn remove_glv_market( &self, store: &Pubkey, glv_token: &Pubkey, market_token: &Pubkey, token_program_id: Option<&Pubkey>, ) -> TransactionBuilder<'_, C>

Remove GLV market.

Source

fn create_glv_deposit( &self, store: &Pubkey, glv_token: &Pubkey, market_token: &Pubkey, ) -> CreateGlvDepositBuilder<'_, C>

Create a GLV deposit.

Source

fn close_glv_deposit( &self, glv_deposit: &Pubkey, ) -> CloseGlvDepositBuilder<'_, C>

Close a GLV deposit.

Source

fn execute_glv_deposit( &self, oracle: &Pubkey, glv_deposit: &Pubkey, cancel_on_execution_error: bool, ) -> ExecuteGlvDepositBuilder<'_, C>

Execute the given GLV deposit.

Source

fn create_glv_withdrawal( &self, store: &Pubkey, glv_token: &Pubkey, market_token: &Pubkey, amount: u64, ) -> CreateGlvWithdrawalBuilder<'_, C>

Source

fn close_glv_withdrawal( &self, glv_withdrawal: &Pubkey, ) -> CloseGlvWithdrawalBuilder<'_, C>

Close a GLV withdrawal.

Source

fn execute_glv_withdrawal( &self, oracle: &Pubkey, glv_withdrawal: &Pubkey, cancel_on_execution_error: bool, ) -> ExecuteGlvWithdrawalBuilder<'_, C>

Execute the given GLV deposit.

Source

fn create_glv_shift( &self, store: &Pubkey, glv_token: &Pubkey, from_market_token: &Pubkey, to_market_token: &Pubkey, amount: u64, ) -> CreateGlvShiftBuilder<'_, C>

Source

fn close_glv_shift(&self, glv_shift: &Pubkey) -> CloseGlvShiftBuilder<'_, C>

Source

fn execute_glv_shift( &self, oracle: &Pubkey, glv_shift: &Pubkey, cancel_on_execution_error: bool, ) -> ExecuteGlvShiftBuilder<'_, C>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<C: Deref<Target = impl Signer> + Clone> GlvOps<C> for Client<C>