1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
pub use exchange::{
    derivative::{
        DerivativeLimitOrder, DerivativeMarketOrder, DerivativeOrder, DerivativePosition, EffectivePosition, Position, TrimmedDerivativeLimitOrder,
    },
    derivative_market::{
        DerivativeMarket, FullDerivativeMarket, FullDerivativeMarketPerpetualInfo, PerpetualMarketFunding, PerpetualMarketInfo, PerpetualMarketState,
    },
    order::{GenericOrder, OrderData, OrderInfo, OrderSide, OrderType},
    response::{
        DerivativeMarketResponse, MarketMidPriceAndTOBResponse, MarketVolatilityResponse, OracleVolatilityResponse, PerpetualMarketFundingResponse,
        PerpetualMarketInfoResponse, QueryAggregateMarketVolumeResponse, QueryAggregateVolumeResponse, QueryDenomDecimalResponse,
        QueryDenomDecimalsResponse, QueryMarketAtomicExecutionFeeMultiplierResponse, SpotMarketResponse, SubaccountDepositResponse,
        SubaccountEffectivePositionInMarketResponse, SubaccountPositionInMarketResponse, TraderDerivativeOrdersResponse, TraderSpotOrdersResponse,
    },
    spot::{MsgCreateSpotMarketOrderResponse, SpotLimitOrder, SpotMarketOrder, SpotOrder, TrimmedSpotLimitOrder},
    spot_market::SpotMarket,
    subaccount::{
        addr_to_bech32, bech32_to_hex, checked_address_to_subaccount_id, get_default_subaccount_id_for_checked_address, is_default_subaccount,
        subaccount_id_to_ethereum_address, subaccount_id_to_injective_address, subaccount_id_to_unchecked_injective_address,
    },
    types::{
        DenomDecimals, Deposit, Hash, MarketId, MarketType, PriceLevel, SubaccountId, FROM_WORST_TO_BEST_CANCELLATION_STRATEGY,
        UNSORTED_CANCELLATION_STRATEGY,
    },
};
pub use oracle::{
    response::{OraclePriceResponse, PythPriceResponse},
    types::{OracleInfo, OracleType, PriceAttestation, PricePairState, PythStatus},
    volatility::{MetadataStatistics, PriceRecord, TradeHistoryOptions, TradeRecord},
};
pub use wasmx::types::FundingMode;

#[cfg(not(target_arch = "wasm32"))]
pub use exchange_mock_querier::handlers::*;

#[cfg(not(target_arch = "wasm32"))]
pub use exchange_mock_querier::*;

pub use msg::{
    cancel_derivative_order_msg, cancel_spot_order_msg, create_activate_contract_msg, create_batch_update_orders_msg, create_burn_tokens_msg,
    create_deactivate_contract_msg, create_deposit_msg, create_derivative_market_order_msg, create_external_transfer_msg,
    create_increase_position_margin_msg, create_liquidate_position_msg, create_mint_tokens_msg, create_new_denom_msg, create_relay_pyth_prices_msg,
    create_rewards_opt_out_msg, create_set_token_metadata_msg, create_spot_market_order_msg, create_subaccount_transfer_msg,
    create_update_contract_msg, create_withdraw_msg, InjectiveMsg, InjectiveMsgWrapper,
};

pub use querier::InjectiveQuerier;
pub use query::{InjectiveQuery, InjectiveQueryWrapper};
pub use route::InjectiveRoute;
#[cfg(not(target_arch = "wasm32"))]
pub use test_helpers::testing_helpers::{
    create_mock_spot_market, inj_mock_deps, inj_mock_env, test_market_ids, OwnedDepsExt, TEST_MARKET_ID_1, TEST_MARKET_ID_10, TEST_MARKET_ID_2,
    TEST_MARKET_ID_3, TEST_MARKET_ID_4, TEST_MARKET_ID_5, TEST_MARKET_ID_6, TEST_MARKET_ID_7, TEST_MARKET_ID_8, TEST_MARKET_ID_9,
};

pub mod authz;
pub mod exchange;
pub mod msg;
pub mod oracle;
pub mod querier;
pub mod query;
pub mod route;
pub mod tokenfactory;
pub mod wasmx;

#[cfg(not(target_arch = "wasm32"))]
mod exchange_mock_querier;
mod test_helpers;

// This export is added to all contracts that import this package, signifying that they require
// "injective" support on the chain they run on.
#[no_mangle]
extern "C" fn requires_injective() {}