use solana_pubkey::Pubkey;
use std::str::FromStr;
lazy_static::lazy_static! {
pub static ref ALT_PROGRAM_ID: Pubkey = Pubkey::from_str("AddressLookupTab1e1111111111111111111111111").unwrap();
}
pub const TOKEN_PROGRAM_ID: Pubkey = spl_token::ID;
pub const ASSOCIATED_TOKEN_PROGRAM_ID: Pubkey = spl_associated_token_account::ID;
pub const SYSTEM_PROGRAM_ID: Pubkey = solana_sdk_ids::system_program::ID;
pub const RENT_SYSVAR_ID: Pubkey = solana_sdk_ids::sysvar::rent::ID;
lazy_static::lazy_static! {
pub static ref MPL_TOKEN_METADATA_PROGRAM_ID: Pubkey =
Pubkey::from_str("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s").unwrap();
}
pub mod instruction {
pub const INITIALIZE: u8 = 0;
pub const CREATE_MARKET: u8 = 1;
pub const ADD_DEPOSIT_MINT: u8 = 2;
pub const MINT_COMPLETE_SET: u8 = 3;
pub const MERGE_COMPLETE_SET: u8 = 4;
pub const CANCEL_ORDER: u8 = 5;
pub const INCREMENT_NONCE: u8 = 6;
pub const SETTLE_MARKET: u8 = 7;
pub const REDEEM_WINNINGS: u8 = 8;
pub const SET_PAUSED: u8 = 9;
pub const SET_OPERATOR: u8 = 10;
pub const WITHDRAW_FROM_POSITION: u8 = 11;
pub const ACTIVATE_MARKET: u8 = 12;
pub const MATCH_ORDERS_MULTI: u8 = 13;
pub const SET_AUTHORITY: u8 = 14;
pub const CREATE_ORDERBOOK: u8 = 15;
pub const WHITELIST_DEPOSIT_TOKEN: u8 = 16;
pub const DEPOSIT_TO_GLOBAL: u8 = 17;
pub const GLOBAL_TO_MARKET_DEPOSIT: u8 = 18;
pub const INIT_POSITION_TOKENS: u8 = 19;
pub const DEPOSIT_AND_SWAP: u8 = 20;
pub const EXTEND_POSITION_TOKENS: u8 = 21;
pub const WITHDRAW_FROM_GLOBAL: u8 = 22;
pub const CLOSE_POSITION_ALT: u8 = 23;
pub const CLOSE_ORDER_STATUS: u8 = 24;
pub const CLOSE_POSITION_TOKEN_ACCOUNTS: u8 = 25;
pub const CLOSE_ORDERBOOK_ALT: u8 = 26;
pub const CLOSE_ORDERBOOK: u8 = 27;
pub const SET_MANAGER: u8 = 28;
pub const SET_MARKET_FEES: u8 = 29;
pub const SET_FEE_RECEIVER: u8 = 30;
pub const CREATE_CONDITIONAL_METADATA: u8 = 31;
pub const UPDATE_CONDITIONAL_METADATA: u8 = 32;
}
pub const EXCHANGE_DISCRIMINATOR: [u8; 8] = [0x1e, 0xc8, 0xdc, 0x95, 0x03, 0x3d, 0x68, 0x32];
pub const MARKET_DISCRIMINATOR: [u8; 8] = [0xdb, 0xbe, 0xd5, 0x37, 0x00, 0xe3, 0xc6, 0x9a];
pub const ORDER_STATUS_DISCRIMINATOR: [u8; 8] = [0x2e, 0x5a, 0xf1, 0x49, 0xb2, 0x68, 0x41, 0x03];
pub const USER_NONCE_DISCRIMINATOR: [u8; 8] = [0xeb, 0x85, 0x01, 0xf3, 0x12, 0x87, 0x58, 0xe0];
pub const POSITION_DISCRIMINATOR: [u8; 8] = [0xaa, 0xbc, 0x8f, 0xe4, 0x7a, 0x40, 0xf7, 0xd0];
pub const ORDERBOOK_DISCRIMINATOR: [u8; 8] = [0x2b, 0x22, 0x19, 0x71, 0xc3, 0x45, 0x48, 0x07];
pub const GLOBAL_DEPOSIT_TOKEN_DISCRIMINATOR: [u8; 8] =
[0x25, 0xbe, 0xa1, 0xe8, 0x7b, 0x92, 0x2a, 0x57];
pub const EXCHANGE_SEED: &[u8] = b"central_state";
pub const MARKET_SEED: &[u8] = b"market";
pub const VAULT_SEED: &[u8] = b"market_deposit_token_account";
pub const MINT_AUTHORITY_SEED: &[u8] = b"market_mint_authority";
pub const CONDITIONAL_MINT_SEED: &[u8] = b"conditional_mint";
pub const CONDITION_SEED: &[u8] = b"condition";
pub const ORDER_STATUS_SEED: &[u8] = b"order_status";
pub const USER_NONCE_SEED: &[u8] = b"user_nonce";
pub const POSITION_SEED: &[u8] = b"position";
pub const ORDERBOOK_SEED: &[u8] = b"orderbook";
pub const GLOBAL_DEPOSIT_TOKEN_SEED: &[u8] = b"global_deposit";
pub const FEE_RECEIVER_SEED: &[u8] = b"fee_receiver";
pub const MPL_METADATA_SEED: &[u8] = b"metadata";
pub const EXCHANGE_SIZE: usize = 212;
pub const MARKET_SIZE: usize = 212;
pub const ORDER_STATUS_SIZE: usize = 32;
pub const USER_NONCE_SIZE: usize = 16;
pub const POSITION_SIZE: usize = 80;
pub const ORDERBOOK_SIZE: usize = 144;
pub const GLOBAL_DEPOSIT_TOKEN_SIZE: usize = 48;
pub const SIGNED_ORDER_SIZE: usize = 233;
pub const ORDER_SIZE: usize = 37;
pub const SIGNATURE_SIZE: usize = 64;
pub const MAX_OUTCOMES: u8 = 6;
pub const MIN_OUTCOMES: u8 = 2;
pub const MAX_MAKERS: usize = 5;