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§
Sourcefn initialize_gt(
&self,
store: &Pubkey,
decimals: u8,
initial_minting_cost: u128,
grow_factor: u128,
grow_step: u64,
ranks: Vec<u64>,
) -> TransactionBuilder<'_, C>
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.
Sourcefn gt_set_order_fee_discount_factors(
&self,
store: &Pubkey,
factors: Vec<u128>,
) -> TransactionBuilder<'_, C>
fn gt_set_order_fee_discount_factors( &self, store: &Pubkey, factors: Vec<u128>, ) -> TransactionBuilder<'_, C>
Configurate GT order fee dicounts.
Sourcefn gt_set_referral_reward_factors(
&self,
store: &Pubkey,
factors: Vec<u128>,
) -> TransactionBuilder<'_, C>
fn gt_set_referral_reward_factors( &self, store: &Pubkey, factors: Vec<u128>, ) -> TransactionBuilder<'_, C>
Configurate GT referral rewards
Sourcefn gt_set_exchange_time_window(
&self,
store: &Pubkey,
window: u32,
) -> TransactionBuilder<'_, C>
fn gt_set_exchange_time_window( &self, store: &Pubkey, window: u32, ) -> TransactionBuilder<'_, C>
Configurate the time window size for GT exchange.
Sourcefn prepare_gt_exchange_vault_with_time_window_index(
&self,
store: &Pubkey,
time_window_index: i64,
time_window: u32,
) -> TransactionBuilder<'_, C, Pubkey>
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.
Sourcefn confirm_gt_exchange_vault(
&self,
store: &Pubkey,
vault: &Pubkey,
) -> TransactionBuilder<'_, C>
fn confirm_gt_exchange_vault( &self, store: &Pubkey, vault: &Pubkey, ) -> TransactionBuilder<'_, C>
Confirm the given GT exchange vault.
Sourcefn request_gt_exchange_with_time_window_index(
&self,
store: &Pubkey,
time_window_index: i64,
time_window: u32,
amount: u64,
) -> TransactionBuilder<'_, C>
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.
Sourcefn close_gt_exchange(
&self,
store: &Pubkey,
exchange: &Pubkey,
hint_owner: Option<&Pubkey>,
hint_vault: Option<&Pubkey>,
) -> impl Future<Output = Result<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>>>
Close a confirmed GT exchange.
Provided Methods§
Sourcefn prepare_gt_exchange_vault_with_time_window(
&self,
store: &Pubkey,
time_window: u32,
) -> Result<TransactionBuilder<'_, C, Pubkey>>
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.
Sourcefn request_gt_exchange_with_time_window(
&self,
store: &Pubkey,
time_window: u32,
amount: u64,
) -> Result<TransactionBuilder<'_, C>>
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.