MsgCreateSpotLimitOrder, MsgCreateSpotLimitOrderResponse, MsgInstantSpotMarketLaunch, OrderInfo, OrderType, SpotOrder,
use injective_test_tube::{cosmrs::Any, Account, Bank, Exchange, InjectiveTestApp, Module, Runner, SigningAccount, Wasm};
let release_wasm_path = format!("{}/../../artifacts/swap_contract.wasm", env!("CARGO_MANIFEST_DIR"));
let release_wasm = std::fs::read(release_wasm_path).expect("build the optimized release artifact before running TestTube tests");
set_route_and_assert_success(&wasm, &owner, &contract, USDT, GF, vec![market_id.as_str().into()]);
.and_then(|event| event.attributes.iter().find(|attribute| attribute.key == "swap_final_amount"))
assert!(contract_usdt_after >= contract_usdt_before, "pre-existing USDT support must not decrease");
let exact_notional = LOW_PRICE_RAW * LOW_QUANTITY_ATOMS + HIGH_PRICE_RAW * SELECTED_HIGH_QUANTITY_ATOMS;
add_denom_notional_and_decimal(app, &validator, GF.to_string(), "1".to_string(), BASE_DECIMALS as u64);
add_denom_notional_and_decimal(app, &validator, USDT.to_string(), "1".to_string(), QUOTE_DECIMALS as u64);
fn sell_post_only_order(trader: &SigningAccount, market_id: &str, price: &str, quantity: &str) -> MsgCreateSpotLimitOrder {
let (price, quantity) = scale_price_quantity_spot_market(price, quantity, &BASE_DECIMALS, "E_DECIMALS);
subaccount_id: get_default_subaccount_id_for_checked_address(&Addr::unchecked(trader.address())).to_string(),