use rust_decimal::Decimal;
use crate::decimals::PositiveDecimal;
use crate::time::UnixTimestampMicros;
use crate::types::{
AssetId, BorrowType, ClientOrderId, FeeTier, MarketId, OrderId, OrderType, RepayType, Side,
TakeFromInsuranceFundReason, TradeId, TriggerDirection, TriggerOrderId, TriggerPriceCondition,
TwapId,
};
#[derive(
borsh::BorshDeserialize,
borsh::BorshSerialize,
serde::Serialize,
serde::Deserialize,
PartialEq,
Clone,
Debug,
schemars::JsonSchema,
strum::AsRefStr,
strum::Display,
)]
#[serde(rename_all = "snake_case")]
#[schemars(rename = "FillType")]
pub enum FillType {
Orderbook,
Liquidation,
BackstopLiquidation,
#[serde(rename = "adl")]
ADL,
}
#[derive(
borsh::BorshDeserialize,
borsh::BorshSerialize,
serde::Serialize,
serde::Deserialize,
PartialEq,
Eq,
Clone,
Copy,
Debug,
schemars::JsonSchema,
strum::AsRefStr,
strum::Display,
)]
#[serde(rename_all = "snake_case")]
#[schemars(rename = "CancelReason")]
pub enum CancelReason {
UserRequested,
Amended,
Replaced,
AdminRequested,
MarketPruned,
MarketHalted,
MarginCall,
Liquidation,
BackstopLiquidation,
ReduceOnlyZeroSize,
OpeningTriggerOrphaned,
TpslSiblingCancelled,
TriggerExecutionFailed,
TwapCompleted,
OrderbookOverflow,
}
#[derive(
borsh::BorshDeserialize,
borsh::BorshSerialize,
serde::Serialize,
serde::Deserialize,
PartialEq,
Clone,
Debug,
schemars::JsonSchema,
strum::AsRefStr,
strum::Display,
)]
#[serde(rename_all = "snake_case")]
#[schemars(rename = "Event")]
pub enum Event<Address> {
InitializePerpMarket {
market_id: MarketId,
execution_timestamp: UnixTimestampMicros,
},
UpdateMarket {
market_id: MarketId,
execution_timestamp: UnixTimestampMicros,
},
DeleteMarket {
market_id: MarketId,
execution_timestamp: UnixTimestampMicros,
},
InitializeBorrowLendPool {
asset_id: AssetId,
execution_timestamp: UnixTimestampMicros,
},
UpdateBorrowLendPool {
asset_id: AssetId,
execution_timestamp: UnixTimestampMicros,
},
Deposit {
user_address: Address,
asset_id: AssetId,
amount: PositiveDecimal,
amount_notional: PositiveDecimal,
execution_timestamp: UnixTimestampMicros,
},
PlaceOrder {
user_address: Address,
order_id: OrderId,
market_id: MarketId,
price: PositiveDecimal,
size: PositiveDecimal,
side: Side,
order_type: OrderType,
source: OrderSource,
execution_timestamp: UnixTimestampMicros,
client_order_id: Option<ClientOrderId>,
},
CancelOrder {
user_address: Address,
order_id: OrderId,
market_id: MarketId,
execution_timestamp: UnixTimestampMicros,
client_order_id: Option<ClientOrderId>,
},
ForceCancelOrders {
user_address: Address,
cancelled_orders: Vec<(MarketId, Vec<OrderId>)>,
cancelled_trigger_orders: Vec<(MarketId, Vec<TriggerOrderId>)>,
execution_timestamp: UnixTimestampMicros,
},
CreateTriggerOrder {
user_address: Address,
trigger_order_id: TriggerOrderId,
market_id: MarketId,
order_price: PositiveDecimal,
trigger_price: PositiveDecimal,
trigger_direction: TriggerDirection,
price_condition: TriggerPriceCondition,
size: Option<PositiveDecimal>,
side: Side,
order_type: OrderType,
execution_timestamp: UnixTimestampMicros,
},
ActivateTriggerOrder {
trigger_order_id: TriggerOrderId,
market_id: MarketId,
price_condition: TriggerPriceCondition,
execution_timestamp: UnixTimestampMicros,
},
EditTriggerOrder {
user_address: Address,
trigger_order_id: TriggerOrderId,
size_added: Option<PositiveDecimal>,
execution_timestamp: UnixTimestampMicros,
},
TryExecuteTriggerOrder {
user_address: Address,
trigger_order_id: TriggerOrderId,
execution_timestamp: UnixTimestampMicros,
},
SuccessfulExecuteTriggerOrder {
user_address: Address,
trigger_order_id: TriggerOrderId,
market_id: MarketId,
order_price: PositiveDecimal,
trigger_price: PositiveDecimal,
trigger_direction: TriggerDirection,
price_condition: TriggerPriceCondition,
executed_size: PositiveDecimal,
side: Side,
order_type: OrderType,
execution_timestamp: UnixTimestampMicros,
},
FailureExecuteTriggerOrder {
user_address: Address,
trigger_order_id: TriggerOrderId,
reason: String,
execution_timestamp: UnixTimestampMicros,
},
CancelTriggerOrder {
user_address: Address,
trigger_order_id: TriggerOrderId,
market_id: MarketId,
execution_timestamp: UnixTimestampMicros,
},
RejectTriggerOrder {
user_address: Address,
trigger_order_id: TriggerOrderId,
reason: String,
execution_timestamp: UnixTimestampMicros,
},
ReactivateTriggerOrder {
user_address: Address,
trigger_order_id: TriggerOrderId,
reason: String,
execution_timestamp: UnixTimestampMicros,
},
CreateTwapOrder {
user_address: Address,
twap_id: TwapId,
market_id: MarketId,
total_size: PositiveDecimal,
total_duration_seconds: u64,
side: Side,
reduce_only: bool,
},
SuccessfulExecuteTwapOrder {
user_address: Address,
twap_id: TwapId,
market_id: MarketId,
order_price: PositiveDecimal,
executed_size: PositiveDecimal,
side: Side,
order_type: OrderType,
execution_timestamp: UnixTimestampMicros,
},
RejectTwapOrder {
user_address: Address,
twap_id: TwapId,
reason: String,
execution_timestamp: UnixTimestampMicros,
},
CancelTwap {
user_address: Address,
twap_id: TwapId,
execution_timestamp: UnixTimestampMicros,
},
UpdatePremiumIndex {
market_id: MarketId,
premium_index: Decimal,
execution_timestamp: UnixTimestampMicros,
},
UpdatePremiumIndexFailed {
market_id: MarketId,
error: String,
execution_timestamp: UnixTimestampMicros,
},
UpdateFundingRate {
market_id: MarketId,
funding_rate: Decimal,
execution_timestamp: UnixTimestampMicros,
},
UpdateFundingRateFailed {
market_id: MarketId,
error: String,
execution_timestamp: UnixTimestampMicros,
},
ApplyFundingRate {
user_address: Address,
market_id: MarketId,
funding_applied: Decimal,
execution_timestamp: UnixTimestampMicros,
},
ApplyFundingRateFailed {
user_address: Address,
error: String,
execution_timestamp: UnixTimestampMicros,
},
UpdateOraclePrice {
asset_id: AssetId,
oracle_price: PositiveDecimal,
publish_timestamp: UnixTimestampMicros,
execution_timestamp: UnixTimestampMicros,
},
UpdateMarkPrice {
market_id: MarketId,
median_cex_price: PositiveDecimal,
diff_ema: Decimal,
publish_timestamp: UnixTimestampMicros,
execution_timestamp: UnixTimestampMicros,
},
UpdateOraclePriceFailed {
asset_id: AssetId,
error: String,
execution_timestamp: UnixTimestampMicros,
},
UpdateMarkPriceFailed {
market_id: MarketId,
error: String,
execution_timestamp: UnixTimestampMicros,
},
Borrow {
user_address: Address,
asset_id: AssetId,
amount: PositiveDecimal,
borrow_type: BorrowType,
execution_timestamp: UnixTimestampMicros,
},
RepayBorrow {
user_address: Address,
asset_id: AssetId,
amount: PositiveDecimal,
repay_type: RepayType,
execution_timestamp: UnixTimestampMicros,
},
UsdcUnrealizedLossBorrowRebalance {
user_address: Address,
cached_unrealized_loss: PositiveDecimal,
internal_repayment: PositiveDecimal,
execution_timestamp: UnixTimestampMicros,
},
Withdraw {
user_address: Address,
asset_id: AssetId,
amount: PositiveDecimal,
amount_notional: PositiveDecimal,
fee: PositiveDecimal,
execution_timestamp: UnixTimestampMicros,
},
Trade {
user_address: Address,
market_id: MarketId,
price: PositiveDecimal,
size: PositiveDecimal,
side: Side,
order_id: OrderId,
is_maker: bool,
is_full_fill: bool,
realized_pnl: Decimal,
fee: Decimal,
net_fee: PositiveDecimal, trade_id: TradeId,
is_liquidation: bool,
client_order_id: Option<ClientOrderId>,
execution_timestamp: UnixTimestampMicros,
fee_asset: AssetId,
},
ForceSettlePerpPosition {
user_address: Address,
market_id: MarketId,
price: PositiveDecimal,
size: PositiveDecimal,
side: Side,
realized_pnl: Decimal,
execution_timestamp: UnixTimestampMicros,
},
CleanupUserMarketState {
user_address: Address,
market_id: MarketId,
execution_timestamp: UnixTimestampMicros,
},
LiquidateBorrowLendLiability {
liquidatee_address: Address,
liquidator_address: Address,
liability_asset_id: AssetId,
collateral_asset_id: AssetId,
liability_oracle_price: PositiveDecimal,
liability_size: PositiveDecimal,
collateral_size: PositiveDecimal,
liquidator_reward: PositiveDecimal,
protocol_reward: PositiveDecimal,
execution_timestamp: UnixTimestampMicros,
},
BackstopLiquidatePerpPosition {
liquidatee_address: Address,
liquidator_address: Address,
market_id: MarketId,
mark_price: PositiveDecimal,
size: PositiveDecimal,
side: Side,
realized_pnl: Decimal,
liquidator_reward: PositiveDecimal,
protocol_reward: PositiveDecimal,
execution_timestamp: UnixTimestampMicros,
},
BackstopLiquidatePerp {
liquidatee_address: Address,
liquidator_address: Address,
liquidator_reward: PositiveDecimal,
protocol_reward: PositiveDecimal,
liquidation_loss: Decimal,
execution_timestamp: UnixTimestampMicros,
},
AutoDeleverage {
user: Address,
counterparty: Address,
market_id: MarketId,
fill_price: PositiveDecimal,
size: PositiveDecimal,
user_realized_pnl: Decimal,
counterparty_realized_pnl: Decimal,
execution_timestamp: UnixTimestampMicros,
},
UpdateReduceOnlyLimitOrder {
user_address: Address,
order_id: OrderId,
market_id: MarketId,
previous_size: PositiveDecimal,
new_size: PositiveDecimal,
execution_timestamp: UnixTimestampMicros,
},
BootOrder {
user_address: Address,
order_id: OrderId,
market_id: MarketId,
execution_timestamp: UnixTimestampMicros,
},
AccrueInterestOnBorrowLend {
asset_id: AssetId,
utilization_rate: PositiveDecimal,
time_elapsed: u64,
borrow_rate: PositiveDecimal,
prev_cumulative_borrow_rate: PositiveDecimal,
new_cumulative_borrow_rate: PositiveDecimal,
prev_cumulative_deposit_rate: PositiveDecimal,
new_cumulative_deposit_rate: PositiveDecimal,
new_debt: PositiveDecimal,
protocol_reward: PositiveDecimal,
execution_timestamp: UnixTimestampMicros,
},
InitializeSpotMarket {
market_id: MarketId,
execution_timestamp: UnixTimestampMicros,
},
DepositVault {
vault_address: Address,
user_address: Address,
asset_id: AssetId,
amount: PositiveDecimal,
amount_notional: PositiveDecimal,
shares: PositiveDecimal,
execution_timestamp: UnixTimestampMicros,
},
QueueWithdrawVault {
vault_address: Address,
user_address: Address,
shares: PositiveDecimal,
execution_timestamp: UnixTimestampMicros,
},
ProcessWithdrawVault {
vault_address: Address,
user_address: Address,
shares: PositiveDecimal,
amount: PositiveDecimal,
asset_id: AssetId,
execution_timestamp: UnixTimestampMicros,
},
CollectVaultFees {
vault_address: Address,
high_watermark: PositiveDecimal,
shares_minted_to_leader: PositiveDecimal,
execution_timestamp: UnixTimestampMicros,
},
DepositSpotCollateral {
user_address: Address,
asset_id: AssetId,
amount: PositiveDecimal,
execution_timestamp: UnixTimestampMicros,
},
WithdrawSpotCollateral {
user_address: Address,
asset_id: AssetId,
amount: PositiveDecimal,
execution_timestamp: UnixTimestampMicros,
},
HaltPerpMarket {
market_id: MarketId,
settlement_price: PositiveDecimal,
execution_timestamp: UnixTimestampMicros,
},
HaltSpotMarket {
market_id: MarketId,
execution_timestamp: UnixTimestampMicros,
},
UnhaltPerpMarket {
market_id: MarketId,
execution_timestamp: UnixTimestampMicros,
},
UnhaltSpotMarket {
market_id: MarketId,
execution_timestamp: UnixTimestampMicros,
},
HaltBorrowLendPool {
asset_id: AssetId,
execution_timestamp: UnixTimestampMicros,
},
UnhaltBorrowLendPool {
asset_id: AssetId,
execution_timestamp: UnixTimestampMicros,
},
AdminAddTradingCredits {
user_address: Address,
amount: PositiveDecimal,
execution_timestamp: UnixTimestampMicros,
},
AdminRemoveTradingCredits {
user_address: Address,
amount: PositiveDecimal,
execution_timestamp: UnixTimestampMicros,
},
UseTradingCredits {
user_address: Address,
amount: PositiveDecimal,
execution_timestamp: UnixTimestampMicros,
},
ClaimReferralRewards {
address: Address,
amount_claimed: PositiveDecimal,
total_rewards: PositiveDecimal,
},
UpdateUserFeeTier {
user_address: Address,
fee_tier: FeeTier,
execution_timestamp: UnixTimestampMicros,
},
UpdateUserFeeDiscountBps {
user_address: Address,
fee_discount_bps: u16,
execution_timestamp: UnixTimestampMicros,
},
WithdrawSpotCollateralV2 {
user_address: Address,
asset_id: AssetId,
amount: PositiveDecimal,
execution_timestamp: UnixTimestampMicros,
fee: PositiveDecimal,
},
DeleteAsset {
asset_id: AssetId,
execution_timestamp: UnixTimestampMicros,
},
PendingTriggerOrders {
market_id: MarketId,
execution_timestamp: UnixTimestampMicros,
},
DelegateUser {
delegator: Address,
delegate: Address,
name: String,
execution_timestamp: UnixTimestampMicros,
},
RevokeDelegation {
delegator: Address,
delegate: Address,
execution_timestamp: UnixTimestampMicros,
},
AdminRevokeDelegation {
delegator: Address,
delegate: Address,
execution_timestamp: UnixTimestampMicros,
},
AdminDeleteDelegateConfig {
delegator: Address,
delegate: Address,
name: String,
execution_timestamp: UnixTimestampMicros,
},
DepositIso {
user_address: Address,
market_id: MarketId,
amount: PositiveDecimal,
execution_timestamp: UnixTimestampMicros,
},
WithdrawIso {
user_address: Address,
market_id: MarketId,
amount: PositiveDecimal,
fee: PositiveDecimal,
execution_timestamp: UnixTimestampMicros,
},
TakeFromInsuranceFund {
reason: TakeFromInsuranceFundReason,
amount: PositiveDecimal,
execution_timestamp: UnixTimestampMicros,
},
DelegateUserV1 {
delegator: Address,
delegate: Address,
name: String,
expires_at: Option<UnixTimestampMicros>,
flags: u32,
execution_timestamp: UnixTimestampMicros,
},
TradeV1 {
user_address: Address,
market_id: MarketId,
price: PositiveDecimal,
size: PositiveDecimal,
side: Side,
order_id: OrderId,
is_maker: bool,
is_full_fill: bool,
realized_pnl: Decimal,
fee: Decimal,
net_fee: PositiveDecimal,
trade_id: TradeId,
client_order_id: Option<ClientOrderId>,
execution_timestamp: UnixTimestampMicros,
fee_asset: AssetId,
fill_type: FillType,
cumulative_filled_size: Option<PositiveDecimal>,
cumulative_filled_cot: Option<PositiveDecimal>,
remaining_size: Option<PositiveDecimal>,
},
InitializeAssetInfo {
asset_id: AssetId,
name: String,
execution_timestamp: UnixTimestampMicros,
},
InitializePerpMarketV1 {
market_id: MarketId,
name: String,
base_asset_id: AssetId,
execution_timestamp: UnixTimestampMicros,
},
InitializeSpotMarketV1 {
market_id: MarketId,
name: String,
base_asset_id: AssetId,
quote_asset_id: AssetId,
execution_timestamp: UnixTimestampMicros,
},
CancelOrderV1 {
user_address: Address,
order_id: OrderId,
market_id: MarketId,
execution_timestamp: UnixTimestampMicros,
client_order_id: Option<ClientOrderId>,
reason: CancelReason,
},
CancelTriggerOrderV1 {
user_address: Address,
trigger_order_id: TriggerOrderId,
market_id: MarketId,
execution_timestamp: UnixTimestampMicros,
reason: CancelReason,
},
CancelTwapV1 {
user_address: Address,
twap_id: TwapId,
market_id: MarketId,
execution_timestamp: UnixTimestampMicros,
reason: CancelReason,
},
}
impl<Address> Event<Address> {
pub fn event_key(&self) -> &'static str {
match self {
Self::AccrueInterestOnBorrowLend { .. } => "Exchange/AccrueInterestOnBorrowLend",
Self::ActivateTriggerOrder { .. } => "Exchange/ActivateTriggerOrder",
Self::AdminAddTradingCredits { .. } => "Exchange/AdminAddTradingCredits",
Self::AdminRemoveTradingCredits { .. } => "Exchange/AdminRemoveTradingCredits",
Self::ApplyFundingRate { .. } => "Exchange/ApplyFundingRate",
Self::ApplyFundingRateFailed { .. } => "Exchange/ApplyFundingRateFailed",
Self::AutoDeleverage { .. } => "Exchange/AutoDeleverage",
Self::BackstopLiquidatePerp { .. } => "Exchange/BackstopLiquidatePerp",
Self::BackstopLiquidatePerpPosition { .. } => "Exchange/BackstopLiquidatePerpPosition",
Self::BootOrder { .. } => "Exchange/BootOrder",
Self::Borrow { .. } => "Exchange/Borrow",
Self::CancelOrder { .. } => "Exchange/CancelOrder",
Self::CancelTriggerOrder { .. } => "Exchange/CancelTriggerOrder",
Self::CancelTwap { .. } => "Exchange/CancelTwap",
Self::ClaimReferralRewards { .. } => "Exchange/ClaimReferralRewards",
Self::CleanupUserMarketState { .. } => "Exchange/CleanupUserMarketState",
Self::CollectVaultFees { .. } => "Exchange/CollectVaultFees",
Self::CreateTriggerOrder { .. } => "Exchange/CreateTriggerOrder",
Self::CreateTwapOrder { .. } => "Exchange/CreateTwapOrder",
Self::DeleteMarket { .. } => "Exchange/DeleteMarket",
Self::DeleteAsset { .. } => "Exchange/DeleteAsset",
Self::Deposit { .. } => "Exchange/Deposit",
Self::DepositSpotCollateral { .. } => "Exchange/DepositSpotCollateral",
Self::DepositVault { .. } => "Exchange/DepositVault",
Self::EditTriggerOrder { .. } => "Exchange/EditTriggerOrder",
Self::FailureExecuteTriggerOrder { .. } => "Exchange/FailureExecuteTriggerOrder",
Self::ForceCancelOrders { .. } => "Exchange/ForceCancelOrders",
Self::ForceSettlePerpPosition { .. } => "Exchange/ForceSettlePerpPosition",
Self::HaltBorrowLendPool { .. } => "Exchange/HaltBorrowLendPool",
Self::HaltPerpMarket { .. } => "Exchange/HaltPerpMarket",
Self::HaltSpotMarket { .. } => "Exchange/HaltSpotMarket",
Self::InitializeBorrowLendPool { .. } => "Exchange/InitializeBorrowLendPool",
Self::InitializePerpMarket { .. } => "Exchange/InitializePerpMarket",
Self::InitializeSpotMarket { .. } => "Exchange/InitializeSpotMarket",
Self::LiquidateBorrowLendLiability { .. } => "Exchange/LiquidateBorrowLendLiability",
Self::PendingTriggerOrders { .. } => "Exchange/PendingTriggerOrders",
Self::PlaceOrder { .. } => "Exchange/PlaceOrder",
Self::ProcessWithdrawVault { .. } => "Exchange/ProcessWithdrawVault",
Self::QueueWithdrawVault { .. } => "Exchange/QueueWithdrawVault",
Self::ReactivateTriggerOrder { .. } => "Exchange/ReactivateTriggerOrder",
Self::RejectTriggerOrder { .. } => "Exchange/RejectTriggerOrder",
Self::RejectTwapOrder { .. } => "Exchange/RejectTwapOrder",
Self::RepayBorrow { .. } => "Exchange/RepayBorrow",
Self::SuccessfulExecuteTriggerOrder { .. } => "Exchange/SuccessfulExecuteTriggerOrder",
Self::SuccessfulExecuteTwapOrder { .. } => "Exchange/SuccessfulExecuteTwapOrder",
Self::Trade { .. } => "Exchange/Trade",
Self::TradeV1 { .. } => "Exchange/TradeV1",
Self::TryExecuteTriggerOrder { .. } => "Exchange/TryExecuteTriggerOrder",
Self::UnhaltBorrowLendPool { .. } => "Exchange/UnhaltBorrowLendPool",
Self::UnhaltPerpMarket { .. } => "Exchange/UnhaltPerpMarket",
Self::UnhaltSpotMarket { .. } => "Exchange/UnhaltSpotMarket",
Self::UpdateBorrowLendPool { .. } => "Exchange/UpdateBorrowLendPool",
Self::UpdateFundingRate { .. } => "Exchange/UpdateFundingRate",
Self::UpdateFundingRateFailed { .. } => "Exchange/UpdateFundingRateFailed",
Self::UpdateMarkPrice { .. } => "Exchange/UpdateMarkPrice",
Self::UpdateMarkPriceFailed { .. } => "Exchange/UpdateMarkPriceFailed",
Self::UpdateMarket { .. } => "Exchange/UpdateMarket",
Self::UpdateOraclePrice { .. } => "Exchange/UpdateOraclePrice",
Self::UpdateOraclePriceFailed { .. } => "Exchange/UpdateOraclePriceFailed",
Self::UpdatePremiumIndex { .. } => "Exchange/UpdatePremiumIndex",
Self::UpdatePremiumIndexFailed { .. } => "Exchange/UpdatePremiumIndexFailed",
Self::UpdateReduceOnlyLimitOrder { .. } => "Exchange/UpdateReduceOnlyLimitOrder",
Self::UpdateUserFeeDiscountBps { .. } => "Exchange/UpdateUserFeeDiscountBps",
Self::UpdateUserFeeTier { .. } => "Exchange/UpdateUserFeeTier",
Self::UsdcUnrealizedLossBorrowRebalance { .. } => {
"Exchange/UsdcUnrealizedLossBorrowRebalance"
}
Self::UseTradingCredits { .. } => "Exchange/UseTradingCredits",
Self::Withdraw { .. } => "Exchange/Withdraw",
Self::WithdrawSpotCollateral { .. } => "Exchange/WithdrawSpotCollateral",
Self::WithdrawSpotCollateralV2 { .. } => "Exchange/WithdrawSpotCollateralV2",
Self::DelegateUser { .. } => "Exchange/DelegateUser",
Self::RevokeDelegation { .. } => "Exchange/RevokeDelegation",
Self::AdminRevokeDelegation { .. } => "Exchange/AdminRevokeDelegation",
Self::AdminDeleteDelegateConfig { .. } => "Exchange/AdminDeleteDelegateConfig",
Self::DepositIso { .. } => "Exchange/DepositIso",
Self::WithdrawIso { .. } => "Exchange/WithdrawIso",
Self::TakeFromInsuranceFund { .. } => "Exchange/TakeFromInsuranceFund",
Self::DelegateUserV1 { .. } => "Exchange/DelegateUserV1",
Self::InitializeAssetInfo { .. } => "Exchange/InitializeAssetInfo",
Self::InitializePerpMarketV1 { .. } => "Exchange/InitializePerpMarketV1",
Self::InitializeSpotMarketV1 { .. } => "Exchange/InitializeSpotMarketV1",
Self::CancelOrderV1 { .. } => "Exchange/CancelOrderV1",
Self::CancelTriggerOrderV1 { .. } => "Exchange/CancelTriggerOrderV1",
Self::CancelTwapV1 { .. } => "Exchange/CancelTwapV1",
}
}
}
crate::define_simple_enum!(OrderSource {
Admin,
Liquidate,
User,
Trigger,
Twap,
});