Trait GtOps

Source
pub trait GtOps<C> {
    // Required methods
    fn initialize_gt(
        &self,
        store: &Pubkey,
        decimals: u8,
        initial_minting_cost: u128,
        grow_factor: u128,
        grow_step: u64,
        ranks: Vec<u64>,
    ) -> TransactionBuilder<'_, C>;
    fn gt_set_order_fee_discount_factors(
        &self,
        store: &Pubkey,
        factors: Vec<u128>,
    ) -> TransactionBuilder<'_, C>;
    fn gt_set_referral_reward_factors(
        &self,
        store: &Pubkey,
        factors: Vec<u128>,
    ) -> TransactionBuilder<'_, C>;
    fn gt_set_exchange_time_window(
        &self,
        store: &Pubkey,
        window: u32,
    ) -> TransactionBuilder<'_, C>;
    fn prepare_gt_exchange_vault_with_time_window_index(
        &self,
        store: &Pubkey,
        time_window_index: i64,
        time_window: u32,
    ) -> TransactionBuilder<'_, C, Pubkey>;
    fn confirm_gt_exchange_vault(
        &self,
        store: &Pubkey,
        vault: &Pubkey,
    ) -> TransactionBuilder<'_, C>;
    fn request_gt_exchange_with_time_window_index(
        &self,
        store: &Pubkey,
        time_window_index: i64,
        time_window: u32,
        amount: u64,
    ) -> TransactionBuilder<'_, C>;
    fn close_gt_exchange(
        &self,
        store: &Pubkey,
        exchange: &Pubkey,
        hint_owner: Option<&Pubkey>,
        hint_vault: Option<&Pubkey>,
    ) -> impl Future<Output = Result<TransactionBuilder<'_, C>>>;

    // Provided methods
    fn prepare_gt_exchange_vault_with_time_window(
        &self,
        store: &Pubkey,
        time_window: u32,
    ) -> Result<TransactionBuilder<'_, C, Pubkey>> { ... }
    fn request_gt_exchange_with_time_window(
        &self,
        store: &Pubkey,
        time_window: u32,
        amount: u64,
    ) -> Result<TransactionBuilder<'_, C>> { ... }
}
Expand description

GT Operations.

Required Methods§

Source

fn initialize_gt( &self, store: &Pubkey, decimals: u8, initial_minting_cost: u128, grow_factor: u128, grow_step: u64, ranks: Vec<u64>, ) -> TransactionBuilder<'_, C>

Initialize GT Mint.

Source

fn gt_set_order_fee_discount_factors( &self, store: &Pubkey, factors: Vec<u128>, ) -> TransactionBuilder<'_, C>

Configurate GT order fee dicounts.

Source

fn gt_set_referral_reward_factors( &self, store: &Pubkey, factors: Vec<u128>, ) -> TransactionBuilder<'_, C>

Configurate GT referral rewards

Source

fn gt_set_exchange_time_window( &self, store: &Pubkey, window: u32, ) -> TransactionBuilder<'_, C>

Configurate the time window size for GT exchange.

Source

fn prepare_gt_exchange_vault_with_time_window_index( &self, store: &Pubkey, time_window_index: i64, time_window: u32, ) -> TransactionBuilder<'_, C, Pubkey>

Initialize GT exchange vault with the given time window index.

Source

fn confirm_gt_exchange_vault( &self, store: &Pubkey, vault: &Pubkey, ) -> TransactionBuilder<'_, C>

Confirm the given GT exchange vault.

Source

fn request_gt_exchange_with_time_window_index( &self, store: &Pubkey, time_window_index: i64, time_window: u32, amount: u64, ) -> TransactionBuilder<'_, C>

Request GT exchange with the given time window index.

Source

fn close_gt_exchange( &self, store: &Pubkey, exchange: &Pubkey, hint_owner: Option<&Pubkey>, hint_vault: Option<&Pubkey>, ) -> impl Future<Output = Result<TransactionBuilder<'_, C>>>

Close a confirmed GT exchange.

Provided Methods§

Source

fn prepare_gt_exchange_vault_with_time_window( &self, store: &Pubkey, time_window: u32, ) -> Result<TransactionBuilder<'_, C, Pubkey>>

Prepare GT exchange vault with the given time window.

Source

fn request_gt_exchange_with_time_window( &self, store: &Pubkey, time_window: u32, amount: u64, ) -> Result<TransactionBuilder<'_, C>>

Request GT exchange with the given time window.

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> GtOps<C> for Client<C>